This repository has been archived on 2026-09-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BPOS-TMP-REPO/api-report/packages/contracts/src/api/workbench.d.ts
T
xcsandClaude Fable 5 8556432dba feat(org): 成员目录 —— Keycloak 读写面穿透、治理台成员/组织/权限三页、姓在前 personName、Staff.kind
后端:`KeycloakDirectory` 端口(users / groups / roles 读写;写直接穿透 Keycloak —— 这里建的人立刻能登录、
删的人立刻消失,停用与收权之后 logout 踢掉会话)、`keycloak-directory.ts` + `keycloak-admin-http.ts` 适配器、
org-directory 契约与 /api/gov 路由、`sync-roster` CLI(ops 路由够不着时整册照过来),
容器按 provisioning 服务账号有无决定注不注入(没配就如实说不可用)。
`personName` 姓在前:汉字直拼「柴浩」、否则留一个空格「Admin Amy」,token 与名册同步两条路同一把尺;
`staffKindOf` 按 Keycloak 固定前缀 service-account- 认服务账号,员工那一屏不摆它(`Staff.kind` 不落库,按账号名现判)。
前端:员工那一屏重做成成员 / 组织 / 权限三页签(member-page 下钻),页签栏右端一句话说清这一格管什么。
契约变更:contracts org.ts / api/http.ts / api/org-directory.ts;api-report 已刷新;org CONTRACT.md 与 ADR-012 同步。
2026-08-26 做的,一直留在工作树没入库。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0167qWjeyBwvfdGovd7FWbCu
2026-08-27 11:44:36 +08:00

5059 lines
202 KiB
TypeScript

