forked from ChaiHao/BPOS-MVP
「flow:按**步序位置**推送声明的模版」(AM 07)。原先这条链只有写面没有读面,
活动的 viewTemplates 是一行占位字符串,工作台视图区永远只显示一份硬编码概览。
补齐整条链:
· 步声明新增 `view`:这一步呈现哪张模版 —— 推什么由声明给定,不由临场决定。
· 新增模版填数的纯函数(interaction/domain):`data-slot` 取值、`data-rows` 逐条展开。
**填数只做取值与转义**,没有表达式、没有分支、没有循环 —— 一旦模版能算,
它就成了代码,容器的「无脚本执行权」也就形同虚设。填充**消费槽位**,
交出去的是干净 HTML,不是带模板属性的半成品。
· interaction 补读面 `viewOf`;desk 路由把推送的 HTML 交给前端;
ViewRegion 经 `@ui` 的 ViewContainer(sandbox="" 的 iframe)渲染 —— feature 不碰 innerHTML。
· A1 写了三张真模版(事态全景 / 打标判据 / 成果预览),内联自带样式
(沙箱页面不继承工作台 CSS),按步序位置挂在 S3 / S5 / S6 上。
沿路两处修:
① 取值路径遇到**本身带点号的键**(台账地址 `域.对象`)会被拆成两级、永远取不到。
改为整键优先、找不到再下行;`view-render` 与 `step-sequence` 两处同修。
② 「本单交付」不能画成台账全表:任务视图是正式版 + 我的草稿的合并结果,
直接拿来列会把**别单**放行过的记录一并列出。本单自己写下的行单独放在
`mine:域.对象` 下(整键,取值不歧义)。
另:视图推送失败原先静默吞掉 —— 会让「视图区一直空着」变成查不出原因的怪事;
改为留痕(仍不影响步序推进,呈现是投影)。
实测:一封 RFQ 入站 → 放行前那一屏列出本单交付 LM358DR / TI / 12000 / 8.2 / 10周,
以及 Type A「直接快答」的分类结论与四项打标判据。
gates: tsc / eslint / depcruise(321 模块)/ api-report / 423 测试 全绿
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
2585 lines
100 KiB
TypeScript
2585 lines
100 KiB
TypeScript
/**
|
|
* 工作台路由契约(编码规范 §8.1 / §9.1)。
|
|
* 工作台五要素:任务 / 审批 / 消息 / 纪要 / 汇报 —— 同一份过程事实的五种投影。
|
|
*/
|
|
import { z } from 'zod';
|
|
export declare const sessionRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/session";
|
|
readonly output: z.ZodObject<{
|
|
staff: 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>;
|
|
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>;
|
|
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 healthRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/health";
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
version: z.ZodString;
|
|
db: z.ZodEnum<{
|
|
up: "up";
|
|
down: "down";
|
|
}>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 任务卡 —— 清单里一条 = 一个活动的一次运行,不是一整条工作流 */
|
|
export declare const taskCardSchema: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
activity: z.ZodString;
|
|
title: 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";
|
|
}>>;
|
|
position: z.ZodNumber;
|
|
total: z.ZodNumber;
|
|
workflowSubject: z.ZodString;
|
|
workflowState: z.ZodEnum<{
|
|
terminated: "terminated";
|
|
running: "running";
|
|
waiting: "waiting";
|
|
completed: "completed";
|
|
abnormal: "abnormal";
|
|
}>;
|
|
startedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
export type TaskCard = z.infer<typeof taskCardSchema>;
|
|
export declare const listTasksRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/desk/tasks";
|
|
readonly output: z.ZodObject<{
|
|
tasks: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
activity: z.ZodString;
|
|
title: 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";
|
|
}>>;
|
|
position: z.ZodNumber;
|
|
total: z.ZodNumber;
|
|
workflowSubject: z.ZodString;
|
|
workflowState: z.ZodEnum<{
|
|
terminated: "terminated";
|
|
running: "running";
|
|
waiting: "waiting";
|
|
completed: "completed";
|
|
abnormal: "abnormal";
|
|
}>;
|
|
startedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 任务详情 —— 工作区与对话区的服务端投影(前端零过程状态,刷新即重建) */
|
|
export declare const taskDetailSchema: z.ZodObject<{
|
|
card: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
activity: z.ZodString;
|
|
title: 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";
|
|
}>>;
|
|
position: z.ZodNumber;
|
|
total: z.ZodNumber;
|
|
workflowSubject: z.ZodString;
|
|
workflowState: z.ZodEnum<{
|
|
terminated: "terminated";
|
|
running: "running";
|
|
waiting: "waiting";
|
|
completed: "completed";
|
|
abnormal: "abnormal";
|
|
}>;
|
|
startedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
goal: z.ZodString;
|
|
budget: z.ZodObject<{
|
|
steps: z.ZodString;
|
|
tokens: z.ZodString;
|
|
activeMinutes: z.ZodString;
|
|
humanCalls: z.ZodString;
|
|
}, z.core.$strip>;
|
|
stages: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "StageId", "out">;
|
|
label: z.ZodString;
|
|
round: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
deliverables: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
|
|
stage: z.core.$ZodBranded<z.ZodString, "StageId", "out">;
|
|
round: z.ZodOptional<z.ZodNumber>;
|
|
title: z.ZodString;
|
|
desc: z.ZodOptional<z.ZodString>;
|
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
t: z.ZodLiteral<"callout">;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"kv">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
fromItem: z.ZodOptional<z.ZodObject<{
|
|
item: z.ZodString;
|
|
field: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"badges">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
on: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"table">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
cols: z.ZodArray<z.ZodString>;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
linkDonut: z.ZodOptional<z.ZodObject<{
|
|
col: z.ZodNumber;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
map: z.ZodArray<z.ZodObject<{
|
|
match: z.ZodString;
|
|
label: z.ZodString;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"bars">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
max: z.ZodOptional<z.ZodNumber>;
|
|
redline: z.ZodOptional<z.ZodNumber>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
text: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"donut">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"mail">;
|
|
dir: z.ZodEnum<{
|
|
out: "out";
|
|
in: "in";
|
|
}>;
|
|
statusLabel: z.ZodOptional<z.ZodString>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
from: z.ZodString;
|
|
fromAddr: z.ZodOptional<z.ZodString>;
|
|
to: z.ZodString;
|
|
cc: z.ZodOptional<z.ZodString>;
|
|
subject: z.ZodString;
|
|
time: z.ZodString;
|
|
body: z.ZodString;
|
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
meta: z.ZodOptional<z.ZodString>;
|
|
file: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"cards">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
tag: z.ZodString;
|
|
icon: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
title: z.ZodString;
|
|
code: z.ZodOptional<z.ZodString>;
|
|
swap: z.ZodOptional<z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
big: z.ZodString;
|
|
bigLabel: z.ZodOptional<z.ZodString>;
|
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
from: z.ZodOptional<z.ZodString>;
|
|
time: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"waiting">;
|
|
label: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"files">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
desc: z.ZodString;
|
|
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "t">>;
|
|
state: z.ZodEnum<{
|
|
released: "released";
|
|
draft: "draft";
|
|
"pending-acceptance": "pending-acceptance";
|
|
rejected: "rejected";
|
|
}>;
|
|
at: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
workOrders: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
mode: z.ZodLiteral<"execution">;
|
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
"landing-failure": "landing-failure";
|
|
}>>;
|
|
ask: z.ZodString;
|
|
standard: z.ZodOptional<z.ZodString>;
|
|
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
basedOn: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">>;
|
|
blocks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
t: z.ZodLiteral<"callout">;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"kv">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
fromItem: z.ZodOptional<z.ZodObject<{
|
|
item: z.ZodString;
|
|
field: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"badges">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
on: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"table">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
cols: z.ZodArray<z.ZodString>;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
linkDonut: z.ZodOptional<z.ZodObject<{
|
|
col: z.ZodNumber;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
map: z.ZodArray<z.ZodObject<{
|
|
match: z.ZodString;
|
|
label: z.ZodString;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"bars">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
max: z.ZodOptional<z.ZodNumber>;
|
|
redline: z.ZodOptional<z.ZodNumber>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
text: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"donut">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"mail">;
|
|
dir: z.ZodEnum<{
|
|
out: "out";
|
|
in: "in";
|
|
}>;
|
|
statusLabel: z.ZodOptional<z.ZodString>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
from: z.ZodString;
|
|
fromAddr: z.ZodOptional<z.ZodString>;
|
|
to: z.ZodString;
|
|
cc: z.ZodOptional<z.ZodString>;
|
|
subject: z.ZodString;
|
|
time: z.ZodString;
|
|
body: z.ZodString;
|
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
meta: z.ZodOptional<z.ZodString>;
|
|
file: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"cards">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
tag: z.ZodString;
|
|
icon: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
title: z.ZodString;
|
|
code: z.ZodOptional<z.ZodString>;
|
|
swap: z.ZodOptional<z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
big: z.ZodString;
|
|
bigLabel: z.ZodOptional<z.ZodString>;
|
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
from: z.ZodOptional<z.ZodString>;
|
|
time: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"waiting">;
|
|
label: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"files">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
desc: z.ZodString;
|
|
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "t">>>;
|
|
fields: z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
kind: z.ZodEnum<{
|
|
number: "number";
|
|
file: "file";
|
|
text: "text";
|
|
check: "check";
|
|
date: "date";
|
|
textarea: "textarea";
|
|
radio: "radio";
|
|
select: "select";
|
|
money: "money";
|
|
}>;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
negative: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>>;
|
|
group: z.ZodOptional<z.ZodString>;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
ai: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
}, z.core.$strip>>;
|
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
|
|
at: z.ZodISODateTime;
|
|
title: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
result: z.ZodString;
|
|
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
mode: z.ZodLiteral<"acceptance">;
|
|
deliverable: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
|
|
criteria: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
level: z.ZodEnum<{
|
|
L1: "L1";
|
|
L2: "L2";
|
|
L3: "L3";
|
|
L4: "L4";
|
|
L5: "L5";
|
|
}>;
|
|
pass: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
effect: z.ZodEnum<{
|
|
read: "read";
|
|
write: "write";
|
|
}>;
|
|
detail: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
kind: z.ZodEnum<{
|
|
number: "number";
|
|
file: "file";
|
|
text: "text";
|
|
check: "check";
|
|
date: "date";
|
|
textarea: "textarea";
|
|
radio: "radio";
|
|
select: "select";
|
|
money: "money";
|
|
}>;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
negative: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>>;
|
|
group: z.ZodOptional<z.ZodString>;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
ai: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
}, z.core.$strip>>>;
|
|
passLabel: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
|
|
at: z.ZodISODateTime;
|
|
title: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
result: z.ZodString;
|
|
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "mode">>;
|
|
chat: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
k: z.ZodLiteral<"ai">;
|
|
text: z.ZodString;
|
|
tag: z.ZodOptional<z.ZodEnum<{
|
|
conclusion: "conclusion";
|
|
guidance: "guidance";
|
|
criterion: "criterion";
|
|
}>>;
|
|
ref: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"human">;
|
|
text: z.ZodString;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"system">;
|
|
type: z.ZodEnum<{
|
|
human: "human";
|
|
data: "data";
|
|
time: "time";
|
|
control: "control";
|
|
}>;
|
|
text: z.ZodString;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"decision">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
recommend: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
detail: z.ZodOptional<z.ZodString>;
|
|
consequence: z.ZodOptional<z.ZodString>;
|
|
recommended: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
allowCustom: z.ZodDefault<z.ZodBoolean>;
|
|
chosen: z.ZodOptional<z.ZodObject<{
|
|
value: z.ZodString;
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"elicitation">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
fields: z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
reason: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"rating">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
score: z.ZodNumber;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>], "k">>;
|
|
view: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
t: z.ZodLiteral<"callout">;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"kv">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
fromItem: z.ZodOptional<z.ZodObject<{
|
|
item: z.ZodString;
|
|
field: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"badges">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
on: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"table">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
cols: z.ZodArray<z.ZodString>;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
linkDonut: z.ZodOptional<z.ZodObject<{
|
|
col: z.ZodNumber;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
map: z.ZodArray<z.ZodObject<{
|
|
match: z.ZodString;
|
|
label: z.ZodString;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"bars">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
max: z.ZodOptional<z.ZodNumber>;
|
|
redline: z.ZodOptional<z.ZodNumber>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
text: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"donut">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"mail">;
|
|
dir: z.ZodEnum<{
|
|
out: "out";
|
|
in: "in";
|
|
}>;
|
|
statusLabel: z.ZodOptional<z.ZodString>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
from: z.ZodString;
|
|
fromAddr: z.ZodOptional<z.ZodString>;
|
|
to: z.ZodString;
|
|
cc: z.ZodOptional<z.ZodString>;
|
|
subject: z.ZodString;
|
|
time: z.ZodString;
|
|
body: z.ZodString;
|
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
meta: z.ZodOptional<z.ZodString>;
|
|
file: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"cards">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
tag: z.ZodString;
|
|
icon: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
title: z.ZodString;
|
|
code: z.ZodOptional<z.ZodString>;
|
|
swap: z.ZodOptional<z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
big: z.ZodString;
|
|
bigLabel: z.ZodOptional<z.ZodString>;
|
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
from: z.ZodOptional<z.ZodString>;
|
|
time: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"waiting">;
|
|
label: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"files">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
desc: z.ZodString;
|
|
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "t">>;
|
|
viewHtml: z.ZodOptional<z.ZodString>;
|
|
log: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
at: z.ZodString;
|
|
side: z.ZodEnum<{
|
|
machine: "machine";
|
|
human: "human";
|
|
"human-verdict": "human-verdict";
|
|
"world-wait": "world-wait";
|
|
}>;
|
|
sideLabel: z.ZodString;
|
|
title: z.ZodString;
|
|
summary: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export type TaskDetail = z.infer<typeof taskDetailSchema>;
|
|
export declare const taskDetailRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/desk/tasks/:taskId";
|
|
readonly params: z.ZodObject<{
|
|
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
card: z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
activity: z.ZodString;
|
|
title: 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";
|
|
}>>;
|
|
position: z.ZodNumber;
|
|
total: z.ZodNumber;
|
|
workflowSubject: z.ZodString;
|
|
workflowState: z.ZodEnum<{
|
|
terminated: "terminated";
|
|
running: "running";
|
|
waiting: "waiting";
|
|
completed: "completed";
|
|
abnormal: "abnormal";
|
|
}>;
|
|
startedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
goal: z.ZodString;
|
|
budget: z.ZodObject<{
|
|
steps: z.ZodString;
|
|
tokens: z.ZodString;
|
|
activeMinutes: z.ZodString;
|
|
humanCalls: z.ZodString;
|
|
}, z.core.$strip>;
|
|
stages: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "StageId", "out">;
|
|
label: z.ZodString;
|
|
round: z.ZodOptional<z.ZodNumber>;
|
|
}, z.core.$strip>>;
|
|
deliverables: z.ZodArray<z.ZodObject<{
|
|
id: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
|
|
stage: z.core.$ZodBranded<z.ZodString, "StageId", "out">;
|
|
round: z.ZodOptional<z.ZodNumber>;
|
|
title: z.ZodString;
|
|
desc: z.ZodOptional<z.ZodString>;
|
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
t: z.ZodLiteral<"callout">;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"kv">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
fromItem: z.ZodOptional<z.ZodObject<{
|
|
item: z.ZodString;
|
|
field: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"badges">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
on: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"table">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
cols: z.ZodArray<z.ZodString>;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
linkDonut: z.ZodOptional<z.ZodObject<{
|
|
col: z.ZodNumber;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
map: z.ZodArray<z.ZodObject<{
|
|
match: z.ZodString;
|
|
label: z.ZodString;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"bars">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
max: z.ZodOptional<z.ZodNumber>;
|
|
redline: z.ZodOptional<z.ZodNumber>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
text: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"donut">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"mail">;
|
|
dir: z.ZodEnum<{
|
|
out: "out";
|
|
in: "in";
|
|
}>;
|
|
statusLabel: z.ZodOptional<z.ZodString>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
from: z.ZodString;
|
|
fromAddr: z.ZodOptional<z.ZodString>;
|
|
to: z.ZodString;
|
|
cc: z.ZodOptional<z.ZodString>;
|
|
subject: z.ZodString;
|
|
time: z.ZodString;
|
|
body: z.ZodString;
|
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
meta: z.ZodOptional<z.ZodString>;
|
|
file: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"cards">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
tag: z.ZodString;
|
|
icon: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
title: z.ZodString;
|
|
code: z.ZodOptional<z.ZodString>;
|
|
swap: z.ZodOptional<z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
big: z.ZodString;
|
|
bigLabel: z.ZodOptional<z.ZodString>;
|
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
from: z.ZodOptional<z.ZodString>;
|
|
time: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"waiting">;
|
|
label: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"files">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
desc: z.ZodString;
|
|
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "t">>;
|
|
state: z.ZodEnum<{
|
|
released: "released";
|
|
draft: "draft";
|
|
"pending-acceptance": "pending-acceptance";
|
|
rejected: "rejected";
|
|
}>;
|
|
at: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
workOrders: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
mode: z.ZodLiteral<"execution">;
|
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
"landing-failure": "landing-failure";
|
|
}>>;
|
|
ask: z.ZodString;
|
|
standard: z.ZodOptional<z.ZodString>;
|
|
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
basedOn: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">>;
|
|
blocks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
t: z.ZodLiteral<"callout">;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"kv">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
fromItem: z.ZodOptional<z.ZodObject<{
|
|
item: z.ZodString;
|
|
field: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"badges">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
on: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"table">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
cols: z.ZodArray<z.ZodString>;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
linkDonut: z.ZodOptional<z.ZodObject<{
|
|
col: z.ZodNumber;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
map: z.ZodArray<z.ZodObject<{
|
|
match: z.ZodString;
|
|
label: z.ZodString;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"bars">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
max: z.ZodOptional<z.ZodNumber>;
|
|
redline: z.ZodOptional<z.ZodNumber>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
text: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"donut">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"mail">;
|
|
dir: z.ZodEnum<{
|
|
out: "out";
|
|
in: "in";
|
|
}>;
|
|
statusLabel: z.ZodOptional<z.ZodString>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
from: z.ZodString;
|
|
fromAddr: z.ZodOptional<z.ZodString>;
|
|
to: z.ZodString;
|
|
cc: z.ZodOptional<z.ZodString>;
|
|
subject: z.ZodString;
|
|
time: z.ZodString;
|
|
body: z.ZodString;
|
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
meta: z.ZodOptional<z.ZodString>;
|
|
file: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"cards">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
tag: z.ZodString;
|
|
icon: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
title: z.ZodString;
|
|
code: z.ZodOptional<z.ZodString>;
|
|
swap: z.ZodOptional<z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
big: z.ZodString;
|
|
bigLabel: z.ZodOptional<z.ZodString>;
|
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
from: z.ZodOptional<z.ZodString>;
|
|
time: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"waiting">;
|
|
label: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"files">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
desc: z.ZodString;
|
|
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "t">>>;
|
|
fields: z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
kind: z.ZodEnum<{
|
|
number: "number";
|
|
file: "file";
|
|
text: "text";
|
|
check: "check";
|
|
date: "date";
|
|
textarea: "textarea";
|
|
radio: "radio";
|
|
select: "select";
|
|
money: "money";
|
|
}>;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
negative: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>>;
|
|
group: z.ZodOptional<z.ZodString>;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
ai: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
}, z.core.$strip>>;
|
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
|
|
at: z.ZodISODateTime;
|
|
title: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
result: z.ZodString;
|
|
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
mode: z.ZodLiteral<"acceptance">;
|
|
deliverable: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
|
|
criteria: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
level: z.ZodEnum<{
|
|
L1: "L1";
|
|
L2: "L2";
|
|
L3: "L3";
|
|
L4: "L4";
|
|
L5: "L5";
|
|
}>;
|
|
pass: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
effect: z.ZodEnum<{
|
|
read: "read";
|
|
write: "write";
|
|
}>;
|
|
detail: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
kind: z.ZodEnum<{
|
|
number: "number";
|
|
file: "file";
|
|
text: "text";
|
|
check: "check";
|
|
date: "date";
|
|
textarea: "textarea";
|
|
radio: "radio";
|
|
select: "select";
|
|
money: "money";
|
|
}>;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
negative: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>>;
|
|
group: z.ZodOptional<z.ZodString>;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
ai: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
}, z.core.$strip>>>;
|
|
passLabel: z.ZodOptional<z.ZodString>;
|
|
id: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
|
|
at: z.ZodISODateTime;
|
|
title: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
stage: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StageId", "out">>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
result: z.ZodString;
|
|
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "mode">>;
|
|
chat: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
k: z.ZodLiteral<"ai">;
|
|
text: z.ZodString;
|
|
tag: z.ZodOptional<z.ZodEnum<{
|
|
conclusion: "conclusion";
|
|
guidance: "guidance";
|
|
criterion: "criterion";
|
|
}>>;
|
|
ref: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"human">;
|
|
text: z.ZodString;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"system">;
|
|
type: z.ZodEnum<{
|
|
human: "human";
|
|
data: "data";
|
|
time: "time";
|
|
control: "control";
|
|
}>;
|
|
text: z.ZodString;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"decision">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
recommend: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
detail: z.ZodOptional<z.ZodString>;
|
|
consequence: z.ZodOptional<z.ZodString>;
|
|
recommended: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
allowCustom: z.ZodDefault<z.ZodBoolean>;
|
|
chosen: z.ZodOptional<z.ZodObject<{
|
|
value: z.ZodString;
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"elicitation">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
fields: z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
reason: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"rating">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
score: z.ZodNumber;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>], "k">>;
|
|
view: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
t: z.ZodLiteral<"callout">;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"kv">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
fromItem: z.ZodOptional<z.ZodObject<{
|
|
item: z.ZodString;
|
|
field: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"badges">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
on: z.ZodBoolean;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"table">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
cols: z.ZodArray<z.ZodString>;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
editableCols: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
linkDonut: z.ZodOptional<z.ZodObject<{
|
|
col: z.ZodNumber;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
map: z.ZodArray<z.ZodObject<{
|
|
match: z.ZodString;
|
|
label: z.ZodString;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"bars">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
max: z.ZodOptional<z.ZodNumber>;
|
|
redline: z.ZodOptional<z.ZodNumber>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
text: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"donut">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
value: z.ZodNumber;
|
|
tone: z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"mail">;
|
|
dir: z.ZodEnum<{
|
|
out: "out";
|
|
in: "in";
|
|
}>;
|
|
statusLabel: z.ZodOptional<z.ZodString>;
|
|
editable: z.ZodOptional<z.ZodBoolean>;
|
|
from: z.ZodString;
|
|
fromAddr: z.ZodOptional<z.ZodString>;
|
|
to: z.ZodString;
|
|
cc: z.ZodOptional<z.ZodString>;
|
|
subject: z.ZodString;
|
|
time: z.ZodString;
|
|
body: z.ZodString;
|
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
name: z.ZodString;
|
|
meta: z.ZodOptional<z.ZodString>;
|
|
file: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"cards">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
tag: z.ZodString;
|
|
icon: z.ZodOptional<z.ZodString>;
|
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
ok: "ok";
|
|
warn: "warn";
|
|
danger: "danger";
|
|
brand: "brand";
|
|
muted: "muted";
|
|
}>>;
|
|
title: z.ZodString;
|
|
code: z.ZodOptional<z.ZodString>;
|
|
swap: z.ZodOptional<z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
big: z.ZodString;
|
|
bigLabel: z.ZodOptional<z.ZodString>;
|
|
meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
from: z.ZodOptional<z.ZodString>;
|
|
time: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"waiting">;
|
|
label: z.ZodString;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"files">;
|
|
title: z.ZodOptional<z.ZodString>;
|
|
items: z.ZodArray<z.ZodObject<{
|
|
label: z.ZodString;
|
|
desc: z.ZodString;
|
|
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
kind: z.ZodLiteral<"markdown">;
|
|
name: z.ZodString;
|
|
md: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"excel">;
|
|
name: z.ZodString;
|
|
sheet: z.ZodString;
|
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"word">;
|
|
name: z.ZodString;
|
|
blocks: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
t: z.ZodEnum<{
|
|
h1: "h1";
|
|
h2: "h2";
|
|
p: "p";
|
|
}>;
|
|
text: z.ZodString;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
t: z.ZodLiteral<"ul">;
|
|
items: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>]>>;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
kind: z.ZodLiteral<"pdf">;
|
|
name: z.ZodString;
|
|
src: z.ZodString;
|
|
}, z.core.$strip>], "kind">;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>], "t">>;
|
|
viewHtml: z.ZodOptional<z.ZodString>;
|
|
log: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
at: z.ZodString;
|
|
side: z.ZodEnum<{
|
|
machine: "machine";
|
|
human: "human";
|
|
"human-verdict": "human-verdict";
|
|
"world-wait": "world-wait";
|
|
}>;
|
|
sideLabel: z.ZodString;
|
|
title: z.ZodString;
|
|
summary: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 回传工单 —— 与后端回传校验同 schema(§9.2) */
|
|
export declare const replyWorkOrderRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/desk/work-orders/reply";
|
|
readonly body: z.ZodObject<{
|
|
reply: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
producesCompletion: z.ZodBoolean;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 负责人的自由输入 —— 人事件的第二形态 */
|
|
export declare const sayRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/desk/tasks/:taskId/say";
|
|
readonly params: z.ZodObject<{
|
|
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
text: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
k: z.ZodLiteral<"ai">;
|
|
text: z.ZodString;
|
|
tag: z.ZodOptional<z.ZodEnum<{
|
|
conclusion: "conclusion";
|
|
guidance: "guidance";
|
|
criterion: "criterion";
|
|
}>>;
|
|
ref: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"human">;
|
|
text: z.ZodString;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"system">;
|
|
type: z.ZodEnum<{
|
|
human: "human";
|
|
data: "data";
|
|
time: "time";
|
|
control: "control";
|
|
}>;
|
|
text: z.ZodString;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"decision">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
recommend: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
detail: z.ZodOptional<z.ZodString>;
|
|
consequence: z.ZodOptional<z.ZodString>;
|
|
recommended: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>;
|
|
allowCustom: z.ZodDefault<z.ZodBoolean>;
|
|
chosen: z.ZodOptional<z.ZodObject<{
|
|
value: z.ZodString;
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"elicitation">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
fields: z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
reason: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>, z.ZodObject<{
|
|
k: z.ZodLiteral<"rating">;
|
|
ask: z.ZodString;
|
|
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>>;
|
|
done: z.ZodOptional<z.ZodObject<{
|
|
at: z.ZodISODateTime;
|
|
by: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
score: z.ZodNumber;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
|
|
at: z.ZodISODateTime;
|
|
}, z.core.$strip>], "k">;
|
|
};
|
|
/** 消息要素 */
|
|
/** 消息是**信息**,不产生责任;跨任务征答卡以系统消息送达,**就地作答** */
|
|
export declare const systemMessageSchema: z.ZodObject<{
|
|
id: z.ZodString;
|
|
kind: z.ZodString;
|
|
title: z.ZodString;
|
|
body: z.ZodString;
|
|
at: z.ZodString;
|
|
read: z.ZodBoolean;
|
|
card: z.ZodOptional<z.ZodObject<{
|
|
cardId: z.ZodString;
|
|
sourceTaskId: z.ZodString;
|
|
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
kind: z.ZodEnum<{
|
|
number: "number";
|
|
file: "file";
|
|
text: "text";
|
|
check: "check";
|
|
date: "date";
|
|
textarea: "textarea";
|
|
radio: "radio";
|
|
select: "select";
|
|
money: "money";
|
|
}>;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
negative: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>>;
|
|
group: z.ZodOptional<z.ZodString>;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
ai: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
}, z.core.$strip>>>;
|
|
ask: z.ZodDefault<z.ZodString>;
|
|
answered: z.ZodBoolean;
|
|
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
supersededBy: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
export type SystemMessageView = z.infer<typeof systemMessageSchema>;
|
|
export declare const listMessagesRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/desk/messages";
|
|
readonly output: z.ZodObject<{
|
|
messages: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
kind: z.ZodString;
|
|
title: z.ZodString;
|
|
body: z.ZodString;
|
|
at: z.ZodString;
|
|
read: z.ZodBoolean;
|
|
card: z.ZodOptional<z.ZodObject<{
|
|
cardId: z.ZodString;
|
|
sourceTaskId: z.ZodString;
|
|
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
key: z.ZodString;
|
|
label: z.ZodString;
|
|
kind: z.ZodEnum<{
|
|
number: "number";
|
|
file: "file";
|
|
text: "text";
|
|
check: "check";
|
|
date: "date";
|
|
textarea: "textarea";
|
|
radio: "radio";
|
|
select: "select";
|
|
money: "money";
|
|
}>;
|
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
value: z.ZodString;
|
|
label: z.ZodString;
|
|
negative: z.ZodOptional<z.ZodBoolean>;
|
|
}, z.core.$strip>>>;
|
|
group: z.ZodOptional<z.ZodString>;
|
|
hint: z.ZodOptional<z.ZodString>;
|
|
ai: z.ZodOptional<z.ZodString>;
|
|
unit: z.ZodOptional<z.ZodString>;
|
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
cols: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
|
|
}, z.core.$strip>>>;
|
|
ask: z.ZodDefault<z.ZodString>;
|
|
answered: z.ZodBoolean;
|
|
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
supersededBy: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const markMessageReadRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/desk/messages/:messageId/read";
|
|
readonly params: z.ZodObject<{
|
|
messageId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 就地作答 —— 回传经统一入口写回来源任务,调用与回传全程在任务侧留痕 */
|
|
export declare const answerMessageRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/desk/messages/:messageId/answer";
|
|
readonly params: z.ZodObject<{
|
|
messageId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
answer: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
}, z.core.$strip>;
|
|
};
|
|
export type ListMessagesOutput = z.infer<typeof listMessagesRoute.output>;
|
|
export declare const minuteResolutionSchema: z.ZodObject<{
|
|
id: z.ZodString;
|
|
text: z.ZodString;
|
|
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
state: z.ZodEnum<{
|
|
open: "open";
|
|
registered: "registered";
|
|
}>;
|
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
registeredAt: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
export declare const minuteSchema: z.ZodObject<{
|
|
id: z.ZodString;
|
|
title: z.ZodString;
|
|
body: z.ZodString;
|
|
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
authorName: z.ZodString;
|
|
participants: z.ZodArray<z.ZodString>;
|
|
occurredOn: z.ZodString;
|
|
resolutions: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
text: z.ZodString;
|
|
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
state: z.ZodEnum<{
|
|
open: "open";
|
|
registered: "registered";
|
|
}>;
|
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
registeredAt: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
createdAt: z.ZodString;
|
|
updatedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
export type MinuteView = z.infer<typeof minuteSchema>;
|
|
export declare const listMinutesRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/minutes";
|
|
readonly output: z.ZodObject<{
|
|
minutes: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
title: z.ZodString;
|
|
body: z.ZodString;
|
|
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
authorName: z.ZodString;
|
|
participants: z.ZodArray<z.ZodString>;
|
|
occurredOn: z.ZodString;
|
|
resolutions: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
text: z.ZodString;
|
|
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
state: z.ZodEnum<{
|
|
open: "open";
|
|
registered: "registered";
|
|
}>;
|
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
registeredAt: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
createdAt: z.ZodString;
|
|
updatedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const createMinuteRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/minutes";
|
|
readonly body: z.ZodObject<{
|
|
title: z.ZodString;
|
|
body: z.ZodString;
|
|
occurredOn: z.ZodString;
|
|
participants: z.ZodDefault<z.ZodArray<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>>;
|
|
resolutions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
text: z.ZodString;
|
|
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>>>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
id: z.ZodString;
|
|
title: z.ZodString;
|
|
body: z.ZodString;
|
|
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
authorName: z.ZodString;
|
|
participants: z.ZodArray<z.ZodString>;
|
|
occurredOn: z.ZodString;
|
|
resolutions: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
text: z.ZodString;
|
|
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
state: z.ZodEnum<{
|
|
open: "open";
|
|
registered: "registered";
|
|
}>;
|
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
registeredAt: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
createdAt: z.ZodString;
|
|
updatedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const appendResolutionRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/minutes/:minuteId/resolutions";
|
|
readonly params: z.ZodObject<{
|
|
minuteId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
text: z.ZodString;
|
|
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
id: z.ZodString;
|
|
title: z.ZodString;
|
|
body: z.ZodString;
|
|
authorId: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
|
|
authorName: z.ZodString;
|
|
participants: z.ZodArray<z.ZodString>;
|
|
occurredOn: z.ZodString;
|
|
resolutions: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
text: z.ZodString;
|
|
ownerId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
state: z.ZodEnum<{
|
|
open: "open";
|
|
registered: "registered";
|
|
}>;
|
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
registeredById: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "StaffId", "out">>;
|
|
registeredAt: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
createdAt: z.ZodString;
|
|
updatedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 决议 → 登记起单:登记人即来源 */
|
|
export declare const registerResolutionRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/minutes/resolutions/:resolutionId/register";
|
|
readonly params: z.ZodObject<{
|
|
resolutionId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
processPackageId: z.ZodString;
|
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
workflowId: z.ZodString;
|
|
resolutionId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const reportPeriodSchema: z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>;
|
|
export type ReportPeriodName = z.infer<typeof reportPeriodSchema>;
|
|
export declare const REPORT_PERIOD_LABEL: Readonly<Record<ReportPeriodName, string>>;
|
|
export declare const reportMetricsSchema: 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>;
|
|
}, z.core.$strip>;
|
|
export declare const reportSchema: z.ZodObject<{
|
|
id: z.ZodString;
|
|
period: z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>;
|
|
title: z.ZodString;
|
|
window: z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
}, z.core.$strip>;
|
|
sections: z.ZodArray<z.ZodObject<{
|
|
taskId: z.ZodString;
|
|
title: z.ZodString;
|
|
activityId: z.ZodString;
|
|
terminalLabel: z.ZodOptional<z.ZodString>;
|
|
lines: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
metrics: 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>;
|
|
}, z.core.$strip>;
|
|
counts: z.ZodObject<{
|
|
touched: z.ZodNumber;
|
|
released: z.ZodNumber;
|
|
logLines: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
submittedAt: z.ZodOptional<z.ZodString>;
|
|
generatedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
export type ReportView = z.infer<typeof reportSchema>;
|
|
/** 未提交的草案每次取回都重算 —— 汇报是投影,不是账本 */
|
|
export declare const draftReportRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/reports/:period";
|
|
readonly params: z.ZodObject<{
|
|
period: z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
id: z.ZodString;
|
|
period: z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>;
|
|
title: z.ZodString;
|
|
window: z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
}, z.core.$strip>;
|
|
sections: z.ZodArray<z.ZodObject<{
|
|
taskId: z.ZodString;
|
|
title: z.ZodString;
|
|
activityId: z.ZodString;
|
|
terminalLabel: z.ZodOptional<z.ZodString>;
|
|
lines: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
metrics: 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>;
|
|
}, z.core.$strip>;
|
|
counts: z.ZodObject<{
|
|
touched: z.ZodNumber;
|
|
released: z.ZodNumber;
|
|
logLines: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
submittedAt: z.ZodOptional<z.ZodString>;
|
|
generatedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
};
|
|
export declare const listReportsRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/reports";
|
|
readonly output: z.ZodObject<{
|
|
reports: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
period: z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>;
|
|
title: z.ZodString;
|
|
window: z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
}, z.core.$strip>;
|
|
sections: z.ZodArray<z.ZodObject<{
|
|
taskId: z.ZodString;
|
|
title: z.ZodString;
|
|
activityId: z.ZodString;
|
|
terminalLabel: z.ZodOptional<z.ZodString>;
|
|
lines: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
metrics: 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>;
|
|
}, z.core.$strip>;
|
|
counts: z.ZodObject<{
|
|
touched: z.ZodNumber;
|
|
released: z.ZodNumber;
|
|
logLines: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
submittedAt: z.ZodOptional<z.ZodString>;
|
|
generatedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 确认即提交,提交后不再改 */
|
|
export declare const submitReportRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/reports/:reportId/submit";
|
|
readonly params: z.ZodObject<{
|
|
reportId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
note: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
id: z.ZodString;
|
|
period: z.ZodEnum<{
|
|
day: "day";
|
|
week: "week";
|
|
month: "month";
|
|
year: "year";
|
|
}>;
|
|
title: z.ZodString;
|
|
window: z.ZodObject<{
|
|
from: z.ZodString;
|
|
to: z.ZodString;
|
|
}, z.core.$strip>;
|
|
sections: z.ZodArray<z.ZodObject<{
|
|
taskId: z.ZodString;
|
|
title: z.ZodString;
|
|
activityId: z.ZodString;
|
|
terminalLabel: z.ZodOptional<z.ZodString>;
|
|
lines: z.ZodArray<z.ZodString>;
|
|
}, z.core.$strip>>;
|
|
metrics: 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>;
|
|
}, z.core.$strip>;
|
|
counts: z.ZodObject<{
|
|
touched: z.ZodNumber;
|
|
released: z.ZodNumber;
|
|
logLines: z.ZodNumber;
|
|
}, z.core.$strip>;
|
|
note: z.ZodOptional<z.ZodString>;
|
|
submittedAt: z.ZodOptional<z.ZodString>;
|
|
generatedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
};
|
|
export type ListMinutesOutput = z.infer<typeof listMinutesRoute.output>;
|
|
export type ListReportsOutput = z.infer<typeof listReportsRoute.output>;
|
|
export declare const approvalItemSchema: z.ZodObject<{
|
|
id: z.ZodString;
|
|
workflowId: z.ZodString;
|
|
workflowSubject: z.ZodString;
|
|
nodeId: z.ZodString;
|
|
title: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
ask: z.ZodString;
|
|
state: z.ZodEnum<{
|
|
pending: "pending";
|
|
rejected: "rejected";
|
|
passed: "passed";
|
|
}>;
|
|
rejectRoute: z.ZodString;
|
|
raisedAt: z.ZodString;
|
|
}, z.core.$strip>;
|
|
export type ApprovalItem = z.infer<typeof approvalItemSchema>;
|
|
export declare const listApprovalsForMeRoute: {
|
|
readonly method: "GET";
|
|
readonly path: "/api/approvals";
|
|
readonly output: z.ZodObject<{
|
|
approvals: z.ZodArray<z.ZodObject<{
|
|
id: z.ZodString;
|
|
workflowId: z.ZodString;
|
|
workflowSubject: z.ZodString;
|
|
nodeId: z.ZodString;
|
|
title: z.ZodString;
|
|
basis: z.ZodArray<z.ZodObject<{
|
|
k: z.ZodString;
|
|
v: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
ask: z.ZodString;
|
|
state: z.ZodEnum<{
|
|
pending: "pending";
|
|
rejected: "rejected";
|
|
passed: "passed";
|
|
}>;
|
|
rejectRoute: z.ZodString;
|
|
raisedAt: z.ZodString;
|
|
}, z.core.$strip>>;
|
|
}, z.core.$strip>;
|
|
};
|
|
/** 通过 / 驳回,附依据 —— 驳回必附意见 */
|
|
export declare const decideApprovalRoute: {
|
|
readonly method: "POST";
|
|
readonly path: "/api/approvals/:workflowId/:nodeId/decide";
|
|
readonly params: z.ZodObject<{
|
|
workflowId: z.ZodString;
|
|
nodeId: z.ZodString;
|
|
}, z.core.$strip>;
|
|
readonly body: z.ZodObject<{
|
|
verdict: z.ZodEnum<{
|
|
pass: "pass";
|
|
reject: "reject";
|
|
}>;
|
|
comment: z.ZodOptional<z.ZodString>;
|
|
}, z.core.$strip>;
|
|
readonly output: z.ZodObject<{
|
|
ok: z.ZodBoolean;
|
|
workflowState: z.ZodEnum<{
|
|
terminated: "terminated";
|
|
running: "running";
|
|
waiting: "waiting";
|
|
completed: "completed";
|
|
abnormal: "abnormal";
|
|
}>;
|
|
}, z.core.$strip>;
|
|
};
|
|
export type ListApprovalsForMeOutput = z.infer<typeof listApprovalsForMeRoute.output>;
|