Archived
此前活动只能靠 seed 装入,治理台没有任何入口 —— 这是「逐个开发活动」的拦路石。 补 POST /api/gov/activities(无代码通道:交清单 + .js 产物,都是数据), 两审在服务端跑;不过审按发布门同样的式样回 412 + ApiError.detail 带审计结论 (直接回业务体的话类型化客户端拿不到详情)。活动库给「装入 / 换版」卡:选文件或粘贴两份。 实测:0.1.0 → 0.2.0 版本并存;声明未注册的工具即 412 并点名到工具。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
2425 lines
106 KiB
TypeScript
2425 lines
106 KiB
TypeScript
/**
|
|
* 治理台路由契约(编码规范 §8.1 / §9.1)。
|
|
* 治理台九功能不设后端 governance 模块:每个功能是对应模块的管理用例 + 本文件的路由组装(§3)。
|
|
*/
|
|
import { z } from 'zod';
|
|
export declare const listStaffRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/staff";
|
|
readonly output: z.ZodObject<{
|
|
staff: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
account: z.ZodString;
|
|
name: z.ZodString;
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
state: z.ZodDefault<z.ZodEnum<{
|
|
active: "active";
|
|
disabled: "disabled";
|
|
}>>;
|
|
position: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
code: z.ZodString;
|
|
name: z.ZodString;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>>;
|
|
positions: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
code: z.ZodString;
|
|
name: z.ZodString;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const createStaffRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/staff";
|
|
readonly body: z.ZodObject<{
|
|
account: z.ZodString;
|
|
name: z.ZodString;
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
account: z.ZodString;
|
|
name: z.ZodString;
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
state: z.ZodDefault<z.ZodEnum<{
|
|
active: "active";
|
|
disabled: "disabled";
|
|
}>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const disableStaffCheckRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/staff/:staffId/disable-check";
|
|
readonly params: z.ZodObject<{
|
|
staffId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
staffId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
blocked: z.ZodBoolean;
|
|
openTasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
taskId: z.ZodString;
|
|
title: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
openCards: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
cardId: z.ZodString;
|
|
title: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
openApprovals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
approvalId: z.ZodString;
|
|
title: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const disableStaffRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/staff/:staffId/disable";
|
|
readonly params: z.ZodObject<{
|
|
staffId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
check: z.ZodObject<{
|
|
staffId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
blocked: z.ZodBoolean;
|
|
openTasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
taskId: z.ZodString;
|
|
title: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
openCards: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
cardId: z.ZodString;
|
|
title: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
openApprovals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
approvalId: z.ZodString;
|
|
title: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listGrantsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/positions/:positionId/grants";
|
|
readonly params: z.ZodObject<{
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
grants: z.ZodArray<z.ZodObject<{
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
object: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"data">;
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
field: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"governance">;
|
|
function: z.ZodEnum<{
|
|
data: "data";
|
|
task: "task";
|
|
trigger: "trigger";
|
|
system: "system";
|
|
tool: "tool";
|
|
activity: "activity";
|
|
staff: "staff";
|
|
process: "process";
|
|
memory: "memory";
|
|
}>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"task">;
|
|
activityId: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>], "kind">;
|
|
action: z.ZodEnum<{
|
|
read: "read";
|
|
write: "write";
|
|
govern: "govern";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const setGrantsRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/positions/:positionId/grants";
|
|
readonly params: z.ZodObject<{
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
grants: z.ZodArray<z.ZodObject<{
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
object: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"data">;
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
field: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"governance">;
|
|
function: z.ZodEnum<{
|
|
data: "data";
|
|
task: "task";
|
|
trigger: "trigger";
|
|
system: "system";
|
|
tool: "tool";
|
|
activity: "activity";
|
|
staff: "staff";
|
|
process: "process";
|
|
memory: "memory";
|
|
}>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"task">;
|
|
activityId: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>], "kind">;
|
|
action: z.ZodEnum<{
|
|
read: "read";
|
|
write: "write";
|
|
govern: "govern";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
grants: z.ZodArray<z.ZodObject<{
|
|
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
|
|
object: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"data">;
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
field: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"governance">;
|
|
function: z.ZodEnum<{
|
|
data: "data";
|
|
task: "task";
|
|
trigger: "trigger";
|
|
system: "system";
|
|
tool: "tool";
|
|
activity: "activity";
|
|
staff: "staff";
|
|
process: "process";
|
|
memory: "memory";
|
|
}>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"task">;
|
|
activityId: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>], "kind">;
|
|
action: z.ZodEnum<{
|
|
read: "read";
|
|
write: "write";
|
|
govern: "govern";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const LLM_PROVIDERS: readonly ["openai-compatible", "openai", "deepseek", "anthropic", "qwen"];
|
|
export declare const llmProviderSchema: z.ZodEnum<{
|
|
"openai-compatible": "openai-compatible";
|
|
openai: "openai";
|
|
deepseek: "deepseek";
|
|
anthropic: "anthropic";
|
|
qwen: "qwen";
|
|
}>;
|
|
export type LlmProvider = z.infer<typeof llmProviderSchema>;
|
|
/** 活动只见自定义模型名;Provider / URL / API-Key / Model 四元在系统侧绑定,活动不触厂商与密钥 */
|
|
export declare const llmInstanceViewSchema: z.ZodObject<{
|
|
id: z.ZodString;
|
|
name: z.ZodString;
|
|
provider: z.ZodEnum<{
|
|
"openai-compatible": "openai-compatible";
|
|
openai: "openai";
|
|
deepseek: "deepseek";
|
|
anthropic: "anthropic";
|
|
qwen: "qwen";
|
|
}>;
|
|
baseUrl: z.ZodString;
|
|
model: z.ZodString;
|
|
apiKeyBound: z.ZodBoolean;
|
|
systemUse: z.ZodDefault<z.ZodBoolean>;
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>;
|
|
export type LlmInstanceView = z.infer<typeof llmInstanceViewSchema>;
|
|
export declare const listLlmInstancesRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/llm";
|
|
readonly output: z.ZodObject<{
|
|
instances: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
name: z.ZodString;
|
|
provider: z.ZodEnum<{
|
|
"openai-compatible": "openai-compatible";
|
|
openai: "openai";
|
|
deepseek: "deepseek";
|
|
anthropic: "anthropic";
|
|
qwen: "qwen";
|
|
}>;
|
|
baseUrl: z.ZodString;
|
|
model: z.ZodString;
|
|
apiKeyBound: z.ZodBoolean;
|
|
systemUse: z.ZodDefault<z.ZodBoolean>;
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const upsertLlmInstanceRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/llm";
|
|
readonly body: z.ZodObject<{
|
|
id: z.ZodOptional<z.ZodString>;
|
|
name: z.ZodString;
|
|
provider: z.ZodEnum<{
|
|
"openai-compatible": "openai-compatible";
|
|
openai: "openai";
|
|
deepseek: "deepseek";
|
|
anthropic: "anthropic";
|
|
qwen: "qwen";
|
|
}>;
|
|
baseUrl: z.ZodDefault<z.ZodString>;
|
|
model: z.ZodString;
|
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
systemUse: z.ZodDefault<z.ZodBoolean>;
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
id: z.ZodString;
|
|
name: z.ZodString;
|
|
provider: z.ZodEnum<{
|
|
"openai-compatible": "openai-compatible";
|
|
openai: "openai";
|
|
deepseek: "deepseek";
|
|
anthropic: "anthropic";
|
|
qwen: "qwen";
|
|
}>;
|
|
baseUrl: z.ZodString;
|
|
model: z.ZodString;
|
|
apiKeyBound: z.ZodBoolean;
|
|
systemUse: z.ZodDefault<z.ZodBoolean>;
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const probeLlmInstanceRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/llm/:id/probe";
|
|
readonly params: z.ZodObject<{
|
|
id: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
error: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const govTaskRowSchema: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
title: z.ZodString;
|
|
activityId: z.ZodString;
|
|
paradigm: z.ZodEnum<{
|
|
loop: "loop";
|
|
flow: "flow";
|
|
}>;
|
|
ownerName: z.ZodString;
|
|
runtime: z.ZodEnum<{
|
|
running: "running";
|
|
"awaiting-human": "awaiting-human";
|
|
"awaiting-event": "awaiting-event";
|
|
suspended: "suspended";
|
|
"landing-blocked": "landing-blocked";
|
|
terminal: "terminal";
|
|
}>;
|
|
terminal: z.ZodOptional<z.ZodEnum<{
|
|
released: "released";
|
|
blocked: "blocked";
|
|
stalled: "stalled";
|
|
exhausted: "exhausted";
|
|
terminated: "terminated";
|
|
}>>;
|
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
usedSteps: z.ZodNumber;
|
|
capSteps: z.ZodNumber;
|
|
startedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
export type GovTaskRow = z.infer<typeof govTaskRowSchema>;
|
|
export declare const listGovTasksRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/tasks";
|
|
readonly output: z.ZodObject<{
|
|
tasks: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
title: z.ZodString;
|
|
activityId: z.ZodString;
|
|
paradigm: z.ZodEnum<{
|
|
loop: "loop";
|
|
flow: "flow";
|
|
}>;
|
|
ownerName: z.ZodString;
|
|
runtime: z.ZodEnum<{
|
|
running: "running";
|
|
"awaiting-human": "awaiting-human";
|
|
"awaiting-event": "awaiting-event";
|
|
suspended: "suspended";
|
|
"landing-blocked": "landing-blocked";
|
|
terminal: "terminal";
|
|
}>;
|
|
terminal: z.ZodOptional<z.ZodEnum<{
|
|
released: "released";
|
|
blocked: "blocked";
|
|
stalled: "stalled";
|
|
exhausted: "exhausted";
|
|
terminated: "terminated";
|
|
}>>;
|
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
usedSteps: z.ZodNumber;
|
|
capSteps: z.ZodNumber;
|
|
startedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
workflows: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
subject: z.ZodString;
|
|
state: z.ZodEnum<{
|
|
terminated: "terminated";
|
|
running: "running";
|
|
waiting: "waiting";
|
|
completed: "completed";
|
|
abnormal: "abnormal";
|
|
}>;
|
|
packageId: z.ZodString;
|
|
startedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 控制三语义:暂停 / 叫停 / 终止 —— 治理台的干预面(OS 06) */
|
|
export declare const controlTaskRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/tasks/:taskId/control";
|
|
readonly params: z.ZodObject<{
|
|
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
semantic: z.ZodEnum<{
|
|
pause: "pause";
|
|
halt: "halt";
|
|
terminate: "terminate";
|
|
}>;
|
|
reason: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
resumable: z.ZodBoolean;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const resumeTaskRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/tasks/:taskId/resume";
|
|
readonly params: z.ZodObject<{
|
|
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
runtime: z.ZodEnum<{
|
|
running: "running";
|
|
"awaiting-human": "awaiting-human";
|
|
"awaiting-event": "awaiting-event";
|
|
suspended: "suspended";
|
|
"landing-blocked": "landing-blocked";
|
|
terminal: "terminal";
|
|
}>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 改派 —— 在途任务的负责人变更,留痕并通知双方 */
|
|
export declare const reassignTaskRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/tasks/:taskId/reassign";
|
|
readonly params: z.ZodObject<{
|
|
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
to: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
ownerId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 任务日志 —— 治理台可查看任意任务的任务日志(OS 02) */
|
|
export declare const govTaskLogRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/tasks/:taskId/log";
|
|
readonly params: z.ZodObject<{
|
|
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
log: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
at: z.ZodString;
|
|
sideLabel: z.ZodString;
|
|
title: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listProcessPackagesRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/process";
|
|
readonly output: z.ZodObject<{
|
|
packages: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
name: z.ZodString;
|
|
version: z.ZodNumber;
|
|
state: z.ZodEnum<{
|
|
draft: "draft";
|
|
published: "published";
|
|
retired: "retired";
|
|
}>;
|
|
callInterface: z.ZodObject<{
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"start">;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"end">;
|
|
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"activity">;
|
|
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
|
in: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
activityVersion: z.ZodOptional<z.ZodString>;
|
|
owner: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
failure: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"reroute">;
|
|
edgeId: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"escalate">;
|
|
approvalNodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"tolerate">;
|
|
}, z.core.$strip>], "kind">>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"approval">;
|
|
approver: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
reject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"reopen">;
|
|
nodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>], "kind">;
|
|
nudge: z.ZodOptional<z.ZodObject<{
|
|
deadline: z.ZodString;
|
|
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
after: z.ZodString;
|
|
action: z.ZodEnum<{
|
|
nudge: "nudge";
|
|
escalate: "escalate";
|
|
}>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"gateway">;
|
|
gateway: z.ZodEnum<{
|
|
parallel: "parallel";
|
|
exclusive: "exclusive";
|
|
}>;
|
|
mode: z.ZodEnum<{
|
|
join: "join";
|
|
fork: "fork";
|
|
}>;
|
|
basis: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "kind">>;
|
|
edges: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
from: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
to: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
condition: z.ZodOptional<z.ZodString>;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
bad: "bad";
|
|
}>>;
|
|
reopen: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>>>;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
diagram: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 画图即校验 —— 与前端画布同源的闭合校验 */
|
|
/**
|
|
* 保存流程包(编排工作区的落笔)。
|
|
* **保存 ≠ 发布**:落的是这一版的定义(草稿可反复存);已发布版本不可回改 ——
|
|
* 后端按 (id, version, state) 判:published 版拒存,提示另起新版本。
|
|
* 返回连同闭合报告:画图即校验,每次落笔都知道离「可发布」还差几条。
|
|
*/
|
|
export declare const saveProcessRoute: {
|
|
readonly method: "PUT";
|
|
readonly path: "/api/gov/process";
|
|
readonly body: z.ZodObject<{
|
|
pkg: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
name: z.ZodString;
|
|
version: z.ZodNumber;
|
|
state: z.ZodEnum<{
|
|
draft: "draft";
|
|
published: "published";
|
|
retired: "retired";
|
|
}>;
|
|
callInterface: z.ZodObject<{
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"start">;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"end">;
|
|
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"activity">;
|
|
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
|
in: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
activityVersion: z.ZodOptional<z.ZodString>;
|
|
owner: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
failure: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"reroute">;
|
|
edgeId: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"escalate">;
|
|
approvalNodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"tolerate">;
|
|
}, z.core.$strip>], "kind">>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"approval">;
|
|
approver: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
reject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"reopen">;
|
|
nodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>], "kind">;
|
|
nudge: z.ZodOptional<z.ZodObject<{
|
|
deadline: z.ZodString;
|
|
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
after: z.ZodString;
|
|
action: z.ZodEnum<{
|
|
nudge: "nudge";
|
|
escalate: "escalate";
|
|
}>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"gateway">;
|
|
gateway: z.ZodEnum<{
|
|
parallel: "parallel";
|
|
exclusive: "exclusive";
|
|
}>;
|
|
mode: z.ZodEnum<{
|
|
join: "join";
|
|
fork: "fork";
|
|
}>;
|
|
basis: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "kind">>;
|
|
edges: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
from: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
to: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
condition: z.ZodOptional<z.ZodString>;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
bad: "bad";
|
|
}>>;
|
|
reopen: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>>>;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
diagram: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
pkg: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
name: z.ZodString;
|
|
version: z.ZodNumber;
|
|
state: z.ZodEnum<{
|
|
draft: "draft";
|
|
published: "published";
|
|
retired: "retired";
|
|
}>;
|
|
callInterface: z.ZodObject<{
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"start">;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"end">;
|
|
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"activity">;
|
|
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
|
in: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
activityVersion: z.ZodOptional<z.ZodString>;
|
|
owner: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
failure: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"reroute">;
|
|
edgeId: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"escalate">;
|
|
approvalNodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"tolerate">;
|
|
}, z.core.$strip>], "kind">>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"approval">;
|
|
approver: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
reject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"reopen">;
|
|
nodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>], "kind">;
|
|
nudge: z.ZodOptional<z.ZodObject<{
|
|
deadline: z.ZodString;
|
|
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
after: z.ZodString;
|
|
action: z.ZodEnum<{
|
|
nudge: "nudge";
|
|
escalate: "escalate";
|
|
}>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"gateway">;
|
|
gateway: z.ZodEnum<{
|
|
parallel: "parallel";
|
|
exclusive: "exclusive";
|
|
}>;
|
|
mode: z.ZodEnum<{
|
|
join: "join";
|
|
fork: "fork";
|
|
}>;
|
|
basis: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "kind">>;
|
|
edges: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
from: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
to: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
condition: z.ZodOptional<z.ZodString>;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
bad: "bad";
|
|
}>>;
|
|
reopen: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>>>;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
diagram: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, z.core.$strip>;
|
|
report: z.ZodObject<{
|
|
publishable: z.ZodBoolean;
|
|
violations: z.ZodArray<z.ZodObject<{
|
|
kind: z.ZodEnum<{
|
|
"edge-unmapped": "edge-unmapped";
|
|
"required-unmapped": "required-unmapped";
|
|
"type-conflict": "type-conflict";
|
|
"dangling-node": "dangling-node";
|
|
"gateway-unbalanced": "gateway-unbalanced";
|
|
"join-ambiguous-source": "join-ambiguous-source";
|
|
"tolerate-required-dependency": "tolerate-required-dependency";
|
|
"unknown-activity": "unknown-activity";
|
|
"missing-owner-position": "missing-owner-position";
|
|
}>;
|
|
nodeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "NodeId", "out">>;
|
|
edgeId: z.ZodOptional<z.ZodString>;
|
|
field: z.ZodOptional<z.ZodString>;
|
|
message: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const validateProcessRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/process/validate";
|
|
readonly body: z.ZodObject<{
|
|
pkg: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
name: z.ZodString;
|
|
version: z.ZodNumber;
|
|
state: z.ZodEnum<{
|
|
draft: "draft";
|
|
published: "published";
|
|
retired: "retired";
|
|
}>;
|
|
callInterface: z.ZodObject<{
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"start">;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"end">;
|
|
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"activity">;
|
|
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
|
in: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
activityVersion: z.ZodOptional<z.ZodString>;
|
|
owner: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
failure: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"reroute">;
|
|
edgeId: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"escalate">;
|
|
approvalNodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"tolerate">;
|
|
}, z.core.$strip>], "kind">>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"approval">;
|
|
approver: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
reject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"reopen">;
|
|
nodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>], "kind">;
|
|
nudge: z.ZodOptional<z.ZodObject<{
|
|
deadline: z.ZodString;
|
|
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
after: z.ZodString;
|
|
action: z.ZodEnum<{
|
|
nudge: "nudge";
|
|
escalate: "escalate";
|
|
}>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"gateway">;
|
|
gateway: z.ZodEnum<{
|
|
parallel: "parallel";
|
|
exclusive: "exclusive";
|
|
}>;
|
|
mode: z.ZodEnum<{
|
|
join: "join";
|
|
fork: "fork";
|
|
}>;
|
|
basis: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "kind">>;
|
|
edges: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
from: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
to: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
condition: z.ZodOptional<z.ZodString>;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
bad: "bad";
|
|
}>>;
|
|
reopen: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>>>;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
diagram: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
publishable: z.ZodBoolean;
|
|
violations: z.ZodArray<z.ZodObject<{
|
|
kind: z.ZodEnum<{
|
|
"edge-unmapped": "edge-unmapped";
|
|
"required-unmapped": "required-unmapped";
|
|
"type-conflict": "type-conflict";
|
|
"dangling-node": "dangling-node";
|
|
"gateway-unbalanced": "gateway-unbalanced";
|
|
"join-ambiguous-source": "join-ambiguous-source";
|
|
"tolerate-required-dependency": "tolerate-required-dependency";
|
|
"unknown-activity": "unknown-activity";
|
|
"missing-owner-position": "missing-owner-position";
|
|
}>;
|
|
nodeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "NodeId", "out">>;
|
|
edgeId: z.ZodOptional<z.ZodString>;
|
|
field: z.ZodOptional<z.ZodString>;
|
|
message: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const publishProcessRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/process/:id/:version/publish";
|
|
readonly params: z.ZodObject<{
|
|
id: z.ZodString;
|
|
version: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
publishable: z.ZodBoolean;
|
|
violations: z.ZodArray<z.ZodObject<{
|
|
kind: z.ZodEnum<{
|
|
"edge-unmapped": "edge-unmapped";
|
|
"required-unmapped": "required-unmapped";
|
|
"type-conflict": "type-conflict";
|
|
"dangling-node": "dangling-node";
|
|
"gateway-unbalanced": "gateway-unbalanced";
|
|
"join-ambiguous-source": "join-ambiguous-source";
|
|
"tolerate-required-dependency": "tolerate-required-dependency";
|
|
"unknown-activity": "unknown-activity";
|
|
"missing-owner-position": "missing-owner-position";
|
|
}>;
|
|
nodeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "NodeId", "out">>;
|
|
edgeId: z.ZodOptional<z.ZodString>;
|
|
field: z.ZodOptional<z.ZodString>;
|
|
message: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listTriggersRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/triggers";
|
|
readonly output: z.ZodObject<{
|
|
triggers: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TriggerId", "out">;
|
|
name: z.ZodString;
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
processPackageId: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"periodic-calendar">;
|
|
calendar: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"periodic-data">;
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
dateField: z.ZodString;
|
|
offset: z.ZodString;
|
|
filter: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"event">;
|
|
rule: z.ZodString;
|
|
eventType: z.ZodDefault<z.ZodEnum<{
|
|
human: "human";
|
|
data: "data";
|
|
time: "time";
|
|
control: "control";
|
|
}>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"registration">;
|
|
formHint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const toggleTriggerRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/triggers/:id/toggle";
|
|
readonly params: z.ZodObject<{
|
|
id: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
enabled: z.ZodBoolean;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
}, z.core.$strip>;
|
|
};
|
|
/**
|
|
* 调起规则的**定义面**(设计中心):新建 / 改规则 / 改起单装配。
|
|
*
|
|
* 与 `toggleTriggerRoute` 分开是有意的:定义归设计,启停归运营 ——
|
|
* 同一个触发器,「它按什么规则调起」和「今天开不开」是两个人在两个台面上做的两件事。
|
|
* 触发器与流程包平级:改它**不动任何包版本**。
|
|
*/
|
|
export declare const upsertTriggerRoute: {
|
|
readonly method: "PUT";
|
|
readonly path: "/api/gov/triggers";
|
|
readonly body: z.ZodObject<{
|
|
trigger: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TriggerId", "out">;
|
|
name: z.ZodString;
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
processPackageId: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"periodic-calendar">;
|
|
calendar: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"periodic-data">;
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
dateField: z.ZodString;
|
|
offset: z.ZodString;
|
|
filter: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"event">;
|
|
rule: z.ZodString;
|
|
eventType: z.ZodDefault<z.ZodEnum<{
|
|
human: "human";
|
|
data: "data";
|
|
time: "time";
|
|
control: "control";
|
|
}>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"registration">;
|
|
formHint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
trigger: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TriggerId", "out">;
|
|
name: z.ZodString;
|
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
processPackageId: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
spec: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"periodic-calendar">;
|
|
calendar: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"periodic-data">;
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
dateField: z.ZodString;
|
|
offset: z.ZodString;
|
|
filter: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"event">;
|
|
rule: z.ZodString;
|
|
eventType: z.ZodDefault<z.ZodEnum<{
|
|
human: "human";
|
|
data: "data";
|
|
time: "time";
|
|
control: "control";
|
|
}>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"registration">;
|
|
formHint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/**
|
|
* 工作组 = 一组「岗位 → 员工」的绑定,**起单时装载、随工作流走**。
|
|
*
|
|
* 它是**绑定先于策略**,不是第五种负责人策略:起单人有组,整条流的岗位就按组指人;
|
|
* 没有组才回落四策略。装进工作流的是**快照** —— 改组不改已起的单。
|
|
*/
|
|
export declare const listWorkGroupsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/work-groups";
|
|
/** `ownerName` 是组长姓名的呈现补充,读表时一并带出,免得前端再对一次 id */
|
|
readonly output: z.ZodObject<{
|
|
groups: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
name: z.ZodString;
|
|
ownerId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
members: z.ZodRecord<z.ZodString, z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
ownerName: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 一人一组:按 `ownerId` 落,已有即更新、没有即新建 */
|
|
export declare const saveWorkGroupRoute: {
|
|
readonly method: "PUT";
|
|
readonly path: "/api/gov/work-groups";
|
|
readonly body: z.ZodObject<{
|
|
ownerId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
name: z.ZodString;
|
|
members: z.ZodRecord<z.ZodString, z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
group: z.ZodObject<{
|
|
id: z.ZodString;
|
|
name: z.ZodString;
|
|
ownerId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
members: z.ZodRecord<z.ZodString, z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/**
|
|
* 经安装通道装入活动包 —— **无代码通道**(ADR-004):交的是清单 + .js 产物,都是数据。
|
|
*
|
|
* 安装两审在服务端跑:静态审读清单(工具契约在否、模型名绑没绑、模版有没有脚本、
|
|
* 声明与已物化的台账冲不冲),回放审重演历史(首装无历史即免,以样例集替代)。
|
|
* **恒为新增、版本并存**:装入不覆盖旧版本,在途任务按其启动时版本跑完。
|
|
*/
|
|
export declare const installActivityRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/activities";
|
|
readonly body: z.ZodObject<{
|
|
manifest: z.ZodObject<{
|
|
identity: z.ZodObject<{
|
|
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
|
name: z.ZodString;
|
|
packageVersion: z.ZodString;
|
|
category: z.ZodString;
|
|
paradigm: z.ZodEnum<{
|
|
loop: "loop";
|
|
flow: "flow";
|
|
}>;
|
|
sdkVersion: z.ZodString;
|
|
checksum: z.ZodString;
|
|
signature: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
contract: z.ZodObject<{
|
|
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
|
version: z.ZodString;
|
|
input: z.ZodObject<{
|
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
messageAllowed: z.ZodDefault<z.ZodBoolean>;
|
|
messageHint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
output: z.ZodObject<{
|
|
mandatory: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>>;
|
|
selective: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
group: z.ZodString;
|
|
ports: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>;
|
|
requiredDeliverables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, z.core.$strip>>>;
|
|
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
level: z.ZodEnum<{
|
|
L1: "L1";
|
|
L2: "L2";
|
|
L3: "L3";
|
|
L4: "L4";
|
|
L5: "L5";
|
|
}>;
|
|
predicate: z.ZodOptional<z.ZodString>;
|
|
modelRef: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>>;
|
|
prohibitions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
statement: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
authorization: z.ZodObject<{
|
|
discretion: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
statement: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
preauthorizedActions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
tool: z.ZodString;
|
|
operation: z.ZodString;
|
|
limit: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>>;
|
|
humanCallBudget: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
resources: z.ZodObject<{
|
|
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
version: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>>;
|
|
skills: z.ZodDefault<z.ZodArray<z.core.$ZodBranded<z.ZodString, "SkillId", "out">>>;
|
|
models: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
roles: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
budget: z.ZodObject<{
|
|
steps: z.ZodNumber;
|
|
tokens: z.ZodNumber;
|
|
activeMinutes: z.ZodNumber;
|
|
humanCalls: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
declarations: z.ZodObject<{
|
|
models: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
version: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>>;
|
|
ledger: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
fields: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
type: z.ZodEnum<{
|
|
number: "number";
|
|
boolean: "boolean";
|
|
json: "json";
|
|
text: "text";
|
|
date: "date";
|
|
integer: "integer";
|
|
timestamp: "timestamp";
|
|
}>;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
primaryKey: z.ZodDefault<z.ZodBoolean>;
|
|
masked: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>>;
|
|
listeners: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
origin: z.ZodEnum<{
|
|
static: "static";
|
|
dynamic: "dynamic";
|
|
}>;
|
|
eventType: z.ZodEnum<{
|
|
human: "human";
|
|
data: "data";
|
|
time: "time";
|
|
control: "control";
|
|
}>;
|
|
keyFilter: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
condition: z.ZodOptional<z.ZodString>;
|
|
semantic: z.ZodEnum<{
|
|
observe: "observe";
|
|
"complete-step": "complete-step";
|
|
}>;
|
|
deadline: z.ZodString;
|
|
escalation: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
nudge: "nudge";
|
|
reroute: "reroute";
|
|
escalate: "escalate";
|
|
}>>>;
|
|
}, z.core.$strip>>>;
|
|
harness: z.ZodObject<{
|
|
memoryWindow: z.ZodDefault<z.ZodNumber>;
|
|
stallAfter: z.ZodDefault<z.ZodString>;
|
|
nudge: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
after: z.ZodString;
|
|
action: z.ZodEnum<{
|
|
nudge: "nudge";
|
|
escalate: "escalate";
|
|
}>;
|
|
}, z.core.$strip>>>;
|
|
retry: z.ZodDefault<z.ZodObject<{
|
|
times: z.ZodDefault<z.ZodNumber>;
|
|
backoff: z.ZodDefault<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
assets: z.ZodObject<{
|
|
businessModel: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
paradigm: z.ZodLiteral<"loop">;
|
|
cmmnXml: z.ZodString;
|
|
narrative: z.ZodString;
|
|
dmn: z.ZodObject<{
|
|
drd: z.ZodArray<z.ZodObject<{
|
|
decision: z.ZodString;
|
|
requires: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
inputs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>>;
|
|
tables: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
label: z.ZodString;
|
|
hitPolicy: z.ZodDefault<z.ZodEnum<{
|
|
UNIQUE: "UNIQUE";
|
|
FIRST: "FIRST";
|
|
PRIORITY: "PRIORITY";
|
|
COLLECT: "COLLECT";
|
|
}>>;
|
|
inputs: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
expression: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
outputs: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
rules: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
when: z.ZodArray<z.ZodString>;
|
|
then: z.ZodArray<z.ZodUnknown>;
|
|
annotation: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
paradigm: z.ZodLiteral<"flow">;
|
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"tool">;
|
|
tool: z.ZodString;
|
|
name: z.ZodString;
|
|
label: z.ZodString;
|
|
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
output: z.ZodOptional<z.ZodObject<{
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
when: z.ZodOptional<z.ZodString>;
|
|
view: z.ZodOptional<z.ZodString>;
|
|
failure: z.ZodObject<{
|
|
retry: z.ZodObject<{
|
|
times: z.ZodNumber;
|
|
backoff: z.ZodString;
|
|
}, z.core.$strip>;
|
|
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"human">;
|
|
workOrder: z.ZodEnum<{
|
|
execution: "execution";
|
|
acceptance: "acceptance";
|
|
}>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"blocked">;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"llm">;
|
|
model: z.ZodString;
|
|
template: z.ZodString;
|
|
outputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
name: z.ZodString;
|
|
label: z.ZodString;
|
|
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
output: z.ZodOptional<z.ZodObject<{
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
when: z.ZodOptional<z.ZodString>;
|
|
view: z.ZodOptional<z.ZodString>;
|
|
failure: z.ZodObject<{
|
|
retry: z.ZodObject<{
|
|
times: z.ZodNumber;
|
|
backoff: z.ZodString;
|
|
}, z.core.$strip>;
|
|
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"human">;
|
|
workOrder: z.ZodEnum<{
|
|
execution: "execution";
|
|
acceptance: "acceptance";
|
|
}>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"blocked">;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"human">;
|
|
workOrder: z.ZodEnum<{
|
|
execution: "execution";
|
|
acceptance: "acceptance";
|
|
}>;
|
|
card: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
deadline: z.ZodString;
|
|
name: z.ZodString;
|
|
label: z.ZodString;
|
|
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
output: z.ZodOptional<z.ZodObject<{
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
when: z.ZodOptional<z.ZodString>;
|
|
view: z.ZodOptional<z.ZodString>;
|
|
failure: z.ZodObject<{
|
|
retry: z.ZodObject<{
|
|
times: z.ZodNumber;
|
|
backoff: z.ZodString;
|
|
}, z.core.$strip>;
|
|
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"human">;
|
|
workOrder: z.ZodEnum<{
|
|
execution: "execution";
|
|
acceptance: "acceptance";
|
|
}>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"blocked">;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pure-tool">;
|
|
tool: z.ZodString;
|
|
name: z.ZodString;
|
|
label: z.ZodString;
|
|
input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
output: z.ZodOptional<z.ZodObject<{
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
key: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
fields: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
when: z.ZodOptional<z.ZodString>;
|
|
view: z.ZodOptional<z.ZodString>;
|
|
failure: z.ZodObject<{
|
|
retry: z.ZodObject<{
|
|
times: z.ZodNumber;
|
|
backoff: z.ZodString;
|
|
}, z.core.$strip>;
|
|
fallback: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"human">;
|
|
workOrder: z.ZodEnum<{
|
|
execution: "execution";
|
|
acceptance: "acceptance";
|
|
}>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"blocked">;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>], "kind">>;
|
|
parallelGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
steps: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>], "paradigm">;
|
|
skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "SkillId", "out">;
|
|
label: z.ZodString;
|
|
applicability: z.ZodString;
|
|
method: z.ZodString;
|
|
crystallized: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
tool: z.ZodString;
|
|
input: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
}, z.core.$strip>>>;
|
|
knowledgeRefs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
version: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
viewTemplates: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
html: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
cardSchemas: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
distillHooks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
on: z.ZodEnum<{
|
|
terminal: "terminal";
|
|
milestone: "milestone";
|
|
}>;
|
|
milestone: z.ZodOptional<z.ZodString>;
|
|
prompt: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>;
|
|
samples: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
expect: z.ZodObject<{
|
|
ports: z.ZodArray<z.ZodString>;
|
|
payloadShape: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>>;
|
|
entry: z.ZodObject<{
|
|
file: z.ZodString;
|
|
checksum: z.ZodString;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
artifact: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
accepted: z.ZodBoolean;
|
|
activityId: z.ZodString;
|
|
packageVersion: z.ZodString;
|
|
staticFindings: z.ZodArray<z.ZodObject<{
|
|
code: z.ZodString;
|
|
severity: z.ZodString;
|
|
message: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
replay: z.ZodObject<{
|
|
oldPassStillPass: z.ZodBoolean;
|
|
checked: z.ZodNumber;
|
|
skippedNoHistory: z.ZodBoolean;
|
|
regressions: z.ZodArray<z.ZodObject<{
|
|
taskId: z.ZodString;
|
|
detail: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/**
|
|
* 导入自定义工具 —— 与第一方工具走**同一条门**:静态审 + 试运行审。
|
|
*
|
|
* 工具承载权力,约束严于活动包:契约对活动、实现对系统、凭证对治理台(OS 7.3)。
|
|
* 连接配置**只声明键**;值随本次导入送到治理台加密落库,此后只读得到「是否已绑定」。
|
|
*/
|
|
export declare const registerToolRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/gov/tools";
|
|
readonly body: z.ZodObject<{
|
|
contract: z.ZodObject<{
|
|
name: z.ZodString;
|
|
version: z.ZodString;
|
|
description: z.ZodString;
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
effect: z.ZodEnum<{
|
|
read: "read";
|
|
write: "write";
|
|
}>;
|
|
errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
code: z.ZodString;
|
|
retryable: z.ZodBoolean;
|
|
message: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
idempotent: z.ZodDefault<z.ZodBoolean>;
|
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
retries: z.ZodDefault<z.ZodNumber>;
|
|
connectionKeys: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>;
|
|
connectionValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
samples: z.ZodArray<z.ZodObject<{
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
accepted: z.ZodBoolean;
|
|
findings: z.ZodArray<z.ZodObject<{
|
|
code: z.ZodString;
|
|
severity: z.ZodString;
|
|
message: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
trialRun: z.ZodObject<{
|
|
ran: z.ZodNumber;
|
|
passed: z.ZodNumber;
|
|
failures: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listActivitiesRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/activities";
|
|
readonly output: z.ZodObject<{
|
|
activities: z.ZodArray<z.ZodObject<{
|
|
activityId: z.ZodString;
|
|
name: z.ZodString;
|
|
category: z.ZodString;
|
|
paradigm: z.ZodEnum<{
|
|
loop: "loop";
|
|
flow: "flow";
|
|
}>;
|
|
enabled: z.ZodBoolean;
|
|
packageVersions: z.ZodArray<z.ZodObject<{
|
|
version: z.ZodString;
|
|
state: z.ZodString;
|
|
installedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
assetVersions: z.ZodArray<z.ZodObject<{
|
|
kind: z.ZodString;
|
|
version: z.ZodNumber;
|
|
effective: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
contract: z.ZodObject<{
|
|
requiredInputs: z.ZodArray<z.ZodString>;
|
|
inputFields: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
type: z.ZodString;
|
|
required: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
outputPorts: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
fields: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
tools: z.ZodArray<z.ZodString>;
|
|
models: z.ZodArray<z.ZodString>;
|
|
objects: z.ZodArray<z.ZodString>;
|
|
roles: z.ZodArray<z.ZodString>;
|
|
humanCallBudget: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listToolsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/tools";
|
|
readonly output: z.ZodObject<{
|
|
tools: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
version: z.ZodString;
|
|
description: z.ZodString;
|
|
effect: z.ZodEnum<{
|
|
read: "read";
|
|
write: "write";
|
|
}>;
|
|
pure: z.ZodBoolean;
|
|
connectionKeys: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listLedgerObjectsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/data/objects";
|
|
/** `label` 是人读名(落在表注释上);缺省即没登记,呈现退回对象键 */
|
|
readonly output: z.ZodObject<{
|
|
objects: z.ZodArray<z.ZodObject<{
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const browseLedgerRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/data/:domain/:object";
|
|
readonly params: z.ZodObject<{
|
|
domain: z.ZodString;
|
|
object: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
label: z.ZodOptional<z.ZodString>;
|
|
columns: z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
type: z.ZodString;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
primaryKey: z.ZodArray<z.ZodString>;
|
|
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
total: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listActivityMemoryRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/memory/:activityId";
|
|
readonly params: z.ZodObject<{
|
|
activityId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
entries: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
layer: z.ZodString;
|
|
statement: z.ZodString;
|
|
evidenceCount: z.ZodNumber;
|
|
incrementState: z.ZodOptional<z.ZodString>;
|
|
createdAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 通道配置里本就没有凭证字段(凭证只在治理台的连接配置中,ADR-009);此处整体可回 */
|
|
export declare const listChannelsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/channels";
|
|
readonly output: z.ZodObject<{
|
|
channels: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
name: z.ZodString;
|
|
kind: z.ZodEnum<{
|
|
mail: "mail";
|
|
im: "im";
|
|
}>;
|
|
address: z.ZodString;
|
|
enabled: z.ZodBoolean;
|
|
extractCount: z.ZodNumber;
|
|
mappingCount: z.ZodNumber;
|
|
fallbackPosition: z.ZodOptional<z.ZodString>;
|
|
addressWindowMs: z.ZodNumber;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 审批单不是任务:没有预算、没有任务日志,只有批不批(卡在审批人工位的验收工单) */
|
|
export declare const listApprovalsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/approvals";
|
|
readonly output: z.ZodObject<{
|
|
approvals: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
workflowId: z.ZodString;
|
|
workflowSubject: z.ZodString;
|
|
title: z.ZodString;
|
|
approverName: z.ZodString;
|
|
approverPosition: z.ZodString;
|
|
state: z.ZodEnum<{
|
|
pending: "pending";
|
|
rejected: "rejected";
|
|
passed: "passed";
|
|
}>;
|
|
issuedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const govWorkflowRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/workflows/:id";
|
|
readonly params: z.ZodObject<{
|
|
id: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
workflow: z.ZodObject<{
|
|
id: z.ZodString;
|
|
subject: z.ZodString;
|
|
state: z.ZodEnum<{
|
|
terminated: "terminated";
|
|
running: "running";
|
|
waiting: "waiting";
|
|
completed: "completed";
|
|
abnormal: "abnormal";
|
|
}>;
|
|
packageId: z.ZodString;
|
|
packageVersion: z.ZodNumber;
|
|
source: z.ZodObject<{
|
|
kind: z.ZodString;
|
|
ref: z.ZodString;
|
|
by: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
startedAt: z.ZodString;
|
|
finishedAt: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
pkg: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
|
|
name: z.ZodString;
|
|
version: z.ZodNumber;
|
|
state: z.ZodEnum<{
|
|
draft: "draft";
|
|
published: "published";
|
|
retired: "retired";
|
|
}>;
|
|
callInterface: z.ZodObject<{
|
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"start">;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"end">;
|
|
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"activity">;
|
|
activityId: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
|
|
in: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
out: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
activityVersion: z.ZodOptional<z.ZodString>;
|
|
owner: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
failure: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"reroute">;
|
|
edgeId: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"escalate">;
|
|
approvalNodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"tolerate">;
|
|
}, z.core.$strip>], "kind">>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"approval">;
|
|
approver: z.ZodObject<{
|
|
position: z.ZodString;
|
|
strategy: z.ZodDefault<z.ZodEnum<{
|
|
assigned: "assigned";
|
|
sole: "sole";
|
|
rotation: "rotation";
|
|
"follow-source": "follow-source";
|
|
}>>;
|
|
staffId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
reject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"reopen">;
|
|
nodeId: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"terminate">;
|
|
}, z.core.$strip>], "kind">;
|
|
nudge: z.ZodOptional<z.ZodObject<{
|
|
deadline: z.ZodString;
|
|
steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
after: z.ZodString;
|
|
action: z.ZodEnum<{
|
|
nudge: "nudge";
|
|
escalate: "escalate";
|
|
}>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>>;
|
|
message: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"gateway">;
|
|
gateway: z.ZodEnum<{
|
|
parallel: "parallel";
|
|
exclusive: "exclusive";
|
|
}>;
|
|
mode: z.ZodEnum<{
|
|
join: "join";
|
|
fork: "fork";
|
|
}>;
|
|
basis: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
label: z.ZodString;
|
|
sub: z.ZodOptional<z.ZodString>;
|
|
layout: z.ZodOptional<z.ZodObject<{
|
|
row: z.ZodNumber;
|
|
col: z.ZodNumber;
|
|
x: z.ZodOptional<z.ZodNumber>;
|
|
y: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "kind">>;
|
|
edges: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
from: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
to: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
|
|
condition: z.ZodOptional<z.ZodString>;
|
|
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
target: z.ZodString;
|
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
from: z.ZodLiteral<"output-port">;
|
|
port: z.ZodString;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"workflow-var">;
|
|
name: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"initiation">;
|
|
path: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"constant">;
|
|
value: z.ZodUnknown;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
from: z.ZodLiteral<"expression">;
|
|
sfeel: z.ZodString;
|
|
}, z.core.$strip>], "from">;
|
|
}, z.core.$strip>>>;
|
|
label: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
bad: "bad";
|
|
}>>;
|
|
reopen: z.ZodDefault<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>>>;
|
|
description: z.ZodOptional<z.ZodString>;
|
|
diagram: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
}, z.core.$strip>;
|
|
instances: z.ZodArray<z.ZodObject<{
|
|
nodeId: z.ZodString;
|
|
instance: z.ZodNumber;
|
|
running: z.ZodBoolean;
|
|
waiting: z.ZodBoolean;
|
|
activated: z.ZodBoolean;
|
|
terminal: z.ZodOptional<z.ZodEnum<{
|
|
released: "released";
|
|
blocked: "blocked";
|
|
stalled: "stalled";
|
|
exhausted: "exhausted";
|
|
terminated: "terminated";
|
|
}>>;
|
|
}, z.core.$strip>>;
|
|
tasks: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
nodeId: z.ZodString;
|
|
title: z.ZodString;
|
|
ownerName: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/**
|
|
* 度量八指标(OS 8.3)—— 运营驾驶舱的仪表读数。
|
|
*
|
|
* 出参直接复用 `reportMetricsSchema`:**与工作台汇报同源同口径**。
|
|
* 治理台若另算一套,同一个组织会读出两个自主率 —— 那时候争的就不是数,是谁的表准。
|
|
* 自主率与纠正率**成对读**,复合为有效自主率 —— 单看自主率会奖励「猛冲后返工」。
|
|
*/
|
|
export declare const govMetricsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/gov/metrics";
|
|
/** 统计窗口 —— 不传按月;驾驶舱可切日/周/月/年 */
|
|
readonly query: z.ZodObject<{
|
|
period: z.ZodOptional<z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>>;
|
|
}, z.core.$strip>;
|
|
/** `period` 原样回声:客户端不传时,由它知道服务端用的是哪个窗口 */
|
|
readonly output: z.ZodObject<{
|
|
autonomy: z.ZodNumber;
|
|
correction: z.ZodNumber;
|
|
effectiveAutonomy: z.ZodNumber;
|
|
interruption: z.ZodNumber;
|
|
breakpoint: z.ZodNumber;
|
|
dmnCoverage: z.ZodNumber;
|
|
unitCost: z.ZodObject<{
|
|
tokens: z.ZodNumber;
|
|
minutes: z.ZodNumber;
|
|
humanCalls: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
terminalMix: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
taskCount: z.ZodNumber;
|
|
period: z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export type GovTasksOutput = z.infer<typeof listGovTasksRoute.output>;
|
|
export type GovWorkGroupsOutput = z.infer<typeof listWorkGroupsRoute.output>;
|
|
export type GovApprovalsOutput = z.infer<typeof listApprovalsRoute.output>;
|
|
export type GovStaffOutput = z.infer<typeof listStaffRoute.output>;
|
|
export type GovGrantsOutput = z.infer<typeof listGrantsRoute.output>;
|
|
export type GovPackagesOutput = z.infer<typeof listProcessPackagesRoute.output>;
|
|
export type GovTriggersOutput = z.infer<typeof listTriggersRoute.output>;
|
|
export type GovActivitiesOutput = z.infer<typeof listActivitiesRoute.output>;
|
|
export type GovToolsOutput = z.infer<typeof listToolsRoute.output>;
|
|
export type GovObjectsOutput = z.infer<typeof listLedgerObjectsRoute.output>;
|
|
export type GovLedgerPageOutput = z.infer<typeof browseLedgerRoute.output>;
|
|
export type GovMemoryOutput = z.infer<typeof listActivityMemoryRoute.output>;
|
|
export type GovMetricsOutput = z.infer<typeof govMetricsRoute.output>;
|
|
export type GovChannelsOutput = z.infer<typeof listChannelsRoute.output>;
|
|
export type GovLlmOutput = z.infer<typeof listLlmInstancesRoute.output>;
|
|
export type GovWorkflowOutput = z.infer<typeof govWorkflowRoute.output>;
|
|
export type GovTaskLogOutput = z.infer<typeof govTaskLogRoute.output>;
|