@elementumai/edk 0.8.2-alpha.6 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (481) hide show
  1. package/README.md +49 -37
  2. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +3 -3
  3. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +1 -1
  4. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +3 -11
  5. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +3 -11
  6. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +1 -1
  7. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +1 -1
  8. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +1 -1
  9. package/dist-sdk/fs/entity.d.ts +2 -2
  10. package/dist-sdk/fs/entity.js +1 -1
  11. package/dist-sdk/pull/missing-report.d.ts +81 -0
  12. package/dist-sdk/pull/missing-report.js +52 -0
  13. package/dist-sdk/pull/util.d.ts +1 -1
  14. package/dist-sdk/pull/util.js +3 -3
  15. package/dist-sdk/src/catalog/factories.d.ts +96 -23
  16. package/dist-sdk/src/catalog/factories.js +141 -21
  17. package/dist-sdk/src/catalog/from-authoring.d.ts +5 -5
  18. package/dist-sdk/src/catalog/from-authoring.js +20 -10
  19. package/dist-sdk/src/catalog/index.d.ts +2 -2
  20. package/dist-sdk/src/catalog/index.js +1 -1
  21. package/dist-sdk/src/catalog/org.js +63 -4
  22. package/dist-sdk/src/catalog/render-helpers.d.ts +1 -1
  23. package/dist-sdk/src/catalog/render-helpers.js +1 -1
  24. package/dist-sdk/src/catalog/render.d.ts +1 -0
  25. package/dist-sdk/src/catalog/render.js +8 -2
  26. package/dist-sdk/src/catalog/token.js +18 -4
  27. package/dist-sdk/src/catalog/types.d.ts +64 -24
  28. package/dist-sdk/src/catalog/types.js +12 -4
  29. package/dist-sdk/src/core/app-to-ui.d.ts +6 -6
  30. package/dist-sdk/src/core/app-to-ui.js +7 -9
  31. package/dist-sdk/src/core/index.d.ts +11 -10
  32. package/dist-sdk/src/core/index.js +10 -9
  33. package/dist-sdk/src/core/platform-id.d.ts +11 -0
  34. package/dist-sdk/src/core/platform-id.js +8 -0
  35. package/dist-sdk/src/{entities/flow/activities/render-catalog.d.ts → core/render-tree.d.ts} +3 -3
  36. package/dist-sdk/src/{entities/flow/activities/render-catalog.js → core/render-tree.js} +7 -10
  37. package/dist-sdk/src/core/types/ai-provider.d.ts +1 -1
  38. package/dist-sdk/src/core/types/ai-provider.js +1 -1
  39. package/dist-sdk/src/core/types/app.d.ts +78 -52
  40. package/dist-sdk/src/core/types/app.js +2 -3
  41. package/dist-sdk/src/core/types/aspect-category.d.ts +4 -4
  42. package/dist-sdk/src/core/types/aspect-category.js +4 -4
  43. package/dist-sdk/src/core/types/cloud-link.d.ts +3 -3
  44. package/dist-sdk/src/core/types/cloud-link.js +3 -3
  45. package/dist-sdk/src/core/types/display-block.d.ts +2 -2
  46. package/dist-sdk/src/core/types/display-block.js +2 -2
  47. package/dist-sdk/src/core/types/group.d.ts +1 -1
  48. package/dist-sdk/src/core/types/group.js +1 -1
  49. package/dist-sdk/src/core/types/user.d.ts +1 -1
  50. package/dist-sdk/src/core/types/user.js +1 -1
  51. package/dist-sdk/src/core/wire/ref-serializer.js +3 -3
  52. package/dist-sdk/src/engine/build/context.d.ts +23 -16
  53. package/dist-sdk/src/engine/entity.d.ts +1 -1
  54. package/dist-sdk/src/engine/pull/attrs.d.ts +4 -0
  55. package/dist-sdk/src/engine/pull/attrs.js +17 -0
  56. package/dist-sdk/src/engine/pull/context.d.ts +73 -0
  57. package/dist-sdk/src/engine/pull/context.js +14 -0
  58. package/dist-sdk/src/engine/pull/org.d.ts +10 -0
  59. package/dist-sdk/src/engine/pull/org.js +35 -0
  60. package/dist-sdk/src/engine/pull/ref-only.d.ts +37 -0
  61. package/dist-sdk/src/engine/pull/ref-only.js +204 -0
  62. package/dist-sdk/src/engine/tf/expr.d.ts +7 -3
  63. package/dist-sdk/src/engine/tf/expr.js +27 -15
  64. package/dist-sdk/src/engine/tf/index.d.ts +1 -1
  65. package/dist-sdk/src/engine/tf/index.js +1 -1
  66. package/dist-sdk/src/engine/tf/model.d.ts +8 -1
  67. package/dist-sdk/src/engine/tf/model.js +4 -0
  68. package/dist-sdk/src/engine/tf/parse.js +13 -2
  69. package/dist-sdk/src/engine/tf/render.js +4 -0
  70. package/dist-sdk/src/engine/workspace/authoring-layout.js +4 -2
  71. package/dist-sdk/src/entities/access-policy/build.d.ts +6 -16
  72. package/dist-sdk/src/entities/access-policy/build.js +2 -2
  73. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +14 -40
  74. package/dist-sdk/src/entities/access-policy/from-tf.js +26 -85
  75. package/dist-sdk/src/entities/access-policy/principal.d.ts +39 -0
  76. package/dist-sdk/src/entities/access-policy/principal.js +13 -0
  77. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +33 -6
  78. package/dist-sdk/src/entities/access-policy/to-tf.js +62 -60
  79. package/dist-sdk/src/entities/agent/build.d.ts +42 -11
  80. package/dist-sdk/src/entities/agent/build.js +40 -19
  81. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +11 -1
  82. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +180 -45
  83. package/dist-sdk/src/entities/agent/from-tf.d.ts +3 -1
  84. package/dist-sdk/src/entities/agent/from-tf.js +17 -12
  85. package/dist-sdk/src/entities/agent/index.d.ts +5 -2
  86. package/dist-sdk/src/entities/agent/index.js +4 -2
  87. package/dist-sdk/src/entities/agent/module.js +7 -2
  88. package/dist-sdk/src/entities/agent/run-as.d.ts +16 -0
  89. package/dist-sdk/src/entities/agent/run-as.js +1 -0
  90. package/dist-sdk/src/entities/agent/to-tf.d.ts +6 -2
  91. package/dist-sdk/src/entities/agent/to-tf.js +58 -9
  92. package/dist-sdk/src/entities/agent/tools.d.ts +97 -70
  93. package/dist-sdk/src/entities/agent/tools.js +63 -43
  94. package/dist-sdk/src/entities/agent-a2a-skill/from-tf.js +1 -1
  95. package/dist-sdk/src/entities/agent-a2a-skill/to-tf.js +4 -4
  96. package/dist-sdk/src/entities/agent-evaluation/build.d.ts +19 -0
  97. package/dist-sdk/src/entities/agent-evaluation/build.js +41 -0
  98. package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.d.ts +4 -0
  99. package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.js +30 -0
  100. package/dist-sdk/src/entities/agent-evaluation/from-tf.d.ts +12 -0
  101. package/dist-sdk/src/entities/agent-evaluation/from-tf.js +46 -0
  102. package/dist-sdk/src/entities/agent-evaluation/index.d.ts +1 -0
  103. package/dist-sdk/src/entities/agent-evaluation/index.js +1 -0
  104. package/dist-sdk/src/entities/agent-evaluation/module.d.ts +3 -0
  105. package/dist-sdk/src/entities/agent-evaluation/module.js +58 -0
  106. package/dist-sdk/src/entities/agent-evaluation/to-tf.d.ts +12 -0
  107. package/dist-sdk/src/entities/agent-evaluation/to-tf.js +35 -0
  108. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +25 -15
  109. package/dist-sdk/src/entities/agent-tool/from-tf.js +175 -43
  110. package/dist-sdk/src/entities/agent-tool/module.js +6 -0
  111. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +15 -7
  112. package/dist-sdk/src/entities/agent-tool/to-tf.js +169 -48
  113. package/dist-sdk/src/entities/agent-tool/types.d.ts +4 -6
  114. package/dist-sdk/src/entities/agent-tool/types.js +30 -29
  115. package/dist-sdk/src/entities/app/build.d.ts +214 -47
  116. package/dist-sdk/src/entities/app/build.js +128 -66
  117. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +188 -8
  118. package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +59 -0
  119. package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +70 -0
  120. package/dist-sdk/src/entities/app/display-blocks.d.ts +2 -1
  121. package/dist-sdk/src/entities/app/display-blocks.js +1 -1
  122. package/dist-sdk/src/entities/app/from-tf.d.ts +11 -1
  123. package/dist-sdk/src/entities/app/from-tf.js +30 -2
  124. package/dist-sdk/src/entities/app/index.d.ts +20 -8
  125. package/dist-sdk/src/entities/app/index.js +16 -6
  126. package/dist-sdk/src/entities/app/module.js +29 -4
  127. package/dist-sdk/src/entities/app/to-tf.d.ts +1 -1
  128. package/dist-sdk/src/entities/app/to-tf.js +97 -7
  129. package/dist-sdk/src/entities/approval-chain/build.d.ts +31 -16
  130. package/dist-sdk/src/entities/approval-chain/build.js +49 -49
  131. package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +17 -0
  132. package/dist-sdk/src/entities/approval-chain/from-tf.js +57 -0
  133. package/dist-sdk/src/entities/approval-chain/index.d.ts +2 -3
  134. package/dist-sdk/src/entities/approval-chain/index.js +2 -3
  135. package/dist-sdk/src/entities/approval-chain/module.d.ts +3 -0
  136. package/dist-sdk/src/entities/approval-chain/module.js +51 -0
  137. package/dist-sdk/src/entities/approval-chain/printer.d.ts +2 -0
  138. package/dist-sdk/src/entities/approval-chain/printer.js +21 -0
  139. package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +9 -0
  140. package/dist-sdk/src/entities/approval-chain/to-tf.js +43 -0
  141. package/dist-sdk/src/entities/automation/build.d.ts +177 -95
  142. package/dist-sdk/src/entities/automation/build.js +164 -72
  143. package/dist-sdk/src/entities/automation/calculation-expression.d.ts +191 -0
  144. package/dist-sdk/src/entities/automation/calculation-expression.js +57 -0
  145. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +18 -9
  146. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +18 -14
  147. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +214 -311
  148. package/dist-sdk/src/entities/automation/filter.d.ts +1 -115
  149. package/dist-sdk/src/entities/automation/filter.js +1 -197
  150. package/dist-sdk/src/entities/automation/from-tf.d.ts +28 -0
  151. package/dist-sdk/src/entities/automation/from-tf.js +695 -182
  152. package/dist-sdk/src/entities/automation/index.d.ts +9 -10
  153. package/dist-sdk/src/entities/automation/index.js +11 -11
  154. package/dist-sdk/src/entities/automation/module.js +82 -8
  155. package/dist-sdk/src/entities/automation/operators.d.ts +32 -48
  156. package/dist-sdk/src/entities/automation/operators.js +10 -37
  157. package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +1 -1
  158. package/dist-sdk/src/entities/automation/output-key-wire-name.js +1 -1
  159. package/dist-sdk/src/entities/automation/script-code.js +107 -28
  160. package/dist-sdk/src/entities/automation/serialize.js +1 -1
  161. package/dist-sdk/src/entities/automation/tasks.d.ts +167 -102
  162. package/dist-sdk/src/entities/automation/tasks.js +66 -13
  163. package/dist-sdk/src/entities/automation/to-tf.d.ts +44 -3
  164. package/dist-sdk/src/entities/automation/to-tf.js +607 -161
  165. package/dist-sdk/src/entities/automation/triggers.d.ts +33 -25
  166. package/dist-sdk/src/entities/automation/triggers.js +8 -2
  167. package/dist-sdk/src/entities/automation/types.d.ts +3 -2
  168. package/dist-sdk/src/entities/automation/types.js +3 -2
  169. package/dist-sdk/src/entities/chart/build.d.ts +95 -0
  170. package/dist-sdk/src/entities/chart/build.js +42 -0
  171. package/dist-sdk/src/entities/chart/from-tf.d.ts +55 -0
  172. package/dist-sdk/src/entities/chart/from-tf.js +269 -0
  173. package/dist-sdk/src/entities/chart/index.d.ts +4 -0
  174. package/dist-sdk/src/entities/chart/index.js +3 -0
  175. package/dist-sdk/src/entities/chart/module.d.ts +3 -0
  176. package/dist-sdk/src/entities/chart/module.js +61 -0
  177. package/dist-sdk/src/entities/chart/printer.d.ts +5 -0
  178. package/dist-sdk/src/entities/chart/printer.js +104 -0
  179. package/dist-sdk/src/entities/chart/to-tf.d.ts +15 -0
  180. package/dist-sdk/src/entities/chart/to-tf.js +150 -0
  181. package/dist-sdk/src/entities/chart/types.d.ts +53 -0
  182. package/dist-sdk/src/entities/chart/types.js +22 -0
  183. package/dist-sdk/src/entities/dashboard/build.d.ts +44 -0
  184. package/dist-sdk/src/entities/dashboard/build.js +16 -0
  185. package/dist-sdk/src/entities/dashboard/from-tf.d.ts +12 -0
  186. package/dist-sdk/src/entities/dashboard/from-tf.js +113 -0
  187. package/dist-sdk/src/entities/dashboard/module.d.ts +3 -0
  188. package/dist-sdk/src/entities/dashboard/module.js +16 -0
  189. package/dist-sdk/src/entities/dashboard/to-tf.d.ts +43 -0
  190. package/dist-sdk/src/entities/dashboard/to-tf.js +121 -0
  191. package/dist-sdk/src/entities/dashboard-widget/module.d.ts +3 -0
  192. package/dist-sdk/src/entities/dashboard-widget/module.js +10 -0
  193. package/dist-sdk/src/entities/data-lookup/module.d.ts +3 -0
  194. package/dist-sdk/src/entities/data-lookup/module.js +22 -0
  195. package/dist-sdk/src/entities/datamine/build.d.ts +22 -0
  196. package/dist-sdk/src/entities/datamine/from-tf.d.ts +17 -0
  197. package/dist-sdk/src/entities/datamine/from-tf.js +98 -0
  198. package/dist-sdk/src/entities/datamine/module.d.ts +3 -0
  199. package/dist-sdk/src/entities/datamine/module.js +23 -0
  200. package/dist-sdk/src/entities/datamine/to-tf.d.ts +11 -0
  201. package/dist-sdk/src/entities/datamine/to-tf.js +53 -0
  202. package/dist-sdk/src/entities/dynamic-layout/build.d.ts +304 -0
  203. package/dist-sdk/src/entities/dynamic-layout/build.js +4 -0
  204. package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +4 -0
  205. package/dist-sdk/src/entities/dynamic-layout/dialect.js +47 -0
  206. package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +10 -0
  207. package/dist-sdk/src/entities/dynamic-layout/from-tf.js +239 -0
  208. package/dist-sdk/src/entities/dynamic-layout/module.d.ts +3 -0
  209. package/dist-sdk/src/entities/dynamic-layout/module.js +13 -0
  210. package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +26 -0
  211. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +267 -0
  212. package/dist-sdk/src/entities/element/build.d.ts +48 -38
  213. package/dist-sdk/src/entities/element/build.js +24 -33
  214. package/dist-sdk/src/entities/element/from-tf.d.ts +9 -1
  215. package/dist-sdk/src/entities/element/from-tf.js +31 -2
  216. package/dist-sdk/src/entities/element/index.d.ts +14 -7
  217. package/dist-sdk/src/entities/element/index.js +11 -5
  218. package/dist-sdk/src/entities/element/module.js +26 -5
  219. package/dist-sdk/src/entities/element/to-tf.d.ts +2 -1
  220. package/dist-sdk/src/entities/element/to-tf.js +64 -4
  221. package/dist-sdk/src/entities/field/build.d.ts +55 -27
  222. package/dist-sdk/src/entities/field/build.js +31 -6
  223. package/dist-sdk/src/entities/field/calc/aggregate.d.ts +52 -21
  224. package/dist-sdk/src/entities/field/calc/aggregate.js +59 -29
  225. package/dist-sdk/src/entities/field/calc/date.d.ts +78 -29
  226. package/dist-sdk/src/entities/field/calc/date.js +120 -29
  227. package/dist-sdk/src/entities/field/calc/index.d.ts +80 -85
  228. package/dist-sdk/src/entities/field/calc/index.js +82 -139
  229. package/dist-sdk/src/entities/field/calc/numeric.d.ts +8 -12
  230. package/dist-sdk/src/entities/field/calc/numeric.js +10 -27
  231. package/dist-sdk/src/entities/field/calc/runtime.d.ts +19 -2
  232. package/dist-sdk/src/entities/field/calc/runtime.js +79 -8
  233. package/dist-sdk/src/entities/field/calc/text.d.ts +32 -23
  234. package/dist-sdk/src/entities/field/calc/text.js +43 -31
  235. package/dist-sdk/src/entities/field/calc/types.d.ts +36 -81
  236. package/dist-sdk/src/entities/field/calc/types.js +1 -22
  237. package/dist-sdk/src/entities/field/calc.d.ts +71 -48
  238. package/dist-sdk/src/entities/field/calc.js +5 -15
  239. package/dist-sdk/src/entities/field/calculation-types.d.ts +6 -0
  240. package/dist-sdk/src/entities/field/calculation-types.js +49 -0
  241. package/dist-sdk/src/entities/field/from-tf.js +238 -13
  242. package/dist-sdk/src/entities/field/locals.d.ts +11 -3
  243. package/dist-sdk/src/entities/field/locals.js +15 -2
  244. package/dist-sdk/src/entities/field/module.d.ts +1 -0
  245. package/dist-sdk/src/entities/field/module.js +27 -7
  246. package/dist-sdk/src/entities/field/record-shape.d.ts +25 -11
  247. package/dist-sdk/src/entities/field/to-tf.d.ts +41 -2
  248. package/dist-sdk/src/entities/field/to-tf.js +314 -40
  249. package/dist-sdk/src/entities/field/types.d.ts +1 -1
  250. package/dist-sdk/src/entities/field/types.js +10 -1
  251. package/dist-sdk/src/entities/file-reader/build.d.ts +71 -19
  252. package/dist-sdk/src/entities/file-reader/build.js +49 -4
  253. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +1 -0
  254. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +12 -10
  255. package/dist-sdk/src/entities/file-reader/from-tf.d.ts +1 -1
  256. package/dist-sdk/src/entities/file-reader/from-tf.js +31 -2
  257. package/dist-sdk/src/entities/file-reader/index.d.ts +3 -3
  258. package/dist-sdk/src/entities/file-reader/index.js +3 -3
  259. package/dist-sdk/src/entities/file-reader/module.js +6 -5
  260. package/dist-sdk/src/entities/file-reader/to-tf.d.ts +1 -1
  261. package/dist-sdk/src/entities/file-reader/to-tf.js +5 -2
  262. package/dist-sdk/src/entities/file-reader/types.d.ts +3 -4
  263. package/dist-sdk/src/entities/file-reader/types.js +4 -5
  264. package/dist-sdk/src/entities/org/category.js +4 -5
  265. package/dist-sdk/src/entities/org/cloud-link.js +4 -5
  266. package/dist-sdk/src/entities/org/email-alias.d.ts +2 -0
  267. package/dist-sdk/src/entities/org/email-alias.js +12 -0
  268. package/dist-sdk/src/entities/org/group.js +4 -5
  269. package/dist-sdk/src/entities/org/index.d.ts +2 -0
  270. package/dist-sdk/src/entities/org/index.js +2 -0
  271. package/dist-sdk/src/entities/org/phone-provider.d.ts +4 -0
  272. package/dist-sdk/src/entities/org/phone-provider.js +30 -0
  273. package/dist-sdk/src/entities/org/role.d.ts +3 -3
  274. package/dist-sdk/src/entities/org/role.js +9 -6
  275. package/dist-sdk/src/entities/organization/build.d.ts +241 -0
  276. package/dist-sdk/src/entities/organization/build.js +165 -0
  277. package/dist-sdk/src/entities/organization/index.d.ts +2 -0
  278. package/dist-sdk/src/entities/organization/index.js +2 -0
  279. package/dist-sdk/src/entities/organization/module.d.ts +2 -0
  280. package/dist-sdk/src/entities/organization/module.js +21 -0
  281. package/dist-sdk/src/entities/organization/to-tf.d.ts +7 -0
  282. package/dist-sdk/src/entities/organization/to-tf.js +154 -0
  283. package/dist-sdk/src/entities/phone-service/build.d.ts +17 -0
  284. package/dist-sdk/src/entities/phone-service/build.js +31 -0
  285. package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.d.ts +4 -0
  286. package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +56 -0
  287. package/dist-sdk/src/entities/phone-service/from-tf.d.ts +25 -0
  288. package/dist-sdk/src/entities/phone-service/from-tf.js +75 -0
  289. package/dist-sdk/src/entities/phone-service/index.d.ts +2 -0
  290. package/dist-sdk/src/entities/phone-service/index.js +2 -0
  291. package/dist-sdk/src/entities/phone-service/module.d.ts +3 -0
  292. package/dist-sdk/src/entities/phone-service/module.js +55 -0
  293. package/dist-sdk/src/entities/phone-service/to-tf.d.ts +12 -0
  294. package/dist-sdk/src/entities/phone-service/to-tf.js +54 -0
  295. package/dist-sdk/src/entities/phone-service/types.d.ts +35 -0
  296. package/dist-sdk/src/entities/phone-service/types.js +22 -0
  297. package/dist-sdk/src/entities/record-create-form/from-tf.d.ts +11 -0
  298. package/dist-sdk/src/entities/record-create-form/from-tf.js +74 -0
  299. package/dist-sdk/src/entities/record-create-form/module.d.ts +11 -0
  300. package/dist-sdk/src/entities/record-create-form/module.js +24 -0
  301. package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +33 -0
  302. package/dist-sdk/src/entities/record-create-form/to-tf.js +88 -0
  303. package/dist-sdk/src/entities/relationship/build.d.ts +16 -0
  304. package/dist-sdk/src/entities/relationship/build.js +1 -0
  305. package/dist-sdk/src/entities/relationship/from-tf.d.ts +12 -0
  306. package/dist-sdk/src/entities/relationship/from-tf.js +109 -0
  307. package/dist-sdk/src/entities/relationship/module.d.ts +3 -0
  308. package/dist-sdk/src/entities/relationship/module.js +16 -0
  309. package/dist-sdk/src/entities/relationship/to-tf.d.ts +32 -0
  310. package/dist-sdk/src/entities/relationship/to-tf.js +145 -0
  311. package/dist-sdk/src/entities/role/build.d.ts +65 -0
  312. package/dist-sdk/src/entities/role/build.js +33 -0
  313. package/dist-sdk/src/entities/role/from-tf.d.ts +13 -0
  314. package/dist-sdk/src/entities/role/from-tf.js +138 -0
  315. package/dist-sdk/src/entities/role/to-tf.d.ts +13 -0
  316. package/dist-sdk/src/entities/role/to-tf.js +69 -0
  317. package/dist-sdk/src/entities/search-table/build.d.ts +67 -28
  318. package/dist-sdk/src/entities/search-table/build.js +110 -56
  319. package/dist-sdk/src/entities/search-table/from-tf.d.ts +37 -0
  320. package/dist-sdk/src/entities/search-table/from-tf.js +113 -0
  321. package/dist-sdk/src/entities/search-table/index.d.ts +2 -2
  322. package/dist-sdk/src/entities/search-table/index.js +2 -2
  323. package/dist-sdk/src/entities/search-table/module.js +88 -10
  324. package/dist-sdk/src/entities/search-table/printer.d.ts +2 -0
  325. package/dist-sdk/src/entities/search-table/printer.js +52 -0
  326. package/dist-sdk/src/entities/search-table/to-tf.d.ts +14 -0
  327. package/dist-sdk/src/entities/search-table/to-tf.js +104 -0
  328. package/dist-sdk/src/entities/search-table/types.d.ts +8 -0
  329. package/dist-sdk/src/entities/search-table/types.js +21 -0
  330. package/dist-sdk/src/entities/service-account/build.d.ts +32 -0
  331. package/dist-sdk/src/entities/service-account/build.js +9 -0
  332. package/dist-sdk/src/entities/service-account/from-tf.d.ts +10 -0
  333. package/dist-sdk/src/entities/service-account/from-tf.js +109 -0
  334. package/dist-sdk/src/entities/service-account/module.d.ts +4 -0
  335. package/dist-sdk/src/entities/service-account/module.js +21 -0
  336. package/dist-sdk/src/entities/service-account/ref.d.ts +11 -0
  337. package/dist-sdk/src/entities/service-account/ref.js +5 -0
  338. package/dist-sdk/src/entities/service-account/to-tf.d.ts +32 -0
  339. package/dist-sdk/src/entities/service-account/to-tf.js +103 -0
  340. package/dist-sdk/src/entities/shared/connector-from-tf.d.ts +14 -0
  341. package/dist-sdk/src/entities/shared/connector-from-tf.js +14 -0
  342. package/dist-sdk/src/entities/shared/context.d.ts +25 -24
  343. package/dist-sdk/src/entities/shared/context.js +36 -35
  344. package/dist-sdk/src/entities/shared/filters/ast.d.ts +30 -81
  345. package/dist-sdk/src/entities/shared/filters/ast.js +6 -2
  346. package/dist-sdk/src/entities/shared/filters/index.d.ts +95 -206
  347. package/dist-sdk/src/entities/shared/filters/index.js +196 -341
  348. package/dist-sdk/src/entities/shared/filters/print.d.ts +11 -0
  349. package/dist-sdk/src/entities/shared/filters/print.js +122 -0
  350. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +170 -0
  351. package/dist-sdk/src/entities/shared/filters/tf-codec.js +527 -0
  352. package/dist-sdk/src/entities/shared/filters/types.d.ts +66 -69
  353. package/dist-sdk/src/entities/shared/filters/types.js +2 -3
  354. package/dist-sdk/src/entities/shared/foreign-ref.d.ts +14 -0
  355. package/dist-sdk/src/entities/shared/foreign-ref.js +12 -0
  356. package/dist-sdk/src/entities/shared/ref.d.ts +26 -11
  357. package/dist-sdk/src/entities/shared/ref.js +8 -3
  358. package/dist-sdk/src/entities/shared/types/common.d.ts +2 -2
  359. package/dist-sdk/src/entities/shared/types/field-types.d.ts +1 -1
  360. package/dist-sdk/src/entities/shared/types/field-types.js +1 -1
  361. package/dist-sdk/src/entities/skill/build.d.ts +4 -4
  362. package/dist-sdk/src/entities/skill/build.js +6 -5
  363. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +11 -1
  364. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +100 -39
  365. package/dist-sdk/src/entities/skill/index.d.ts +3 -2
  366. package/dist-sdk/src/entities/skill/index.js +3 -2
  367. package/dist-sdk/src/entities/skill/module.js +8 -2
  368. package/dist-sdk/src/entities/skill/to-tf.d.ts +6 -2
  369. package/dist-sdk/src/entities/skill/to-tf.js +20 -2
  370. package/dist-sdk/src/entities/skill/tools.d.ts +47 -31
  371. package/dist-sdk/src/entities/skill/tools.js +37 -23
  372. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +17 -1
  373. package/dist-sdk/src/entities/skill-tool/from-tf.js +118 -8
  374. package/dist-sdk/src/entities/skill-tool/module.js +9 -0
  375. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +6 -1
  376. package/dist-sdk/src/entities/skill-tool/to-tf.js +100 -48
  377. package/dist-sdk/src/entities/skill-tool/types.js +18 -1
  378. package/dist-sdk/src/entities/table/build.d.ts +64 -23
  379. package/dist-sdk/src/entities/table/build.js +41 -26
  380. package/dist-sdk/src/entities/table/catalog-render.js +15 -1
  381. package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +99 -0
  382. package/dist-sdk/src/entities/table/deserializer/normalize.js +192 -0
  383. package/dist-sdk/src/entities/table/fields/types.d.ts +86 -0
  384. package/dist-sdk/src/entities/table/fields/types.js +12 -0
  385. package/dist-sdk/src/entities/table/fields.d.ts +107 -47
  386. package/dist-sdk/src/entities/table/fields.js +76 -55
  387. package/dist-sdk/src/entities/table/from-tf.d.ts +4 -0
  388. package/dist-sdk/src/entities/table/from-tf.js +261 -0
  389. package/dist-sdk/src/entities/table/index.d.ts +7 -5
  390. package/dist-sdk/src/entities/table/index.js +7 -7
  391. package/dist-sdk/src/entities/table/joins.d.ts +22 -9
  392. package/dist-sdk/src/entities/table/joins.js +8 -16
  393. package/dist-sdk/src/entities/table/module.d.ts +2 -1
  394. package/dist-sdk/src/entities/table/module.js +13 -6
  395. package/dist-sdk/src/entities/table/to-tf.d.ts +10 -0
  396. package/dist-sdk/src/entities/table/to-tf.js +222 -0
  397. package/dist-sdk/src/entities/task/build.d.ts +43 -0
  398. package/dist-sdk/src/entities/task/build.js +17 -0
  399. package/dist-sdk/src/entities/task/from-tf.d.ts +28 -0
  400. package/dist-sdk/src/entities/task/from-tf.js +38 -0
  401. package/dist-sdk/src/entities/task/index.d.ts +1 -0
  402. package/dist-sdk/src/entities/task/index.js +1 -0
  403. package/dist-sdk/src/entities/task/module.d.ts +3 -0
  404. package/dist-sdk/src/entities/task/module.js +12 -0
  405. package/dist-sdk/src/entities/task/to-tf.d.ts +9 -0
  406. package/dist-sdk/src/entities/task/to-tf.js +49 -0
  407. package/dist-sdk/src/entities/view/build.d.ts +46 -0
  408. package/dist-sdk/src/entities/view/build.js +19 -0
  409. package/dist-sdk/src/entities/view/from-tf.d.ts +7 -2
  410. package/dist-sdk/src/entities/view/from-tf.js +264 -30
  411. package/dist-sdk/src/entities/view/module.d.ts +6 -13
  412. package/dist-sdk/src/entities/view/module.js +12 -15
  413. package/dist-sdk/src/entities/view/sharing.d.ts +10 -0
  414. package/dist-sdk/src/entities/view/sharing.js +6 -0
  415. package/dist-sdk/src/entities/view/to-tf.d.ts +56 -12
  416. package/dist-sdk/src/entities/view/to-tf.js +192 -20
  417. package/dist-sdk/src/entities/view/types.d.ts +8 -0
  418. package/dist-sdk/src/entities/view/types.js +46 -0
  419. package/dist-sdk/src/entities/visual-flow/build.d.ts +87 -0
  420. package/dist-sdk/src/entities/visual-flow/build.js +72 -0
  421. package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +49 -0
  422. package/dist-sdk/src/entities/visual-flow/from-tf.js +124 -0
  423. package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -0
  424. package/dist-sdk/src/entities/visual-flow/index.js +1 -0
  425. package/dist-sdk/src/entities/visual-flow/module.d.ts +3 -0
  426. package/dist-sdk/src/entities/visual-flow/module.js +41 -0
  427. package/dist-sdk/src/entities/visual-flow/printer.d.ts +8 -0
  428. package/dist-sdk/src/entities/visual-flow/printer.js +92 -0
  429. package/dist-sdk/src/entities/visual-flow/to-tf.d.ts +15 -0
  430. package/dist-sdk/src/entities/visual-flow/to-tf.js +97 -0
  431. package/dist-sdk/src/entities/widget/build.d.ts +55 -0
  432. package/dist-sdk/src/entities/widget/build.js +1 -0
  433. package/dist-sdk/src/entities/widget/from-tf.d.ts +11 -0
  434. package/dist-sdk/src/entities/widget/from-tf.js +209 -0
  435. package/dist-sdk/src/entities/widget/module.d.ts +3 -0
  436. package/dist-sdk/src/entities/widget/module.js +16 -0
  437. package/dist-sdk/src/entities/widget/to-tf.d.ts +45 -0
  438. package/dist-sdk/src/entities/widget/to-tf.js +206 -0
  439. package/dist-sdk/src/graph/deferred-catalog-render.d.ts +1 -1
  440. package/dist-sdk/src/graph/deferred-catalog-render.js +1 -1
  441. package/dist-sdk/src/graph/index.d.ts +12 -1
  442. package/dist-sdk/src/graph/index.js +8 -19
  443. package/dist-sdk/src/graph/modules.js +35 -1
  444. package/dist-sdk/src/graph/types.d.ts +106 -7
  445. package/dist-sdk/src/internal/safe-identifier.d.ts +4 -0
  446. package/dist-sdk/src/internal/safe-identifier.js +13 -0
  447. package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
  448. package/dist-sdk/src/internal/sdk-package.js +5 -2
  449. package/package.json +39 -15
  450. package/dist-sdk/src/entities/access-policy/filter.d.ts +0 -61
  451. package/dist-sdk/src/entities/access-policy/filter.js +0 -83
  452. package/dist-sdk/src/entities/approval-chain/steps.d.ts +0 -24
  453. package/dist-sdk/src/entities/approval-chain/steps.js +0 -20
  454. package/dist-sdk/src/entities/flow/activities/agent.d.ts +0 -15
  455. package/dist-sdk/src/entities/flow/activities/agent.js +0 -29
  456. package/dist-sdk/src/entities/flow/activities/approval.d.ts +0 -9
  457. package/dist-sdk/src/entities/flow/activities/approval.js +0 -18
  458. package/dist-sdk/src/entities/flow/activities/automation.d.ts +0 -12
  459. package/dist-sdk/src/entities/flow/activities/automation.js +0 -22
  460. package/dist-sdk/src/entities/flow/activities/ctx.d.ts +0 -34
  461. package/dist-sdk/src/entities/flow/activities/ctx.js +0 -38
  462. package/dist-sdk/src/entities/flow/activities/form.d.ts +0 -22
  463. package/dist-sdk/src/entities/flow/activities/form.js +0 -36
  464. package/dist-sdk/src/entities/flow/activities/index.d.ts +0 -14
  465. package/dist-sdk/src/entities/flow/activities/index.js +0 -13
  466. package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +0 -39
  467. package/dist-sdk/src/entities/flow/activities/input-refs.js +0 -19
  468. package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +0 -13
  469. package/dist-sdk/src/entities/flow/activities/prompt-template.js +0 -34
  470. package/dist-sdk/src/entities/flow/activities/types.d.ts +0 -33
  471. package/dist-sdk/src/entities/flow/build.d.ts +0 -38
  472. package/dist-sdk/src/entities/flow/build.js +0 -115
  473. package/dist-sdk/src/entities/flow/index.d.ts +0 -8
  474. package/dist-sdk/src/entities/flow/index.js +0 -7
  475. package/dist-sdk/src/entities/flow/serialize.d.ts +0 -51
  476. package/dist-sdk/src/entities/flow/serialize.js +0 -94
  477. package/dist-sdk/src/entities/flow/util.d.ts +0 -27
  478. package/dist-sdk/src/entities/flow/util.js +0 -38
  479. package/dist-sdk/src/entities/table/filter.d.ts +0 -41
  480. package/dist-sdk/src/entities/table/filter.js +0 -89
  481. /package/dist-sdk/src/entities/{flow/activities/types.js → datamine/build.js} +0 -0
