Commit 7be028a
feat(approvals): annotate approver value + escalateTo as typed references (#1414)
Adds `xRef` annotations to two Approval-node config strings so the Studio
flow designer renders pickers instead of free text (ADR-0018 §configSchema),
mirroring the existing `approvalStatusField` annotation:
- `approvers[].value` — a *polymorphic* reference (`kindFrom: 'type'`): the
concrete picker follows the sibling `type` column (user / role / team /
department / queue), or an object-field picker resolved from the flow's
`$trigger` object when `type` is `field`. `manager` and any unmapped value
carry no `value` and stay free text.
- `escalation.escalateTo` — a `role` reference (the common case); free text is
still accepted for a specific user id.
Both fold the annotation and description into a single `.meta()` so neither is
dropped from the published `z.toJSONSchema` config contract. Consumed by the
companion objectui PR's reference pickers.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>1 parent 23c7107 commit 7be028a
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
71 | 91 | | |
72 | 92 | | |
73 | 93 | | |
| |||
80 | 100 | | |
81 | 101 | | |
82 | 102 | | |
83 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
84 | 110 | | |
85 | 111 | | |
86 | 112 | | |
| |||
0 commit comments