import type { HumanIoMapping } from "../io-mapping.js"; export type { HumanIoEntry, HumanIoMapping } from "../io-mapping.js"; /** Options for {@link FlowBuilder.human}. `form` is the `zeebe:formDefinition` * form id; `assignee` / `candidateGroups` populate a `zeebe:assignmentDefinition` * (supply either or both); `io` populates a `zeebe:ioMapping`. */ export interface HumanOptions { /** The `zeebe:formDefinition` form id bound to this task. */ form: string; /** A single assignee (a static user id or a FEEL expression like * `=escalationAssignee`). */ assignee?: string; /** The candidate groups allowed to claim the task (a static group id or a FEEL * expression). */ candidateGroups?: string; /** Input/output variable mappings. */ io?: HumanIoMapping; } /** The `human` node shape (its `FlowNode` variant). */ interface HumanNode { kind: "human"; name: string; form: string; assignee?: string; candidateGroups?: string; io?: HumanIoMapping; } declare module "../types.js" { interface FlowNodeRegistry { human: HumanNode; } } declare module "../declarative.js" { interface FlowBuilder { /** * A human-in-the-loop approval step (a BPMN `` with the Zeebe * user-task marker). `opts.form` binds a `zeebe:formDefinition`; the optional * `assignee` / `candidateGroups` populate a `zeebe:assignmentDefinition` * (either or both), and `io` populates a `zeebe:ioMapping`. Resume it from a * task list / the Zeebe user-task API; the token waits durably until the task * is completed. */ human(name: K, opts: HumanOptions): FlowBuilder; } }