@@ -6,9 +6,13 @@
6
6
  * import blocks and stay data-side.
7
7
  */
8
8
  import { EntityTfError } from "../../engine/entity.js";
9
+ import { SYSTEM_FIELD_KEY_SET } from "../../core/system-fields.js";
9
10
  import { dataRefLabel, optionalString, resourceRefLabel } from "../../engine/pull/context.js";
10
11
  import { bareChildResourceLabel, isTfExpr, scopedLabelToBagKey, tfLabelToTsLabel } from "../../engine/tf/index.js";
12
+ import { filterFromTf as deserializeFilterFromTf } from "../shared/filters/tf-codec.js";
13
+ import { __pulledExpression } from "../app/deserializer/pulled-expression.js";
11
14
  import { optionsFromTf } from "./options.js";
15
+ import { isCalculationResultType } from "./calculation-types.js";
12
16
  import { KNOWN_FIELD_ATTRS, SUB_TYPE_BY_RESOURCE } from "./types.js";
13
17
  /**
14
18
  * A related_object_id/related_label_field_id value → its raw platform id, if
@@ -27,6 +31,152 @@ function resolveRelatedId(v, ctx) {
27
31
  }
28
32
  return undefined;
29
33
  }
34
+ /**
35
+ * `related_object_id` specifically (not `related_label_field_id`, which
36
+ * names a field and has no equivalent name-based recovery) gets one more
37
+ * fallback beyond `resolveRelatedId`: a `data.elementum_app.<label>` /
38
+ * `data.elementum_element.<label>` foreign lookup carries no raw id, but the
39
+ * data block's own `name = "..."` filter attribute (read via `ctx.dataName`)
40
+ * IS the target's real display name - the same name `readAppNameMap`/
41
+ * `readElementNameMap` index every already-pulled app/element by. When that
42
+ * name matches one already in this workspace, resolve straight to a typed
43
+ * `AppOrElementRef` instead of giving up - the reference then survives a
44
+ * build exactly like a hand-authored `catalog.<ref>` would (see
45
+ * agent-tool/from-tf.ts's `NormalizedToolTarget` for the same foreign-name
46
+ * convention on tool targets). No match (the target isn't pulled into this
47
+ * workspace yet, or `ctx` wasn't wired with the name maps) records the name
48
+ * on `ctx.unresolvedForeignRefs` (when the caller wired it up) so
49
+ * `--with-dependencies` can chase it down and pulls it as a workspace app/
50
+ * element the same way it already does for agent-tool/automation targets —
51
+ * then stays unresolvable this pull, same as before.
52
+ */
53
+ function resolveRelatedObject(v, ctx) {
54
+ const raw = resolveRelatedId(v, ctx);
55
+ if (raw !== undefined)
56
+ return raw;
57
+ if (v === undefined || !isTfExpr(v) || v.$expr !== "data-attr")
58
+ return undefined;
59
+ if (v.type === "elementum_app") {
60
+ const attrs = ctx.dataAttrs?.("elementum_app", v.label);
61
+ const namespace = typeof attrs?.namespace === "string" ? attrs.namespace : undefined;
62
+ const name = ctx.dataName("elementum_app", v.label) ?? (typeof attrs?.name === "string" ? attrs.name : undefined);
63
+ const refName = namespace !== undefined ? ctx.foreignAppRefNamespaces?.get(namespace) : name !== undefined ? ctx.foreignAppRefNames?.get(name) : undefined;
64
+ if (refName !== undefined)
65
+ return { __kind: "app", refName, name: name ?? refName, ...(namespace !== undefined ? { namespace } : {}) };
66
+ if (name === undefined)
67
+ return undefined;
68
+ ctx.unresolvedForeignRefs?.apps.add(name);
69
+ return undefined;
70
+ }
71
+ if (v.type === "elementum_element") {
72
+ const attrs = ctx.dataAttrs?.("elementum_element", v.label);
73
+ const namespace = typeof attrs?.namespace === "string" ? attrs.namespace : undefined;
74
+ const name = ctx.dataName("elementum_element", v.label) ?? (typeof attrs?.name === "string" ? attrs.name : undefined);
75
+ const refName = namespace !== undefined ? ctx.foreignElementRefNamespaces?.get(namespace) : name !== undefined ? ctx.foreignElementRefNames?.get(name) : undefined;
76
+ if (refName !== undefined)
77
+ return { __kind: "element", refName, name: name ?? refName, ...(namespace !== undefined ? { namespace } : {}) };
78
+ if (name === undefined)
79
+ return undefined;
80
+ ctx.unresolvedForeignRefs?.elements.add(name);
81
+ return undefined;
82
+ }
83
+ return undefined;
84
+ }
85
+ function resolveRelatedField(v, ctx) {
86
+ const raw = resolveRelatedId(v, ctx);
87
+ if (raw !== undefined)
88
+ return raw;
89
+ if (v === undefined || !isTfExpr(v) || v.$expr !== "data-attr" || v.path.join(".") !== "id")
90
+ return undefined;
91
+ return ctx.foreignFieldRefsByDataAddress?.get(`${v.type}.${v.label}`);
92
+ }
93
+ /**
94
+ * A dynamic picklist filter's field reference → `RefExpr`. Every field a
95
+ * `dynamic_config.filter` names belongs to `relatedAspectId`'s target. A
96
+ * ref-only dependency data address resolves to its generated catalog member;
97
+ * a preserved raw id remains an explicit unresolved/unsafe fallback.
98
+ */
99
+ function dynamicPicklistFilterFieldRef(value, ctx) {
100
+ const resolved = resolveRelatedField(value, ctx);
101
+ if (typeof resolved === "string")
102
+ return { kind: "unresolved", uuid: resolved, hint: "field" };
103
+ if (resolved !== undefined) {
104
+ return { kind: "field", appHandle: resolved.ownerRefName, fieldKey: resolved.fieldKey };
105
+ }
106
+ throw new EntityTfError("dynamic picklist filter field reference cannot be reconstructed");
107
+ }
108
+ /**
109
+ * `dynamic_config` → `AppField.config` (picklist/multiPicklist only). Mirrors
110
+ * `related_object_id`/`related_label_field_id` resolution exactly (both are
111
+ * required by the wire schema, so either failing to resolve drops the whole
112
+ * config — same convention as RELATION's own required pair). `parent_field_id`
113
+ * is same-aspect (see `fieldKeyFromTfRef`'s use here vs. `resolveRelatedId`
114
+ * for the cross-aspect id's above); its own failure to resolve degrades that
115
+ * ONE optional attribute rather than the whole field.
116
+ */
117
+ function dynamicConfigFromTf(value, owner, ctx, where) {
118
+ if (value === undefined)
119
+ return undefined;
120
+ if (typeof value !== "object" || value === null || isTfExpr(value) || Array.isArray(value)) {
121
+ ctx.diagnostics.push(`${where}: dynamic_config has an unexpected shape; dropped`);
122
+ return undefined;
123
+ }
124
+ const attrs = value;
125
+ const relatedAspectId = resolveRelatedObject(attrs["related_aspect_id"], ctx);
126
+ const relatedLabelFieldId = resolveRelatedField(attrs["related_label_field_id"], ctx);
127
+ if (relatedAspectId === undefined || relatedLabelFieldId === undefined) {
128
+ const missing = [
129
+ relatedAspectId === undefined && "related_aspect_id",
130
+ relatedLabelFieldId === undefined && "related_label_field_id",
131
+ ].filter((v) => v !== false);
132
+ ctx.diagnostics.push(`${where}: dynamic_config.${missing.join(" and ")} does not resolve to a catalog reference or raw platform id; dropped`);
133
+ return undefined;
134
+ }
135
+ let parentFieldId;
136
+ if (attrs["parent_field_id"] !== undefined) {
137
+ parentFieldId = fieldKeyFromTfRef(attrs["parent_field_id"], owner.label, owner.scope ?? "app");
138
+ if (parentFieldId === undefined) {
139
+ ctx.diagnostics.push(`${where}: dynamic_config.parent_field_id could not be resolved to a same-aspect field; dropped`);
140
+ }
141
+ }
142
+ const autoRelate = typeof attrs["auto_relate"] === "boolean" ? attrs["auto_relate"] : undefined;
143
+ const valuesRenderType = typeof attrs["values_render_type"] === "string" ? attrs["values_render_type"] : undefined;
144
+ let filter;
145
+ if (attrs["filter"] !== undefined) {
146
+ try {
147
+ filter = deserializeFilterFromTf(attrs["filter"], {
148
+ field: (v) => dynamicPicklistFilterFieldRef(v, ctx),
149
+ reference: () => {
150
+ throw new EntityTfError("dynamic picklist filter does not support value references");
151
+ },
152
+ });
153
+ }
154
+ catch (e) {
155
+ ctx.diagnostics.push(`${where}: dynamic_config.filter ${e instanceof Error ? e.message : String(e)}; dropped`);
156
+ }
157
+ }
158
+ let sort;
159
+ if (attrs["sort"] !== undefined) {
160
+ const sortValue = attrs["sort"];
161
+ if (isTfExpr(sortValue) && sortValue.$expr === "jsonencode" && typeof sortValue.value === "object" && sortValue.value !== null && !Array.isArray(sortValue.value)) {
162
+ sort = sortValue.value;
163
+ }
164
+ else {
165
+ ctx.diagnostics.push(`${where}: dynamic_config.sort is not a jsonencode(...) object; dropped`);
166
+ }
167
+ }
168
+ return {
169
+ dynamic: {
170
+ relatedAspectId,
171
+ relatedLabelFieldId,
172
+ ...(parentFieldId !== undefined && { parentFieldId }),
173
+ ...(autoRelate !== undefined && { autoRelate }),
174
+ ...(valuesRenderType !== undefined && { valuesRenderType }),
175
+ ...(filter !== undefined && { filter }),
176
+ ...(sort !== undefined && { sort }),
177
+ },
178
+ };
179
+ }
30
180
  /**
31
181
  * One field block → its normalized entry; undefined = skipped with a
32
182
  * diagnostic (unknown resource type, or a field belonging to a different
@@ -67,7 +217,10 @@ export function fieldFromTf(block, owner, ctx) {
67
217
  ctx.diagnostics.push(`${where}: object_id does not reference ${owner.type}.${owner.label}; skipped`);
68
218
  return undefined;
69
219
  }
70
- const options = subType.hasOptions === true ? optionsFromTf(attrs["options"], `${where} options`, ctx) : undefined;
220
+ const options = subType.hasOptions === true && attrs["dynamic_config"] === undefined
221
+ ? optionsFromTf(attrs["options"], `${where} options`, ctx)
222
+ : undefined;
223
+ const config = subType.hasOptions === true ? dynamicConfigFromTf(attrs["dynamic_config"], owner, ctx, where) : undefined;
71
224
  let decimalPlaces;
72
225
  if (subType.typeKey === "decimal" && attrs["decimal_places"] !== undefined) {
73
226
  if (typeof attrs["decimal_places"] === "number")
@@ -75,6 +228,28 @@ export function fieldFromTf(block, owner, ctx) {
75
228
  else
76
229
  ctx.diagnostics.push(`${where}: decimal_places is not a number; dropped`);
77
230
  }
231
+ let numericFormat;
232
+ if (subType.typeKey === "number" || subType.typeKey === "decimal") {
233
+ const format = {};
234
+ const currency = attrs["currency"];
235
+ if (currency !== undefined) {
236
+ if (typeof currency === "string")
237
+ format["currency"] = currency;
238
+ else
239
+ ctx.diagnostics.push(`${where}: currency is not a string; dropped`);
240
+ }
241
+ for (const key of ["percentage", "delimiter"]) {
242
+ const value = attrs[key];
243
+ if (value === undefined)
244
+ continue;
245
+ if (typeof value === "boolean")
246
+ format[key] = value;
247
+ else
248
+ ctx.diagnostics.push(`${where}: ${key} is not a boolean; dropped`);
249
+ }
250
+ if (Object.keys(format).length > 0)
251
+ numericFormat = format;
252
+ }
78
253
  // related_object_id/related_label_field_id are raw platform ids on the
79
254
  // wire when ei's beautifier finds nothing to resolve them against - a
80
255
  // non-recursive export never discovers the related aspect's own identity,
@@ -87,21 +262,26 @@ export function fieldFromTf(block, owner, ctx) {
87
262
  // `resource-attr` expressions whose target carries its own import block in
88
263
  // this stream, so the raw id IS recoverable - via the same `ctx.importId`
89
264
  // lookup adoption itself uses, keyed by the referenced resource's address,
90
- // not this field's own. What's NOT recoverable: a `data-attr` foreign
91
- // lookup (`data.elementum_element.<label>.id` - data blocks are never
92
- // imported) or a `local` computed attribute (`local.<app>_id_field_id` -
93
- // an app/element's system field ids are read-only outputs of that
94
- // resource, never their own resource address). Both properties are
95
- // required by RelationFieldOptions, so printing relationField(...) with
96
- // either missing would be invalid TypeScript (item 117) - skip the whole
97
- // field when either side can't be resolved, same convention as an
98
- // unimplemented sub-type.
265
+ // not this field's own. A THIRD shape - a `data-attr` foreign lookup
266
+ // (`data.elementum_element.<label>.id`, e.g. when another own-file child
267
+ // in the same app also targets it, so ei's beautifier shares one `data`
268
+ // block instead of repeating the raw id) - carries no raw id either, but
269
+ // `resolveRelatedObject` recovers it by name via the stream's own data
270
+ // block + this workspace's already-pulled apps/elements (see its doc
271
+ // comment). What's genuinely NOT recoverable: that same data-attr lookup
272
+ // when the target isn't pulled into this workspace yet, or a `local`
273
+ // computed attribute (`local.<app>_id_field_id` - an app/element's system
274
+ // field ids are read-only outputs of that resource, never their own
275
+ // resource address). Both properties are required by RelationFieldOptions,
276
+ // so printing relationField(...) with either missing would be invalid
277
+ // TypeScript (item 117) - skip the whole field when either side can't be
278
+ // resolved, same convention as an unimplemented sub-type.
99
279
  let relatedObject;
100
280
  let relatedLabelField;
101
281
  let autoRelate;
102
282
  if (subType.hasRelation === true) {
103
- relatedObject = resolveRelatedId(attrs["related_object_id"], ctx);
104
- relatedLabelField = resolveRelatedId(attrs["related_label_field_id"], ctx);
283
+ relatedObject = resolveRelatedObject(attrs["related_object_id"], ctx);
284
+ relatedLabelField = resolveRelatedField(attrs["related_label_field_id"], ctx);
105
285
  if (typeof attrs["auto_relate"] === "boolean")
106
286
  autoRelate = attrs["auto_relate"];
107
287
  if (relatedObject === undefined || relatedLabelField === undefined) {
@@ -140,12 +320,45 @@ export function fieldFromTf(block, owner, ctx) {
140
320
  }
141
321
  }
142
322
  const scope = owner.scope ?? "app";
323
+ const calculation = subType.typeKey === "calculated" ? optionalString(attrs, "calculation", where, ctx) : undefined;
324
+ if (subType.typeKey === "calculated" && calculation === undefined) {
325
+ ctx.skipped.push(`${block.type}.${fieldLabel}`);
326
+ ctx.diagnostics.push(`${where}: calculation is required; skipped`);
327
+ return undefined;
328
+ }
329
+ const calculationType = subType.typeKey === "calculated" ? attrs["calculation_type"] : undefined;
330
+ if (subType.typeKey === "calculated" && !isCalculationResultType(calculationType)) {
331
+ ctx.skipped.push(`${block.type}.${fieldLabel}`);
332
+ ctx.diagnostics.push(`${where}: calculation_type is missing or unsupported; skipped rather than guessing the typed result`);
333
+ return undefined;
334
+ }
335
+ let calculationInclude;
336
+ if (subType.typeKey === "calculated") {
337
+ const includeType = optionalString(attrs, "include_type", where, ctx);
338
+ if (includeType === "MANUAL")
339
+ calculationInclude = "manual";
340
+ else if (includeType === "BOTH")
341
+ calculationInclude = "both";
342
+ else if (includeType === "PICKLIST") {
343
+ const picklistFieldId = resolveRelatedId(attrs["picklist_field_id"], ctx);
344
+ if (picklistFieldId !== undefined)
345
+ calculationInclude = { picklistFieldId };
346
+ else
347
+ ctx.diagnostics.push(`${where}: PICKLIST inclusion has an unresolvable picklist_field_id; defaulted to AUTO`);
348
+ }
349
+ else if (includeType !== undefined && includeType !== "AUTO") {
350
+ ctx.diagnostics.push(`${where}: unsupported include_type ${JSON.stringify(includeType)}; defaulted to AUTO`);
351
+ }
352
+ }
143
353
  return {
144
354
  key: scopedLabelToBagKey(owner.label, fieldLabel, scope),
355
+ ...(isCalculationResultType(calculationType) && { calculationType }),
356
+ ...(calculationInclude !== undefined && { calculationInclude }),
145
357
  field: {
146
358
  id: ctx.importId(`${block.type}.${fieldLabel}`) ?? "",
147
359
  name: fieldName,
148
360
  type: subType.authoringType,
361
+ ...(calculation !== undefined && { expression: __pulledExpression(calculation) }),
149
362
  // Only true flags are carried into authoring — false is the platform
150
363
  // default and stays unwritten (build re-emits explicit false; ei's
151
364
  // export does the same, so the build-vs-export sees both sides as false).
@@ -160,10 +373,12 @@ export function fieldFromTf(block, owner, ctx) {
160
373
  : attrs["default_value"] !== undefined &&
161
374
  !isTfExpr(attrs["default_value"]) && { defaultValue: attrs["default_value"] }),
162
375
  ...(options !== undefined && { options }),
376
+ ...(config !== undefined && { config }),
163
377
  ...(tags !== undefined && tags.length > 0 && { tags }),
164
378
  ...(relatedObject !== undefined && { relatedObject }),
165
379
  ...(relatedLabelField !== undefined && { relatedLabelField }),
166
380
  ...(autoRelate !== undefined && { autoRelate }),
381
+ ...(numericFormat !== undefined && { numericFormat }),
167
382
  ...(decimalPlaces !== undefined && { decimalPlaces }),
168
383
  },
169
384
  };
@@ -175,7 +390,17 @@ export function fieldFromTf(block, owner, ctx) {
175
390
  * unknown resource type.
176
391
  */