/**
* 工作台路由契约(编码规范 §8.1 / §9.1)。
* 工作台五要素:任务 / 审批 / 消息 / 纪要 / 汇报 —— 同一份过程事实的五种投影。
*/
import { z } from 'zod';
/** @deprecated 随 ADR-012 退役,后端回 410;改用 meRoute */
export declare const sessionRoute: {
readonly method: "GET";
readonly path: "/api/session";
readonly access: "public";
readonly output: z.ZodObject<{
staff: z.ZodObject<{
id: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
account: z.ZodString;
name: z.ZodString;
email: z.ZodOptional<z.ZodString>;
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
state: z.ZodDefault<z.ZodEnum<{
active: "active";
disabled: "disabled";
}>>;
roles: z.ZodDefault<z.ZodArray<z.ZodString>>;
kind: z.ZodDefault<z.ZodEnum<{
person: "person";
service: "service";
}>>;
}, 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<{
trigger: "trigger";
data: "data";
task: "task";
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>;
};
/** @deprecated 随 ADR-012 退役,后端回 410;改用 meRoute */
export declare const loginRoute: {
readonly method: "POST";
readonly path: "/api/login";
readonly access: "public";
readonly body: z.ZodObject<{
account: z.ZodString;
password: z.ZodString;
}, z.core.$strip>;
readonly output: z.ZodObject<{
staff: z.ZodObject<{
id: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
account: z.ZodString;
name: z.ZodString;
email: z.ZodOptional<z.ZodString>;
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
state: z.ZodDefault<z.ZodEnum<{
active: "active";
disabled: "disabled";
}>>;
roles: z.ZodDefault<z.ZodArray<z.ZodString>>;
kind: z.ZodDefault<z.ZodEnum<{
person: "person";
service: "service";
}>>;
}, 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<{
trigger: "trigger";
data: "data";
task: "task";
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>;
};
/** @deprecated 随 ADR-012 退役,后端回 410;改用 meRoute */
export declare const logoutRoute: {
readonly method: "POST";
readonly path: "/api/logout";
readonly access: "public";
readonly output: z.ZodObject<{
ok: z.ZodBoolean;
}, z.core.$strip>;
};
export declare const healthRoute: {
readonly method: "GET";
readonly path: "/api/health";
readonly access: "public";
readonly output: z.ZodObject<{
ok: z.ZodBoolean;
version: z.ZodString;
db: z.ZodEnum<{
up: "up";
down: "down";
}>;
}, z.core.$strip>;
};
/** 我是谁、我能进哪几个端(ADR-012)—— 中间件解好 principal 放进上下文,这里只回投影 */
export declare const meRoute: {
readonly method: "GET";
readonly path: "/api/me";
readonly access: "any";
readonly output: z.ZodObject<{
staff: z.ZodObject<{
id: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
account: z.ZodString;
name: z.ZodString;
email: z.ZodOptional<z.ZodString>;
positionId: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
state: z.ZodDefault<z.ZodEnum<{
active: "active";
disabled: "disabled";
}>>;
roles: z.ZodDefault<z.ZodArray<z.ZodString>>;
kind: z.ZodDefault<z.ZodEnum<{
person: "person";
service: "service";
}>>;
}, 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>;
roles: z.ZodArray<z.ZodString>;
ends: z.ZodArray<z.ZodEnum<{
design: "design";
ops: "ops";
workbench: "workbench";
}>>;
}, z.core.$strip>;
};
/**
* 60 秒票据(ADR-012 §9.3)—— 只为两条带不了 Authorization 头的路:
* `EventSource('/api/stream')` 与 `<a href="…&raw=1" download>`。GET 上 `?ticket=` 认它。
*/
export declare const authTicketRoute: {
readonly method: "GET";
readonly path: "/api/auth/ticket";
readonly access: "any";
readonly output: z.ZodObject<{
ticket: z.ZodString;
expiresAt: z.ZodString;
}, 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;
phase: z.ZodOptional<z.ZodObject<{
index: z.ZodNumber;
total: z.ZodNumber;
name: z.ZodString;
}, z.core.$strip>>;
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 access: "workbench";
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;
phase: z.ZodOptional<z.ZodObject<{
index: z.ZodNumber;
total: z.ZodNumber;
name: z.ZodString;
}, z.core.$strip>>;
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 chainNodeSchema: z.ZodObject<{
nodeId: z.ZodString;
label: z.ZodString;
kind: z.ZodEnum<{
activity: "activity";
approval: "approval";
}>;
ownerName: z.ZodString;
ownerRole: z.ZodString;
state: z.ZodEnum<{
done: "done";
current: "current";
todo: "todo";
}>;
}, z.core.$strip>;
export type ChainNode = z.infer<typeof chainNodeSchema>;
/** 任务详情 —— 工作区与对话区的服务端投影(前端零过程状态,刷新即重建) */
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;
phase: z.ZodOptional<z.ZodObject<{
index: z.ZodNumber;
total: z.ZodNumber;
name: z.ZodString;
}, z.core.$strip>>;
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;
owner: z.ZodObject<{
name: z.ZodString;
role: z.ZodString;
}, z.core.$strip>;
chain: z.ZodArray<z.ZodObject<{
nodeId: z.ZodString;
label: z.ZodString;
kind: z.ZodEnum<{
activity: "activity";
approval: "approval";
}>;
ownerName: z.ZodString;
ownerRole: z.ZodString;
state: z.ZodEnum<{
done: "done";
current: "current";
todo: "todo";
}>;
}, z.core.$strip>>;
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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>>;
results: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
at: z.ZodOptional<z.ZodString>;
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
kind: z.ZodLiteral<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>>;
comms: z.ZodDefault<z.ZodArray<z.ZodObject<{
id: z.ZodString;
at: z.ZodString;
direction: z.ZodEnum<{
out: "out";
in: "in";
}>;
channel: z.ZodString;
party: z.ZodString;
subject: z.ZodString;
body: z.ZodString;
attachments: z.ZodArray<z.ZodObject<{
name: z.ZodString;
size: z.ZodOptional<z.ZodNumber>;
ref: z.ZodOptional<z.ZodString>;
note: z.ZodOptional<z.ZodString>;
readable: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>;
note: z.ZodString;
unread: z.ZodDefault<z.ZodBoolean>;
}, 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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>;
ledger: 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>;
gateLedgers: z.ZodOptional<z.ZodArray<z.ZodString>>;
gate: z.ZodOptional<z.ZodObject<{
ready: z.ZodBoolean;
why: z.ZodString;
blanks: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, 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;
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, 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>;
ledger: 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>>>;
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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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">>>;
portChoice: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
ports: z.ZodArray<z.ZodObject<{
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>>;
landing: z.ZodOptional<z.ZodObject<{
rows: z.ZodNumber;
simulated: z.ZodDefault<z.ZodNumber>;
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
label: z.ZodString;
rows: z.ZodNumber;
}, z.core.$strip>>>;
ports: z.ZodDefault<z.ZodArray<z.ZodString>>;
carried: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
routedPort: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
because: z.ZodString;
}, 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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "mode">>;
decidedDeliverables: z.ZodDefault<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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>;
ledger: 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>;
gateLedgers: z.ZodOptional<z.ZodArray<z.ZodString>>;
gate: z.ZodOptional<z.ZodObject<{
ready: z.ZodBoolean;
why: z.ZodString;
blanks: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, 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;
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, 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>;
ledger: 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>>>;
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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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">>>;
portChoice: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
ports: z.ZodArray<z.ZodObject<{
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>>;
landing: z.ZodOptional<z.ZodObject<{
rows: z.ZodNumber;
simulated: z.ZodDefault<z.ZodNumber>;
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
label: z.ZodString;
rows: z.ZodNumber;
}, z.core.$strip>>>;
ports: z.ZodDefault<z.ZodArray<z.ZodString>>;
carried: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
routedPort: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
because: z.ZodString;
}, 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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "mode">>>;
assetFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
address: z.ZodString;
key: z.ZodString;
title: z.ZodString;
format: z.ZodString;
name: z.ZodString;
at: z.ZodOptional<z.ZodString>;
archived: z.ZodBoolean;
}, z.core.$strip>>>;
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;
openComms: z.ZodOptional<z.ZodBoolean>;
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>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"entry">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
also: z.ZodOptional<z.ZodArray<z.ZodObject<{
title: z.ZodString;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: 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>;
}, 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>;
value: 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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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";
trigger: "trigger";
}>;
sideLabel: z.ZodString;
who: z.ZodEnum<{
system: "system";
owner: "owner";
agent: "agent";
}>;
action: z.ZodString;
title: z.ZodString;
summary: z.ZodOptional<z.ZodString>;
detail: z.ZodDefault<z.ZodArray<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 access: "workbench";
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;
phase: z.ZodOptional<z.ZodObject<{
index: z.ZodNumber;
total: z.ZodNumber;
name: z.ZodString;
}, z.core.$strip>>;
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;
owner: z.ZodObject<{
name: z.ZodString;
role: z.ZodString;
}, z.core.$strip>;
chain: z.ZodArray<z.ZodObject<{
nodeId: z.ZodString;
label: z.ZodString;
kind: z.ZodEnum<{
activity: "activity";
approval: "approval";
}>;
ownerName: z.ZodString;
ownerRole: z.ZodString;
state: z.ZodEnum<{
done: "done";
current: "current";
todo: "todo";
}>;
}, z.core.$strip>>;
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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>>;
results: z.ZodArray<z.ZodObject<{
label: z.ZodString;
desc: z.ZodString;
at: z.ZodOptional<z.ZodString>;
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
kind: z.ZodLiteral<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>>;
comms: z.ZodDefault<z.ZodArray<z.ZodObject<{
id: z.ZodString;
at: z.ZodString;
direction: z.ZodEnum<{
out: "out";
in: "in";
}>;
channel: z.ZodString;
party: z.ZodString;
subject: z.ZodString;
body: z.ZodString;
attachments: z.ZodArray<z.ZodObject<{
name: z.ZodString;
size: z.ZodOptional<z.ZodNumber>;
ref: z.ZodOptional<z.ZodString>;
note: z.ZodOptional<z.ZodString>;
readable: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>;
note: z.ZodString;
unread: z.ZodDefault<z.ZodBoolean>;
}, 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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>;
ledger: 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>;
gateLedgers: z.ZodOptional<z.ZodArray<z.ZodString>>;
gate: z.ZodOptional<z.ZodObject<{
ready: z.ZodBoolean;
why: z.ZodString;
blanks: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, 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;
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, 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>;
ledger: 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>>>;
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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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">>>;
portChoice: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
ports: z.ZodArray<z.ZodObject<{
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>>;
landing: z.ZodOptional<z.ZodObject<{
rows: z.ZodNumber;
simulated: z.ZodDefault<z.ZodNumber>;
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
label: z.ZodString;
rows: z.ZodNumber;
}, z.core.$strip>>>;
ports: z.ZodDefault<z.ZodArray<z.ZodString>>;
carried: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
routedPort: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
because: z.ZodString;
}, 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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "mode">>;
decidedDeliverables: z.ZodDefault<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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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>;
ledger: 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>;
gateLedgers: z.ZodOptional<z.ZodArray<z.ZodString>>;
gate: z.ZodOptional<z.ZodObject<{
ready: z.ZodBoolean;
why: z.ZodString;
blanks: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, 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;
settled: z.ZodOptional<z.ZodBoolean>;
rationale: z.ZodOptional<z.ZodString>;
}, 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>;
ledger: 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>>>;
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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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">>>;
portChoice: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
ports: z.ZodArray<z.ZodObject<{
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>>;
landing: z.ZodOptional<z.ZodObject<{
rows: z.ZodNumber;
simulated: z.ZodDefault<z.ZodNumber>;
tables: z.ZodDefault<z.ZodArray<z.ZodObject<{
label: z.ZodString;
rows: z.ZodNumber;
}, z.core.$strip>>>;
ports: z.ZodDefault<z.ZodArray<z.ZodString>>;
carried: z.ZodDefault<z.ZodArray<z.ZodString>>;
}, z.core.$strip>>;
routedPort: z.ZodOptional<z.ZodObject<{
group: z.ZodString;
name: z.ZodString;
label: z.ZodOptional<z.ZodString>;
because: z.ZodString;
}, 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.ZodEnum<{
redo: "redo";
revise: "revise";
submitted: "submitted";
pass: "pass";
}>;
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
finalHtml: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "mode">>>;
assetFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
address: z.ZodString;
key: z.ZodString;
title: z.ZodString;
format: z.ZodString;
name: z.ZodString;
at: z.ZodOptional<z.ZodString>;
archived: z.ZodBoolean;
}, z.core.$strip>>>;
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;
openComms: z.ZodOptional<z.ZodBoolean>;
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>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"entry">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
also: z.ZodOptional<z.ZodArray<z.ZodObject<{
title: z.ZodString;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: 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>;
}, 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>;
value: 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>>;
ledger: z.ZodOptional<z.ZodString>;
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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";
trigger: "trigger";
}>;
sideLabel: z.ZodString;
who: z.ZodEnum<{
system: "system";
owner: "owner";
agent: "agent";
}>;
action: z.ZodString;
title: z.ZodString;
summary: z.ZodOptional<z.ZodString>;
detail: z.ZodDefault<z.ZodArray<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 access: "workbench";
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>;
};
/**
* 对话卡回传(决策 / 补全 / 评价)—— 与后端回传校验**同 schema**。
* 对话流是一切回环输入的唯一入口(OS 4.1):卡就长在对话流上,答也就地答。
*/
export declare const replyChatCardRoute: {
readonly method: "POST";
readonly path: "/api/desk/chat-cards/reply";
readonly access: "workbench";
readonly body: z.ZodObject<{
reply: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
readonly output: z.ZodObject<{
ok: z.ZodBoolean;
}, z.core.$strip>;
};
/**
* 标记沟通记录已读 / 未读 —— **气泡计数跟着这一下走**。
* 不做「打开即已读」:那是替人宣布他看过了。已读还能改回未读(看了一半想留个记号)。
*/
export declare const markCommReadRoute: {
readonly method: "POST";
readonly path: "/api/desk/comms/:commId/read";
readonly access: "workbench";
readonly params: z.ZodObject<{
commId: z.ZodString;
}, z.core.$strip>;
readonly body: z.ZodObject<{
read: z.ZodBoolean;
}, z.core.$strip>;
readonly output: z.ZodObject<{
ok: z.ZodBoolean;
unread: z.ZodBoolean;
}, z.core.$strip>;
};
/**
* **就地改完按下「保存」** —— 把件上那张表写回**本单草稿层**,工单不办结。
*
* 为什么非要立刻落库、而不是攒到提交那一下:件是**服务端投影**。
* 人改了几格,只读那份跟着变了(那是他自己敲的),而由数据算出来的东西
* ——类徽 A/B/C、分布条、结论横幅那条去向——全是渲染那一刻的旧值。
* 于是屏上一半新一半旧:**人把三条料全改成 A,底下的去向还写着「去选型」**
* (用户实测)。那不是没更新,那是界面在撒谎。
*
* 落库之后前端重取任务投影,服务端拿新数据重渲染整份件 —— 算出来的那些跟着一起变,
* 去向也由同一次谓词求值重算。**放行门的位置没变**:写的仍是草稿层,
* 合并进正式版依旧只发生在人签字那一刻。
*
* ── 按**地址**收,不按「当下那张卡的第几块」收(2026-08-02 用户实测逼出来)──────
*
* 载荷从前是 `{workOrderId, values:{'table:0': …}}`:列名由**那张工单的 `blocks[0]`**
* 给出,于是「这份件能不能改」被绑在了「当下开着的那张卡长什么样」上。
* 实测的下场:一单在放行门连拒五拍熔断,引擎发的是一张**没有 blocks 的熔断卡**;
* 而屏上摆着的正是受理记录那份件,闸也在、编辑也进得去 —— 人把那条料的年用量补上、
* 按了保存,前端找不到匹配的块,**一格都没往下送**。他要补的恰恰就是把这一单
* 卡在那儿的那个必填格(判据 `quote_intake_record_missing = 0`),
* 而屏上什么反应都没有 —— 界面提供了一个落不了地的编辑口。
*
* 现在收的是件自己说的话:每张可改的表挂着 `data-edit="域.对象"`,格子挂着
* `data-col="台账列名"` —— 地址与列名**本来就在件里**,不必再绕一趟工单。
* 授权面改由**活动清单的台账声明**把关(不在声明里的地址一概不写),
* 比「当下那张卡碰巧带了哪一块」既严格又稳定。
*
* **改、增、删是同一件事的三种样子**(2026-08-02 用户:「编辑列表应该还能增删行」):
* 人手改本来就是**兜 AI 的错**的那一手 —— 而错不只有「这一格填错了」,
* 还有「这一行根本不该在」(客户点名本轮跳过的料被写了进来)与「漏了一行」。
* 只给改格子,前两种就没有出口:那一单会一路走到放行门被判据拦住,
* 而人明明一眼就看出问题在哪。
*/
export declare const saveTableRoute: {
readonly method: "POST";
readonly path: "/api/desk/tasks/:taskId/table";
readonly access: "workbench";
readonly params: z.ZodObject<{
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
}, z.core.$strip>;
readonly body: z.ZodObject<{
tables: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
drops: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>>;
}, z.core.$strip>;
readonly output: z.ZodObject<{
ok: z.ZodBoolean;
rows: z.ZodNumber;
unkeyed: z.ZodOptional<z.ZodArray<z.ZodObject<{
address: z.ZodString;
keys: z.ZodArray<z.ZodString>;
hint: z.ZodString;
}, z.core.$strip>>>;
}, z.core.$strip>;
};
/**
* **点开一份资料文件** —— 件上的资料名指向哪一行,这里就把那一行现造成文件交出去。
*
* 为什么按「台账地址 + 主键」取,而不是给文件发一个 id:资料的正身是台账里那一行
* (标题、正文、要哪种格式都在上头),文件是它的投影。发 id 就等于另存一份,
* 同一份事实两处各存一份 —— 台账改了,那个 id 指的还是旧的。
*
* `raw=1` 交原字节(下载,真 .docx / .xlsx);不带就交 `FileDoc`,前端照它渲。
*/
export declare const openAssetFileRoute: {
readonly method: "GET";
readonly path: "/api/desk/tasks/:taskId/file";
readonly access: "workbench";
readonly params: z.ZodObject<{
taskId: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
}, z.core.$strip>;
readonly query: z.ZodObject<{
address: z.ZodString;
key: z.ZodString;
raw: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
readonly output: z.ZodObject<{
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
kind: z.ZodLiteral<"html">;
name: z.ZodString;
html: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
kind: z.ZodLiteral<"markdown">;
name: z.ZodString;
md: z.ZodString;
html: z.ZodOptional<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">;
fileName: z.ZodString;
format: z.ZodString;
}, z.core.$strip>;
};
/** 负责人的自由输入 —— 人事件的第二形态 */
export declare const sayRoute: {
readonly method: "POST";
readonly path: "/api/desk/tasks/:taskId/say";
readonly access: "workbench";
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;
openComms: z.ZodOptional<z.ZodBoolean>;
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>>;
finalHtml: z.ZodOptional<z.ZodString>;
id: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
at: z.ZodISODateTime;
}, z.core.$strip>, z.ZodObject<{
k: z.ZodLiteral<"entry">;
ask: z.ZodString;
basis: z.ZodOptional<z.ZodArray<z.ZodObject<{
k: z.ZodString;
v: z.ZodString;
}, z.core.$strip>>>;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: z.ZodOptional<z.ZodString>;
also: z.ZodOptional<z.ZodArray<z.ZodObject<{
title: z.ZodString;
ledger: z.ZodString;
ledgerLabel: z.ZodOptional<z.ZodString>;
key: z.ZodRecord<z.ZodString, z.ZodString>;
keyLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodString;
value: z.ZodOptional<z.ZodString>;
required: z.ZodDefault<z.ZodBoolean>;
placeholder: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
autoNote: 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>;
}, 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>;
value: 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>;
ledger: 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>>;
confirm: z.ZodOptional<z.ZodObject<{
pendingId: z.ZodString;
consumed: z.ZodBoolean;
workflowId: 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 access: "workbench";
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>;
ledger: 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>>;
confirm: z.ZodOptional<z.ZodObject<{
pendingId: z.ZodString;
consumed: z.ZodBoolean;
workflowId: 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 access: "workbench";
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 access: "workbench";
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 declare const confirmTriggerPendingRoute: {
readonly method: "POST";
readonly path: "/api/desk/trigger-pending/:id/confirm";
readonly access: "workbench";
readonly params: z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>;
readonly output: z.ZodObject<{
workflowId: z.ZodString;
alreadyStarted: 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 access: "workbench";
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 access: "workbench";
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 access: "workbench";
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 access: "workbench";
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 access: "workbench";
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 access: "workbench";
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 access: "workbench";
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 access: "workbench";
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 access: "workbench";
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>;
/**
* 「登记触发 —— 人工起单的统一形态:登记人选择流程包、按调用接口 schema 填写输入
* (表单由 schema 自动渲染)、提交即起单。」**登记人即来源**。
*/
export declare const listRegistrationTriggersRoute: {
readonly method: "GET";
readonly path: "/api/triggers/registration";
readonly access: "workbench";
readonly output: z.ZodObject<{
triggers: z.ZodArray<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
processPackageId: z.ZodString;
enabled: z.ZodBoolean;
inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
};
export declare const fireRegistrationRoute: {
readonly method: "POST";
readonly path: "/api/triggers/:triggerId/register";
readonly access: "workbench";
readonly params: z.ZodObject<{
triggerId: z.ZodString;
}, z.core.$strip>;
readonly body: z.ZodObject<{
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
readonly output: z.ZodObject<{
ok: z.ZodBoolean;
workflowId: z.ZodOptional<z.ZodString>;
skipped: z.ZodOptional<z.ZodString>;
missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
};
export type ListRegistrationTriggersOutput = z.infer<typeof listRegistrationTriggersRoute.output>;