177
392
  export function fieldKeyFromTfRef(v, ownerTfLabel, scope = "app") {
178
- if (!isTfExpr(v) || v.$expr !== "resource-attr" || v.path.length !== 1 || v.path[0] !== "id")
393
+ if (!isTfExpr(v))
394
+ return undefined;
395
+ if (v.$expr === "local" && ownerTfLabel !== undefined && v.path.length === 0) {
396
+ const prefix = `${ownerTfLabel}_`;
397
+ if (v.name.startsWith(prefix) && v.name.endsWith("_field_id")) {
398
+ const key = tfLabelToTsLabel(v.name.slice(prefix.length, -"_field_id".length));
399
+ if (SYSTEM_FIELD_KEY_SET.has(key))
400
+ return key;
401
+ }
402
+ }
403
+ if (v.$expr !== "resource-attr" || v.path.length !== 1 || v.path[0] !== "id")
179
404
  return undefined;
180
405
  if (!SUB_TYPE_BY_RESOURCE.has(v.type))
181
406
  return undefined;
@@ -3,6 +3,14 @@
3
3
  * `<fieldLabel>_options_by_label` for-expression per option-carrying field
4
4
  * resource (bare field label — ei does not namespace-prefix these).
5
5
  */
6
- import { type TfValue } from "../../engine/tf/index.js";
7
- /** Append one app's field-level lookup locals, keyed by the emitted field addresses. */
8
- export declare function appendFieldLocals(attrs: Record<string, TfValue>, fieldAddresses: ReadonlyMap<string, string>): void;
6
+ import { type TfBlock, type TfValue } from "../../engine/tf/index.js";
7
+ /**
8
+ * Append one app's field-level lookup locals, keyed by the emitted field
9
+ * addresses. Skips any dropdown field whose values come from `dynamic_config`
10
+ * (issue #406) instead of a static `options` list — that attribute is null
11
+ * in state for such a field, and a `for opt in ...options` local over a
12
+ * null value fails the plan outright. Read directly off `blocks`' own attrs
13
+ * rather than a separately-threaded address set, since the emitted field
14
+ * blocks (already produced by `toTf`) carry this directly.
15
+ */
16
+ export declare function appendFieldLocals(attrs: Record<string, TfValue>, fieldAddresses: ReadonlyMap<string, string>, blocks?: readonly TfBlock[]): void;
@@ -11,14 +11,27 @@ import { expr } from "../../engine/tf/index.js";
11
11
  // dialect is ei's actual output, not its intent (integration-harness build-vs-export
12
12
  // finding, 2026-07-23).
13
13
  const OPTION_LOOKUP_FIELD_RESOURCE_TYPES = new Set(["elementum_dropdown_field"]);
14
- /** Append one app's field-level lookup locals, keyed by the emitted field addresses. */
15
- export function appendFieldLocals(attrs, fieldAddresses) {
14
+ /**
15
+ * Append one app's field-level lookup locals, keyed by the emitted field
16
+ * addresses. Skips any dropdown field whose values come from `dynamic_config`
17
+ * (issue #406) instead of a static `options` list — that attribute is null
18
+ * in state for such a field, and a `for opt in ...options` local over a
19
+ * null value fails the plan outright. Read directly off `blocks`' own attrs
20
+ * rather than a separately-threaded address set, since the emitted field
21
+ * blocks (already produced by `toTf`) carry this directly.
22
+ */
23
+ export function appendFieldLocals(attrs, fieldAddresses, blocks) {
24
+ const dynamicAddresses = new Set((blocks ?? [])
25
+ .filter((block) => block.attrs["dynamic_config"] !== undefined)
26
+ .map((block) => `${block.type}.${block.label}`));
16
27
  for (const address of [...fieldAddresses.values()].sort()) {
17
28
  const dot = address.indexOf(".");
18
29
  const type = address.slice(0, dot);
19
30
  const label = address.slice(dot + 1);
20
31
  if (!OPTION_LOOKUP_FIELD_RESOURCE_TYPES.has(type))
21
32
  continue;
33
+ if (dynamicAddresses.has(address))
34
+ continue;
22
35
  attrs[`${label}_options_by_label`] = expr.forObject("opt", expr.resourceAttr(type, label, ["options"]), expr.scopedAttr("opt", ["label"]), expr.scopedAttr("opt", ["id"]));
23
36
  }
24
37
  }
@@ -1,3 +1,4 @@
1
1
  /** The field entity's registry entry (see src/graph/). */
2
2
  import { type EntityKindModule } from "../../graph/types.js";
3
+ export declare const FIELD_DATA_RESOURCE_TYPE = "elementum_field";
3
4
  export declare const fieldModule: EntityKindModule;
@@ -1,7 +1,8 @@
1
1
  /** The field entity's registry entry (see src/graph/). */
2
- import { rootParentFactoryEntry } from "../../catalog/render-helpers.js";
3
- import { NO_DATA, NO_LIFECYCLE, } from "../../graph/types.js";
2
+ import { asNamedRef, namedFactoryEntry } from "../../catalog/render-helpers.js";
3
+ import { NO_LIFECYCLE } from "../../graph/types.js";
4
4
  import { FIELD_SUB_TYPES } from "./types.js";
5
+ export const FIELD_DATA_RESOURCE_TYPE = "elementum_field";
5
6
  export const fieldModule = {
6
7
  kind: "field",
7
8
  stream: { role: "streamMember" },
@@ -18,7 +19,18 @@ export const fieldModule = {
18
19
  implemented: t.implemented === true,
19
20
  })),
20
21
  },
21
- data: NO_DATA,
22
+ // Foreign relationship/relation fields are looked up by name under their
23
+ // owning object (`object_id` is recorded by OrgRefLookup.foreignField).
24
+ data: {
25
+ participates: true,
26
+ resourceType: FIELD_DATA_RESOURCE_TYPE,
27
+ lookupAttr: "name",
28
+ referencedByBuild: true,
29
+ referenceLookups: [
30
+ { strategy: "owned", ownerKinds: ["app", "element"], memberAttr: "name" },
31
+ { strategy: "ownerProjection", ownerKind: "table", projectionAttr: "field_ids", memberAttr: "name" },
32
+ ],
33
+ },
22
34
  lifecycle: NO_LIFECYCLE,
23
35
  canvas: { participates: true, label: "Fields", glyph: "▾", component: "fieldCard" },
24
36
  // Inline under app — from-authoring still reads fields from app.ref(); this
@@ -29,15 +41,23 @@ export const fieldModule = {
29
41
  catalogBag: "fields",
30
42
  renderOrder: 50,
31
43
  catalogRoot: "app",
32
- renderEntry: rootParentFactoryEntry("fieldRef", (ref) => {
33
- const field = ref;
44
+ renderEntry: (args) => {
45
+ const named = asNamedRef(args.ref);
46
+ const field = args.ref;
34
47
  const parts = [`fieldType: ${JSON.stringify(field.fieldType)}`];
35
48
  if (field.tags !== undefined)
36
49
  parts.push(`tags: ${JSON.stringify(field.tags)}`);
37
50
  if (field.options !== undefined)
38
51
  parts.push(`options: ${JSON.stringify(field.options)}`);
39
- return parts;
40
- }),
52
+ return namedFactoryEntry({
53
+ factoryName: "fieldRef",
54
+ keyName: args.keyName,
55
+ baseIndent: args.baseIndent,
56
+ name: named.name,
57
+ parent: named.parent,
58
+ extraParts: parts,
59
+ });
60
+ },
41
61
  stubRef: (refName, parent) => ({
42
62
  __kind: "field",
43
63
  refName,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Derives the typed shape of an app/element's records from its catalog
3
- * `fields` bag — what `ctx.trigger.record` / `ctx.tasks.<name>.record` expose
3
+ * `fields` bag — what `ctx.trigger.record` / `ctx.actions.<name>.record` expose
4
4
  * for record-bearing triggers and tasks (`recordCreated`, `recordSearch`,
5
5
  * `createRecord`, …).
6
6
  *
@@ -16,24 +16,34 @@
16
16
  * value typing consumed by automations, not stream/build orchestration.
17
17
  */
18
18
  import type { FieldRef } from "../../catalog/types.js";
19
+ import type { CalculationTypedValue } from "../shared/ref.js";
19
20
  import type { Attachment, Group, PicklistValue, RichText, User } from "../shared/types/platform.js";
20
21
  /** Map a platform field type literal to the TS type exposed on a record field. */
21
- export type FieldValueType<FieldType extends string> = FieldType extends "NUMBER" | "DECIMAL" ? number : FieldType extends "BOOLEAN" ? boolean : FieldType extends "JSON" | "OBJECT" ? unknown : FieldType extends "PICKLIST" | "PICKLIST_ID" ? PicklistValue : FieldType extends "MULTI_PICKLIST" | "MULTI_PICKLIST_ID" ? readonly PicklistValue[] : FieldType extends "ATTACHMENT" | "ATTACHMENT_ID" | "FILE" ? Attachment : FieldType extends "RICH_TEXT" ? RichText : FieldType extends "USER" | "USER_ID" ? User : FieldType extends "GROUP" | "GROUP_ID" ? Group : string;
22
+ type CalculationTypeForField<FieldType extends string> = FieldType extends "NUMBER" ? "number" : FieldType extends "DECIMAL" ? "decimal" : FieldType extends "BOOLEAN" ? "bool" : FieldType extends "DATE" ? "date" : FieldType extends "DATETIME" ? "datetime" : FieldType extends "PICKLIST" | "PICKLIST_ID" ? "picklist" : FieldType extends "MULTI_PICKLIST" | "MULTI_PICKLIST_ID" ? "multiPicklist" : FieldType extends "ATTACHMENT" | "ATTACHMENT_ID" | "FILE" ? "attachment" : FieldType extends "USER" | "USER_ID" ? "user" : FieldType extends "GROUP" | "GROUP_ID" ? "group" : FieldType extends "JSON" | "OBJECT" ? "json" : FieldType extends "HTML" ? "html" : FieldType extends "HANDLE" ? "handle" : FieldType extends "RICH_TEXT" ? "text" : "text";
23
+ type RawFieldValueType<FieldType extends string> = FieldType extends "NUMBER" | "DECIMAL" ? number : FieldType extends "BOOLEAN" ? boolean : FieldType extends "JSON" | "OBJECT" ? unknown : FieldType extends "PICKLIST" | "PICKLIST_ID" ? PicklistValue : FieldType extends "MULTI_PICKLIST" | "MULTI_PICKLIST_ID" ? readonly PicklistValue[] : FieldType extends "ATTACHMENT" | "ATTACHMENT_ID" | "FILE" ? Attachment : FieldType extends "RICH_TEXT" ? RichText : FieldType extends "USER" | "USER_ID" ? User : FieldType extends "GROUP" | "GROUP_ID" ? Group : string;
24
+ export type FieldValueType<FieldType extends string> = CalculationTypedValue<RawFieldValueType<FieldType>, CalculationTypeForField<FieldType>>;
22
25
  /**
23
26
  * Extract the `fields` bag off an app/element-like ref, e.g. `typeof catalog.myApp`.
24
- * `undefined` when the ref carries no `fields` bag (a hand-built `AspectRef`
27
+ * `undefined` when the ref carries no `fields` bag (a hand-built `AppOrElementRef`
25
28
  * literal, or a ref kind — like a search table — that isn't field-typed yet).
26
29
  */
27
30
  export type AppFieldsOf<A> = A extends {
28
31
  readonly fields: infer F extends Record<string, FieldRef>;
29
32
  } ? F : undefined;
33
+ declare const recordIdBrand: unique symbol;
34
+ /**
35
+ * Platform record identity (wire type ASPECT_RECORD_ID). Distinct from a
36
+ * record's TEXT `id` handle so `Ref<RecordId>` cannot be satisfied by
37
+ * `ctx.trigger.record.id` (`refs["ID"]`).
38
+ */
39
+ export type RecordId = string & {
40
+ readonly [recordIdBrand]: "recordId";
41
+ };
30
42
  /**
31
43
  * The typed record shape for an app/element ref. When `A` carries a concrete
32
44
  * `fields` bag (a real catalog app), this is a closed, per-field-typed object —
33
- * an unknown field name is a compile error. Otherwise (no `fields` bag known,
34
- * e.g. a caller that can't supply one, like `aiSearchTable`'s search-table
35
- * ref) it falls back to an open `Record<string, unknown>`, matching the
36
- * pre-existing loose behavior rather than forcing an unusable empty shape.
45
+ * an unknown field name is a compile error. Otherwise (no `fields` bag known)
46
+ * extra names are not indexed: a `string` index would poison {@link RecordId}.
37
47
  *
38
48
  * Every record also carries its own HANDLE/ID under two different synthetic
39
49
  * keys, matching two independent (and both intentional) wire conventions —
@@ -41,17 +51,21 @@ export type AppFieldsOf<A> = A extends {
41
51
  * - `id` — for a trigger-sourced record (`ctx.trigger.record.id`), per
42
52
  * `normalizeTriggerRefPath`'s `recordIdFieldClientHandle` → `"id"` case
43
53
  * in `automations/materialize/ref-deserializer.ts`.
44
- * - `recordId` — for a task-output record (`ctx.tasks.<t>.record.recordId`,
54
+ * - `recordId` — branded {@link RecordId} (ASPECT_RECORD_ID) for a
55
+ * task-output record (`ctx.actions.<t>.record.recordId`,
45
56
  * `recordSearch`/`createRecord`/`findRelatedRecords`), per
46
57
  * `rewriteForwardTaskRefName`'s `record.recordId` → wire `recordId`
47
58
  * collapse in `automations/build.ts` (and its inverse in
48
59
  * `ref-deserializer.ts`'s `buildTaskRef`).
49
60
  * `RecordShape` backs both trigger and task record accessors, so both keys
50
- * live here regardless of which context a given call site is in.
61
+ * live here regardless of which context a given call site is in. The brand
62
+ * on `recordId` is what lets `updateField.record` accept `.recordId` and
63
+ * reject TEXT `.id` (edk#295).
51
64
  */
52
65
  export type RecordShape<A> = {
53
66
  readonly id: string;
54
- readonly recordId: string;
67
+ readonly recordId: RecordId;
55
68
  } & (AppFieldsOf<A> extends Record<string, FieldRef> ? {
56
69
  readonly [K in keyof AppFieldsOf<A>]: FieldValueType<AppFieldsOf<A>[K]["fieldType"]>;
57
- } : Record<string, unknown>);
70
+ } : {});
71
+ export {};
@@ -12,11 +12,12 @@
12
12
  import { type OrgRefLookup, type WorkspaceAspect } from "../../engine/build/context.js";
13
13
  import { type ChildResourceScope, type TfBlock, type TfExpr, type TfValue } from "../../engine/tf/index.js";
14
14
  import { type PicklistValueWire } from "./options.js";
15
- /** Slim `AspectRef` token shape as it appears in a def() payload (post-`slimTokens`). */
15
+ /** Slim `AppOrElementRef` token shape as it appears in a def() payload (post-`slimTokens`). */
16
16
  interface AspectTokenWire {
17
17
  readonly __kind?: string;
18
18
  readonly refName?: string;
19
19
  readonly name?: string;
20
+ readonly namespace?: string;
20
21
  }
21
22
  /** Slim `FieldRef` token shape as it appears in a def() payload. */
22
23
  interface FieldTokenWire {
@@ -24,8 +25,46 @@ interface FieldTokenWire {
24
25
  readonly refName?: string;
25
26
  readonly name?: string;
26
27
  readonly parent?: string;
28
+ readonly parentNamespace?: string;
27
29
  readonly fieldType?: string;
28
30
  }
31
+ /**
32
+ * One entry of `sort.orders` in the shape actually observed live on a
33
+ * dynamic picklist (issue #433/#484) — `field` is a catalog token or raw
34
+ * platform id, same convention as `relatedLabelFieldId`; everything else
35
+ * (`direction`, `aggregation`, …) is opaque pass-through data.
36
+ */
37
+ interface DynamicPicklistSortOrderWire {
38
+ readonly field?: FieldTokenWire | string;
39
+ readonly [k: string]: unknown;
40
+ }
41
+ /**
42
+ * Slim `AppPicklistDynamicConfig` shape as it appears in a def() payload
43
+ * (post-`slimTokens`) — `relatedAspectId`/`relatedLabelFieldId`/
44
+ * `parentFieldId` are catalog tokens or raw platform ids, same convention as
45
+ * RELATION's `relatedObject`/`relatedLabelField`. `filter` is the `Filter`
46
+ * DSL's own wire shape (opaque here — `filterToTf` interprets it); `sort` is
47
+ * pass-through JSON EXCEPT for the one known `{ orders: [{ field, ... }] }`
48
+ * shape, whose `field` resolves like any other field token (issue #484 —
49
+ * a bare field name/id there can't survive a fresh deploy, and a mismatched
50
+ * platform shape trips the provider's post-apply consistency check).
51
+ */
52
+ interface DynamicPicklistConfigWire {
53
+ readonly relatedAspectId?: AspectTokenWire | string;
54
+ readonly relatedLabelFieldId?: FieldTokenWire | string;
55
+ readonly parentFieldId?: FieldTokenWire | string;
56
+ readonly autoRelate?: boolean;
57
+ readonly valuesRenderType?: string;
58
+ readonly filter?: unknown;
59
+ readonly sort?: {
60
+ readonly orders: readonly DynamicPicklistSortOrderWire[];
61
+ } | Record<string, unknown>;
62
+ }
63
+ /** Slim `AppPicklistConfig` shape — only `dynamic` round-trips through the terraform path (see fieldToTf's config handling). */
64
+ interface FieldConfigWire {
65
+ readonly dynamic?: DynamicPicklistConfigWire;
66
+ readonly static?: unknown;
67
+ }
29
68
  /** The authored field shape (post-`slimTokens` compose body). Deliberately loose — degrade, don't assert. */
30
69
  export interface FieldInnerWire {
31
70
  readonly name?: string;
@@ -39,7 +78,7 @@ export interface FieldInnerWire {
39
78
  readonly defaultValue?: unknown;
40
79
  readonly tags?: readonly string[];
41
80
  readonly picklistValues?: readonly PicklistValueWire[];
42
- readonly config?: unknown;
81
+ readonly config?: FieldConfigWire;
43
82
  readonly format?: unknown;
44
83
  readonly calculation?: unknown;
45
84
  /**