@elementumai/edk 0.0.0-oidc-bootstrap → 0.8.1

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 (390) hide show
  1. package/README.md +462 -3
  2. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +188 -0
  3. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.js +20 -0
  4. package/dist-sdk/elementum-entity-client/clients/agents/models/agent.d.ts +245 -0
  5. package/dist-sdk/elementum-entity-client/clients/agents/models/agent.js +30 -0
  6. package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.d.ts +18 -0
  7. package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.js +8 -0
  8. package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.d.ts +718 -0
  9. package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.js +52 -0
  10. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.d.ts +23 -0
  11. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.js +1 -0
  12. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.d.ts +148 -0
  13. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.js +12 -0
  14. package/dist-sdk/elementum-entity-client/clients/aspects/models/format.d.ts +63 -0
  15. package/dist-sdk/elementum-entity-client/clients/aspects/models/format.js +17 -0
  16. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +39 -0
  17. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.js +35 -0
  18. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +116 -0
  19. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.js +11 -0
  20. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +178 -0
  21. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.js +18 -0
  22. package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.d.ts +200 -0
  23. package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.js +1 -0
  24. package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.d.ts +1 -0
  25. package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.js +1 -0
  26. package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.d.ts +141 -0
  27. package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.js +22 -0
  28. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +123 -0
  29. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.js +14 -0
  30. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +78 -0
  31. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +23 -0
  32. package/dist-sdk/elementum-entity-client/clients/tables/models/index.d.ts +1 -0
  33. package/dist-sdk/elementum-entity-client/clients/tables/models/index.js +1 -0
  34. package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.d.ts +265 -0
  35. package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.js +15 -0
  36. package/dist-sdk/elementum-entity-client/errors.d.ts +90 -0
  37. package/dist-sdk/elementum-entity-client/errors.js +111 -0
  38. package/dist-sdk/elementum-entity-client/models/connection.d.ts +30 -0
  39. package/dist-sdk/elementum-entity-client/models/connection.js +16 -0
  40. package/dist-sdk/elementum-entity-client/types.d.ts +71 -0
  41. package/dist-sdk/elementum-entity-client/types.js +1 -0
  42. package/dist-sdk/fs/entity.d.ts +104 -0
  43. package/dist-sdk/fs/entity.js +52 -0
  44. package/dist-sdk/pull/util.d.ts +130 -0
  45. package/dist-sdk/pull/util.js +204 -0
  46. package/dist-sdk/src/catalog/ai-provider-models.d.ts +30 -0
  47. package/dist-sdk/src/catalog/ai-provider-models.js +63 -0
  48. package/dist-sdk/src/catalog/factories.d.ts +242 -0
  49. package/dist-sdk/src/catalog/factories.js +265 -0
  50. package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
  51. package/dist-sdk/src/catalog/from-authoring.js +467 -0
  52. package/dist-sdk/src/catalog/index.d.ts +12 -0
  53. package/dist-sdk/src/catalog/index.js +12 -0
  54. package/dist-sdk/src/catalog/org.d.ts +11 -0
  55. package/dist-sdk/src/catalog/org.js +288 -0
  56. package/dist-sdk/src/catalog/render-helpers.d.ts +35 -0
  57. package/dist-sdk/src/catalog/render-helpers.js +82 -0
  58. package/dist-sdk/src/catalog/render.d.ts +48 -0
  59. package/dist-sdk/src/catalog/render.js +193 -0
  60. package/dist-sdk/src/catalog/token.d.ts +10 -0
  61. package/dist-sdk/src/catalog/token.js +76 -0
  62. package/dist-sdk/src/catalog/types.d.ts +215 -0
  63. package/dist-sdk/src/catalog/types.js +86 -0
  64. package/dist-sdk/src/catalog/write.d.ts +43 -0
  65. package/dist-sdk/src/catalog/write.js +109 -0
  66. package/dist-sdk/src/core/app-to-ui.d.ts +22 -0
  67. package/dist-sdk/src/core/app-to-ui.js +75 -0
  68. package/dist-sdk/src/core/index.d.ts +10 -0
  69. package/dist-sdk/src/core/index.js +9 -0
  70. package/dist-sdk/src/core/system-fields.d.ts +95 -0
  71. package/dist-sdk/src/core/system-fields.js +153 -0
  72. package/dist-sdk/src/core/triggers/on-demand.d.ts +144 -0
  73. package/dist-sdk/src/core/triggers/on-demand.js +112 -0
  74. package/dist-sdk/src/core/types/ai-provider.d.ts +23 -0
  75. package/dist-sdk/src/core/types/ai-provider.js +8 -0
  76. package/dist-sdk/src/core/types/app.d.ts +857 -0
  77. package/dist-sdk/src/core/types/app.js +210 -0
  78. package/dist-sdk/src/core/types/aspect-category.d.ts +35 -0
  79. package/dist-sdk/src/core/types/aspect-category.js +33 -0
  80. package/dist-sdk/src/core/types/cloud-link.d.ts +34 -0
  81. package/dist-sdk/src/core/types/cloud-link.js +32 -0
  82. package/dist-sdk/src/core/types/display-block.d.ts +149 -0
  83. package/dist-sdk/src/core/types/display-block.js +61 -0
  84. package/dist-sdk/src/core/types/group.d.ts +13 -0
  85. package/dist-sdk/src/core/types/group.js +6 -0
  86. package/dist-sdk/src/core/types/platform.d.ts +2 -0
  87. package/dist-sdk/src/core/types/platform.js +1 -0
  88. package/dist-sdk/src/core/types/user.d.ts +20 -0
  89. package/dist-sdk/src/core/types/user.js +8 -0
  90. package/dist-sdk/src/core/wire/ref-serializer.d.ts +45 -0
  91. package/dist-sdk/src/core/wire/ref-serializer.js +89 -0
  92. package/dist-sdk/src/engine/build/context.d.ts +67 -0
  93. package/dist-sdk/src/engine/build/context.js +6 -0
  94. package/dist-sdk/src/engine/build/source-context.d.ts +45 -0
  95. package/dist-sdk/src/engine/build/source-context.js +23 -0
  96. package/dist-sdk/src/engine/entity.d.ts +44 -0
  97. package/dist-sdk/src/engine/entity.js +15 -0
  98. package/dist-sdk/src/engine/pull/context.d.ts +38 -0
  99. package/dist-sdk/src/engine/pull/context.js +44 -0
  100. package/dist-sdk/src/engine/pull/org.d.ts +54 -0
  101. package/dist-sdk/src/engine/pull/org.js +134 -0
  102. package/dist-sdk/src/engine/tf/escape.d.ts +22 -0
  103. package/dist-sdk/src/engine/tf/escape.js +28 -0
  104. package/dist-sdk/src/engine/tf/expr.d.ts +25 -0
  105. package/dist-sdk/src/engine/tf/expr.js +405 -0
  106. package/dist-sdk/src/engine/tf/index.d.ts +12 -0
  107. package/dist-sdk/src/engine/tf/index.js +11 -0
  108. package/dist-sdk/src/engine/tf/labels.d.ts +76 -0
  109. package/dist-sdk/src/engine/tf/labels.js +196 -0
  110. package/dist-sdk/src/engine/tf/model.d.ts +84 -0
  111. package/dist-sdk/src/engine/tf/model.js +49 -0
  112. package/dist-sdk/src/engine/tf/parse.d.ts +41 -0
  113. package/dist-sdk/src/engine/tf/parse.js +189 -0
  114. package/dist-sdk/src/engine/tf/render.d.ts +13 -0
  115. package/dist-sdk/src/engine/tf/render.js +102 -0
  116. package/dist-sdk/src/engine/workspace/authoring-layout.d.ts +43 -0
  117. package/dist-sdk/src/engine/workspace/authoring-layout.js +201 -0
  118. package/dist-sdk/src/entities/access-policy/build.d.ts +26 -0
  119. package/dist-sdk/src/entities/access-policy/build.js +7 -0
  120. package/dist-sdk/src/entities/access-policy/filter.d.ts +61 -0
  121. package/dist-sdk/src/entities/access-policy/filter.js +83 -0
  122. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +48 -0
  123. package/dist-sdk/src/entities/access-policy/from-tf.js +189 -0
  124. package/dist-sdk/src/entities/access-policy/module.d.ts +3 -0
  125. package/dist-sdk/src/entities/access-policy/module.js +17 -0
  126. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +36 -0
  127. package/dist-sdk/src/entities/access-policy/to-tf.js +149 -0
  128. package/dist-sdk/src/entities/access-policy/types.d.ts +4 -0
  129. package/dist-sdk/src/entities/access-policy/types.js +10 -0
  130. package/dist-sdk/src/entities/agent/build.d.ts +108 -0
  131. package/dist-sdk/src/entities/agent/build.js +148 -0
  132. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +53 -0
  133. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +344 -0
  134. package/dist-sdk/src/entities/agent/from-tf.d.ts +65 -0
  135. package/dist-sdk/src/entities/agent/from-tf.js +289 -0
  136. package/dist-sdk/src/entities/agent/index.d.ts +7 -0
  137. package/dist-sdk/src/entities/agent/index.js +7 -0
  138. package/dist-sdk/src/entities/agent/module.d.ts +4 -0
  139. package/dist-sdk/src/entities/agent/module.js +122 -0
  140. package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
  141. package/dist-sdk/src/entities/agent/to-tf.js +188 -0
  142. package/dist-sdk/src/entities/agent/tools.d.ts +284 -0
  143. package/dist-sdk/src/entities/agent/tools.js +238 -0
  144. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +110 -0
  145. package/dist-sdk/src/entities/agent-tool/from-tf.js +265 -0
  146. package/dist-sdk/src/entities/agent-tool/module.d.ts +3 -0
  147. package/dist-sdk/src/entities/agent-tool/module.js +32 -0
  148. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +40 -0
  149. package/dist-sdk/src/entities/agent-tool/to-tf.js +250 -0
  150. package/dist-sdk/src/entities/agent-tool/types.d.ts +43 -0
  151. package/dist-sdk/src/entities/agent-tool/types.js +102 -0
  152. package/dist-sdk/src/entities/app/build.d.ts +368 -0
  153. package/dist-sdk/src/entities/app/build.js +372 -0
  154. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +168 -0
  155. package/dist-sdk/src/entities/app/deserializer/normalize.js +12 -0
  156. package/dist-sdk/src/entities/app/display-blocks.d.ts +26 -0
  157. package/dist-sdk/src/entities/app/display-blocks.js +34 -0
  158. package/dist-sdk/src/entities/app/from-tf.d.ts +23 -0
  159. package/dist-sdk/src/entities/app/from-tf.js +197 -0
  160. package/dist-sdk/src/entities/app/index.d.ts +14 -0
  161. package/dist-sdk/src/entities/app/index.js +11 -0
  162. package/dist-sdk/src/entities/app/locals.d.ts +11 -0
  163. package/dist-sdk/src/entities/app/locals.js +31 -0
  164. package/dist-sdk/src/entities/app/module.d.ts +4 -0
  165. package/dist-sdk/src/entities/app/module.js +66 -0
  166. package/dist-sdk/src/entities/app/to-tf.d.ts +33 -0
  167. package/dist-sdk/src/entities/app/to-tf.js +212 -0
  168. package/dist-sdk/src/entities/approval-chain/build.d.ts +24 -0
  169. package/dist-sdk/src/entities/approval-chain/build.js +56 -0
  170. package/dist-sdk/src/entities/approval-chain/index.d.ts +6 -0
  171. package/dist-sdk/src/entities/approval-chain/index.js +6 -0
  172. package/dist-sdk/src/entities/approval-chain/steps.d.ts +24 -0
  173. package/dist-sdk/src/entities/approval-chain/steps.js +20 -0
  174. package/dist-sdk/src/entities/automation/build.d.ts +259 -0
  175. package/dist-sdk/src/entities/automation/build.js +436 -0
  176. package/dist-sdk/src/entities/automation/catalog-render.d.ts +5 -0
  177. package/dist-sdk/src/entities/automation/catalog-render.js +35 -0
  178. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +152 -0
  179. package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
  180. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +55 -0
  181. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1176 -0
  182. package/dist-sdk/src/entities/automation/filter.d.ts +93 -0
  183. package/dist-sdk/src/entities/automation/filter.js +156 -0
  184. package/dist-sdk/src/entities/automation/from-tf.d.ts +35 -0
  185. package/dist-sdk/src/entities/automation/from-tf.js +1258 -0
  186. package/dist-sdk/src/entities/automation/index.d.ts +22 -0
  187. package/dist-sdk/src/entities/automation/index.js +25 -0
  188. package/dist-sdk/src/entities/automation/module.d.ts +3 -0
  189. package/dist-sdk/src/entities/automation/module.js +150 -0
  190. package/dist-sdk/src/entities/automation/operators.d.ts +93 -0
  191. package/dist-sdk/src/entities/automation/operators.js +69 -0
  192. package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +19 -0
  193. package/dist-sdk/src/entities/automation/output-key-wire-name.js +24 -0
  194. package/dist-sdk/src/entities/automation/script-code.d.ts +51 -0
  195. package/dist-sdk/src/entities/automation/script-code.js +633 -0
  196. package/dist-sdk/src/entities/automation/serialize.d.ts +6 -0
  197. package/dist-sdk/src/entities/automation/serialize.js +41 -0
  198. package/dist-sdk/src/entities/automation/tasks.d.ts +641 -0
  199. package/dist-sdk/src/entities/automation/tasks.js +765 -0
  200. package/dist-sdk/src/entities/automation/to-tf.d.ts +19 -0
  201. package/dist-sdk/src/entities/automation/to-tf.js +1169 -0
  202. package/dist-sdk/src/entities/automation/triggers.d.ts +205 -0
  203. package/dist-sdk/src/entities/automation/triggers.js +202 -0
  204. package/dist-sdk/src/entities/automation/types.d.ts +78 -0
  205. package/dist-sdk/src/entities/automation/types.js +131 -0
  206. package/dist-sdk/src/entities/element/build.d.ts +121 -0
  207. package/dist-sdk/src/entities/element/build.js +110 -0
  208. package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
  209. package/dist-sdk/src/entities/element/from-tf.js +170 -0
  210. package/dist-sdk/src/entities/element/index.d.ts +12 -0
  211. package/dist-sdk/src/entities/element/index.js +10 -0
  212. package/dist-sdk/src/entities/element/locals.d.ts +7 -0
  213. package/dist-sdk/src/entities/element/locals.js +12 -0
  214. package/dist-sdk/src/entities/element/module.d.ts +8 -0
  215. package/dist-sdk/src/entities/element/module.js +65 -0
  216. package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
  217. package/dist-sdk/src/entities/element/to-tf.js +169 -0
  218. package/dist-sdk/src/entities/field/build.d.ts +112 -0
  219. package/dist-sdk/src/entities/field/build.js +84 -0
  220. package/dist-sdk/src/entities/field/calc/aggregate.d.ts +60 -0
  221. package/dist-sdk/src/entities/field/calc/aggregate.js +71 -0
  222. package/dist-sdk/src/entities/field/calc/date.d.ts +73 -0
  223. package/dist-sdk/src/entities/field/calc/date.js +109 -0
  224. package/dist-sdk/src/entities/field/calc/index.d.ts +229 -0
  225. package/dist-sdk/src/entities/field/calc/index.js +433 -0
  226. package/dist-sdk/src/entities/field/calc/numeric.d.ts +22 -0
  227. package/dist-sdk/src/entities/field/calc/numeric.js +67 -0
  228. package/dist-sdk/src/entities/field/calc/runtime.d.ts +61 -0
  229. package/dist-sdk/src/entities/field/calc/runtime.js +174 -0
  230. package/dist-sdk/src/entities/field/calc/text.d.ts +100 -0
  231. package/dist-sdk/src/entities/field/calc/text.js +208 -0
  232. package/dist-sdk/src/entities/field/calc/types.d.ts +86 -0
  233. package/dist-sdk/src/entities/field/calc/types.js +23 -0
  234. package/dist-sdk/src/entities/field/calc.d.ts +108 -0
  235. package/dist-sdk/src/entities/field/calc.js +54 -0
  236. package/dist-sdk/src/entities/field/from-tf.d.ts +31 -0
  237. package/dist-sdk/src/entities/field/from-tf.js +184 -0
  238. package/dist-sdk/src/entities/field/locals.d.ts +8 -0
  239. package/dist-sdk/src/entities/field/locals.js +24 -0
  240. package/dist-sdk/src/entities/field/module.d.ts +3 -0
  241. package/dist-sdk/src/entities/field/module.js +50 -0
  242. package/dist-sdk/src/entities/field/options.d.ts +27 -0
  243. package/dist-sdk/src/entities/field/options.js +76 -0
  244. package/dist-sdk/src/entities/field/record-shape.d.ts +57 -0
  245. package/dist-sdk/src/entities/field/record-shape.js +1 -0
  246. package/dist-sdk/src/entities/field/to-tf.d.ts +73 -0
  247. package/dist-sdk/src/entities/field/to-tf.js +142 -0
  248. package/dist-sdk/src/entities/field/types.d.ts +53 -0
  249. package/dist-sdk/src/entities/field/types.js +68 -0
  250. package/dist-sdk/src/entities/file-reader/build.d.ts +182 -0
  251. package/dist-sdk/src/entities/file-reader/build.js +105 -0
  252. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +6 -0
  253. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +109 -0
  254. package/dist-sdk/src/entities/file-reader/from-tf.d.ts +13 -0
  255. package/dist-sdk/src/entities/file-reader/from-tf.js +172 -0
  256. package/dist-sdk/src/entities/file-reader/index.d.ts +10 -0
  257. package/dist-sdk/src/entities/file-reader/index.js +10 -0
  258. package/dist-sdk/src/entities/file-reader/module.d.ts +3 -0
  259. package/dist-sdk/src/entities/file-reader/module.js +115 -0
  260. package/dist-sdk/src/entities/file-reader/to-tf.d.ts +14 -0
  261. package/dist-sdk/src/entities/file-reader/to-tf.js +84 -0
  262. package/dist-sdk/src/entities/file-reader/types.d.ts +32 -0
  263. package/dist-sdk/src/entities/file-reader/types.js +30 -0
  264. package/dist-sdk/src/entities/flow/activities/agent.d.ts +15 -0
  265. package/dist-sdk/src/entities/flow/activities/agent.js +29 -0
  266. package/dist-sdk/src/entities/flow/activities/approval.d.ts +9 -0
  267. package/dist-sdk/src/entities/flow/activities/approval.js +18 -0
  268. package/dist-sdk/src/entities/flow/activities/automation.d.ts +12 -0
  269. package/dist-sdk/src/entities/flow/activities/automation.js +22 -0
  270. package/dist-sdk/src/entities/flow/activities/ctx.d.ts +34 -0
  271. package/dist-sdk/src/entities/flow/activities/ctx.js +38 -0
  272. package/dist-sdk/src/entities/flow/activities/form.d.ts +22 -0
  273. package/dist-sdk/src/entities/flow/activities/form.js +36 -0
  274. package/dist-sdk/src/entities/flow/activities/index.d.ts +14 -0
  275. package/dist-sdk/src/entities/flow/activities/index.js +13 -0
  276. package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +39 -0
  277. package/dist-sdk/src/entities/flow/activities/input-refs.js +19 -0
  278. package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +13 -0
  279. package/dist-sdk/src/entities/flow/activities/prompt-template.js +34 -0
  280. package/dist-sdk/src/entities/flow/activities/render-catalog.d.ts +140 -0
  281. package/dist-sdk/src/entities/flow/activities/render-catalog.js +174 -0
  282. package/dist-sdk/src/entities/flow/activities/types.d.ts +33 -0
  283. package/dist-sdk/src/entities/flow/activities/types.js +1 -0
  284. package/dist-sdk/src/entities/flow/build.d.ts +38 -0
  285. package/dist-sdk/src/entities/flow/build.js +115 -0
  286. package/dist-sdk/src/entities/flow/index.d.ts +8 -0
  287. package/dist-sdk/src/entities/flow/index.js +7 -0
  288. package/dist-sdk/src/entities/flow/serialize.d.ts +51 -0
  289. package/dist-sdk/src/entities/flow/serialize.js +94 -0
  290. package/dist-sdk/src/entities/flow/util.d.ts +27 -0
  291. package/dist-sdk/src/entities/flow/util.js +38 -0
  292. package/dist-sdk/src/entities/org/ai-provider.d.ts +13 -0
  293. package/dist-sdk/src/entities/org/ai-provider.js +46 -0
  294. package/dist-sdk/src/entities/org/category.d.ts +5 -0
  295. package/dist-sdk/src/entities/org/category.js +33 -0
  296. package/dist-sdk/src/entities/org/cloud-link.d.ts +5 -0
  297. package/dist-sdk/src/entities/org/cloud-link.js +33 -0
  298. package/dist-sdk/src/entities/org/connector.d.ts +12 -0
  299. package/dist-sdk/src/entities/org/connector.js +35 -0
  300. package/dist-sdk/src/entities/org/group.d.ts +5 -0
  301. package/dist-sdk/src/entities/org/group.js +40 -0
  302. package/dist-sdk/src/entities/org/index.d.ts +11 -0
  303. package/dist-sdk/src/entities/org/index.js +11 -0
  304. package/dist-sdk/src/entities/org/role.d.ts +7 -0
  305. package/dist-sdk/src/entities/org/role.js +21 -0
  306. package/dist-sdk/src/entities/org/user.d.ts +7 -0
  307. package/dist-sdk/src/entities/org/user.js +30 -0
  308. package/dist-sdk/src/entities/search-table/build.d.ts +41 -0
  309. package/dist-sdk/src/entities/search-table/build.js +79 -0
  310. package/dist-sdk/src/entities/search-table/index.d.ts +5 -0
  311. package/dist-sdk/src/entities/search-table/index.js +5 -0
  312. package/dist-sdk/src/entities/search-table/module.d.ts +6 -0
  313. package/dist-sdk/src/entities/search-table/module.js +64 -0
  314. package/dist-sdk/src/entities/shared/context.d.ts +93 -0
  315. package/dist-sdk/src/entities/shared/context.js +156 -0
  316. package/dist-sdk/src/entities/shared/filters/ast.d.ts +277 -0
  317. package/dist-sdk/src/entities/shared/filters/ast.js +65 -0
  318. package/dist-sdk/src/entities/shared/filters/index.d.ts +211 -0
  319. package/dist-sdk/src/entities/shared/filters/index.js +372 -0
  320. package/dist-sdk/src/entities/shared/filters/types.d.ts +170 -0
  321. package/dist-sdk/src/entities/shared/filters/types.js +7 -0
  322. package/dist-sdk/src/entities/shared/ref.d.ts +160 -0
  323. package/dist-sdk/src/entities/shared/ref.js +119 -0
  324. package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +17 -0
  325. package/dist-sdk/src/entities/shared/tool-field-ref.js +31 -0
  326. package/dist-sdk/src/entities/shared/types/common.d.ts +106 -0
  327. package/dist-sdk/src/entities/shared/types/common.js +64 -0
  328. package/dist-sdk/src/entities/shared/types/field-types.d.ts +58 -0
  329. package/dist-sdk/src/entities/shared/types/field-types.js +57 -0
  330. package/dist-sdk/src/entities/shared/types/platform.d.ts +46 -0
  331. package/dist-sdk/src/entities/shared/types/platform.js +10 -0
  332. package/dist-sdk/src/entities/skill/build.d.ts +25 -0
  333. package/dist-sdk/src/entities/skill/build.js +50 -0
  334. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +39 -0
  335. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +124 -0
  336. package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
  337. package/dist-sdk/src/entities/skill/from-tf.js +96 -0
  338. package/dist-sdk/src/entities/skill/index.d.ts +7 -0
  339. package/dist-sdk/src/entities/skill/index.js +7 -0
  340. package/dist-sdk/src/entities/skill/module.d.ts +4 -0
  341. package/dist-sdk/src/entities/skill/module.js +111 -0
  342. package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
  343. package/dist-sdk/src/entities/skill/to-tf.js +59 -0
  344. package/dist-sdk/src/entities/skill/tools.d.ts +93 -0
  345. package/dist-sdk/src/entities/skill/tools.js +105 -0
  346. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +60 -0
  347. package/dist-sdk/src/entities/skill-tool/from-tf.js +142 -0
  348. package/dist-sdk/src/entities/skill-tool/module.d.ts +3 -0
  349. package/dist-sdk/src/entities/skill-tool/module.js +21 -0
  350. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +34 -0
  351. package/dist-sdk/src/entities/skill-tool/to-tf.js +130 -0
  352. package/dist-sdk/src/entities/skill-tool/types.d.ts +40 -0
  353. package/dist-sdk/src/entities/skill-tool/types.js +67 -0
  354. package/dist-sdk/src/entities/table/build.d.ts +74 -0
  355. package/dist-sdk/src/entities/table/build.js +339 -0
  356. package/dist-sdk/src/entities/table/catalog-render.d.ts +5 -0
  357. package/dist-sdk/src/entities/table/catalog-render.js +39 -0
  358. package/dist-sdk/src/entities/table/fields.d.ts +81 -0
  359. package/dist-sdk/src/entities/table/fields.js +70 -0
  360. package/dist-sdk/src/entities/table/filter.d.ts +41 -0
  361. package/dist-sdk/src/entities/table/filter.js +89 -0
  362. package/dist-sdk/src/entities/table/index.d.ts +8 -0
  363. package/dist-sdk/src/entities/table/index.js +12 -0
  364. package/dist-sdk/src/entities/table/joins.d.ts +26 -0
  365. package/dist-sdk/src/entities/table/joins.js +31 -0
  366. package/dist-sdk/src/entities/table/keys.d.ts +11 -0
  367. package/dist-sdk/src/entities/table/keys.js +25 -0
  368. package/dist-sdk/src/entities/table/module.d.ts +5 -0
  369. package/dist-sdk/src/entities/table/module.js +25 -0
  370. package/dist-sdk/src/entities/table/state.d.ts +39 -0
  371. package/dist-sdk/src/entities/table/state.js +43 -0
  372. package/dist-sdk/src/entities/view/from-tf.d.ts +29 -0
  373. package/dist-sdk/src/entities/view/from-tf.js +235 -0
  374. package/dist-sdk/src/entities/view/module.d.ts +24 -0
  375. package/dist-sdk/src/entities/view/module.js +61 -0
  376. package/dist-sdk/src/entities/view/to-tf.d.ts +65 -0
  377. package/dist-sdk/src/entities/view/to-tf.js +171 -0
  378. package/dist-sdk/src/entities/view/types.d.ts +58 -0
  379. package/dist-sdk/src/entities/view/types.js +89 -0
  380. package/dist-sdk/src/graph/deferred-catalog-render.d.ts +9 -0
  381. package/dist-sdk/src/graph/deferred-catalog-render.js +18 -0
  382. package/dist-sdk/src/graph/index.d.ts +91 -0
  383. package/dist-sdk/src/graph/index.js +211 -0
  384. package/dist-sdk/src/graph/modules.d.ts +7 -0
  385. package/dist-sdk/src/graph/modules.js +42 -0
  386. package/dist-sdk/src/graph/types.d.ts +375 -0
  387. package/dist-sdk/src/graph/types.js +102 -0
  388. package/dist-sdk/src/internal/sdk-package.d.ts +7 -0
  389. package/dist-sdk/src/internal/sdk-package.js +23 -0
  390. package/package.json +201 -8
@@ -0,0 +1,277 @@
1
+ /**
2
+ * Shared deserializer AST for filters, sorts, and the catalog references
3
+ * they carry. Lifted out of `src/automations/deserializer/ast.ts` so other
4
+ * tool surfaces (agent search tools, future skill/flow tools) can use
5
+ * the same printer infrastructure without forking the type definitions.
6
+ *
7
+ * ## One catalog-ref vocabulary, two containers
8
+ *
9
+ * The standalone catalog-ref nodes below (`AppRefAst`, `FieldRefAst`,
10
+ * `AgentRefAst`, `AutomationRefAst`, `SearchTableRefAst`,
11
+ * `ApprovalChainRefAst`) are the single definition of "a reference into
12
+ * the catalog." They show up in two positions:
13
+ *
14
+ * - **bare**, in a fixed builder slot that can only hold one kind of
15
+ * ref — a tool's `aspect:`, an approval chain's `lockedFields:`, a
16
+ * search table's `attributeFields:`. Every entity deserializer's
17
+ * `ast.ts` imports these directly.
18
+ * - **as members of `RefExpr`**, the union for a *polymorphic* slot — a
19
+ * filter / sort / task argument, where the value could equally be a
20
+ * literal, a template, or a task/trigger reference.
21
+ *
22
+ * `RefExpr` therefore *composes* these nodes rather than redefining them:
23
+ * a field ref is `{ kind: "field", ... }` whether it stands alone or sits
24
+ * inside a filter. The value/flow kinds (`literal`, `template`, `taskRef`,
25
+ * …) only exist inside `RefExpr` because they only ever appear in a
26
+ * polymorphic slot. Each node's `kind` names the catalog bag it points at
27
+ * (`"field"`, `"app"`, …) — distinct from the `MissingDataCollector`
28
+ * category strings (`"fieldRef"`, `"valueRef"`, …), which are an unrelated
29
+ * enum despite the similar spelling.
30
+ *
31
+ * The shared printer handles every kind; per-consumer normalize stages
32
+ * only emit the kinds their wire shape actually carries (agent search
33
+ * filters, for instance, only produce `literal`, `field`, `app`, and
34
+ * `unresolved`).
35
+ */
36
+ import type { LikeMode } from "./types.js";
37
+ import type { UserFieldKey } from "../../../catalog/types.js";
38
+ /** Reference to an app: `<appHandle>`. */
39
+ export interface AppRefAst {
40
+ readonly kind: "app";
41
+ readonly appHandle: string;
42
+ /** Present for a foreign data lookup that is not in the local catalog. */
43
+ readonly entityType?: "app" | "element";
44
+ /** Provider lookup name for that foreign app/element. */
45
+ readonly name?: string;
46
+ }
47
+ /** Reference to an app field: `<appHandle>.fields.<fieldKey>`. */
48
+ export interface FieldRefAst {
49
+ readonly kind: "field";
50
+ readonly appHandle: string;
51
+ readonly fieldKey: string;
52
+ }
53
+ /** Reference to a fixed platform user-directory attribute. */
54
+ export interface UserFieldRefAst {
55
+ readonly kind: "userField";
56
+ readonly fieldKey: UserFieldKey;
57
+ }
58
+ /** Reference to an app's search table: `<appHandle>.searchTables.<tableKey>`. */
59
+ export interface SearchTableRefAst {
60
+ readonly kind: "searchTable";
61
+ readonly appHandle: string;
62
+ readonly tableKey: string;
63
+ }
64
+ /** Reference to a sub-automation via the app's `automations` bag. */
65
+ export interface AutomationRefAst {
66
+ readonly kind: "automation";
67
+ readonly appHandle: string;
68
+ readonly automationKey: string;
69
+ }
70
+ /** Reference to an app's document model via the app's `documentModels` bag. */
71
+ export interface DocumentModelRefAst {
72
+ readonly kind: "documentModel";
73
+ readonly appHandle: string;
74
+ readonly documentModelKey: string;
75
+ }
76
+ /** Reference to a document model's field: `<appHandle>.documentModels.<documentModelKey>.fields.<fieldKey>`. */
77
+ export interface DocumentModelFieldRefAst {
78
+ readonly kind: "documentModelField";
79
+ readonly appHandle: string;
80
+ readonly documentModelKey: string;
81
+ readonly fieldKey: string;
82
+ }
83
+ /** Reference to an agent via direct module import of the agent's `self` export. */
84
+ export interface AgentRefAst {
85
+ readonly kind: "agent";
86
+ readonly appHandle: string;
87
+ readonly agentKey: string;
88
+ /** Display name of the agent — used to derive the import filename via slugify. */
89
+ readonly name: string;
90
+ }
91
+ /** Reference to an approval chain via the app's `approvalChains` bag. */
92
+ export interface ApprovalChainRefAst {
93
+ readonly kind: "approvalChain";
94
+ readonly appHandle: string;
95
+ readonly approvalChainKey: string;
96
+ /** Imported provider id used when EDK does not emit the approval process. */
97
+ readonly unresolvedId?: string;
98
+ }
99
+ /**
100
+ * Reference to an org-level AI provider connector, nested under its owning
101
+ * provider (`catalog.aiProviders.<provider>.models.<model>`) — connectors
102
+ * aren't app-owned, so there's no `appHandle`. `id` is the wire connector id,
103
+ * carried even when resolved so the printer can fall back to an id-only TODO
104
+ * literal on a catalog miss; `name` is set only when the connector catalog
105
+ * resolved a display name. `handle` is the model key (e.g. `bedrockSonnet`)
106
+ * resolved via the connector catalog — when present, the printer emits it
107
+ * directly rather than re-deriving a handle from `name`. `providerKey` is the
108
+ * owning AI provider's key, resolved from the connector's `provider_id`
109
+ * reference; when unset (the provider couldn't be resolved), the printer
110
+ * falls back to a TODO placeholder rather than a flat `catalog.connectors`
111
+ * lookup, which no longer exists on the catalog barrel.
112
+ */
113
+ export interface ConnectorRefAst {
114
+ readonly kind: "connector";
115
+ readonly id: string;
116
+ readonly name?: string;
117
+ readonly handle?: string;
118
+ readonly providerKey?: string;
119
+ }
120
+ /**
121
+ * Reference to an org-level cloud link (`catalog.cloudLinks.<handle>`) —
122
+ * flat, no provider nesting like a connector, and org-owned (no appHandle).
123
+ */
124
+ export interface CloudLinkRefAst {
125
+ readonly kind: "cloudLink";
126
+ readonly handle: string;
127
+ readonly name?: string;
128
+ }
129
+ /**
130
+ * Placeholder for an identifier (uuid or clientHandle) the catalog couldn't
131
+ * resolve — printer emits it as a quoted literal with a `/* TODO *\/` comment.
132
+ * Named (not just inline in `RefExpr`) so consumers outside a polymorphic
133
+ * `RefExpr` slot — e.g. a trigger's `app:` / `changedFields:` — can carry the
134
+ * same unresolved marker without fabricating a fake catalog handle.
135
+ */
136
+ export interface UnresolvedRefAst {
137
+ readonly kind: "unresolved";
138
+ readonly uuid: string;
139
+ readonly hint: string;
140
+ }
141
+ export type RefExpr =
142
+ /** Literal value (string, number, boolean, array, object, null). */
143
+ {
144
+ kind: "literal";
145
+ value: unknown;
146
+ }
147
+ /** Reference to a task's output: `ctx.tasks.<task>.<path...>`. */
148
+ | {
149
+ kind: "taskRef";
150
+ task: string;
151
+ path: readonly string[];
152
+ }
153
+ /** Reference to a trigger input: `ctx.trigger.<path...>`. */
154
+ | {
155
+ kind: "triggerRef";
156
+ path: readonly string[];
157
+ }
158
+ /** Reference to a forEach loop variable: `ctx.tasks.<forEachTask>.<path...>`. */
159
+ | {
160
+ kind: "forEachRef";
161
+ forEachTask: string;
162
+ path: readonly string[];
163
+ }
164
+ /**
165
+ * Reference to the *current iteration value* of an enclosing forEach
166
+ * body — i.e. the `item` parameter passed to the `tasks` callback.
167
+ * Emitted when the wire payload uses the sentinel UUID
168
+ * `10000001-2000-4000-a000-800000000000` as the forEach ref `name`.
169
+ * Printer renders as `item` (plus any remaining path).
170
+ */
171
+ | {
172
+ kind: "forEachItemRef";
173
+ forEachTask: string;
174
+ path: readonly string[];
175
+ }
176
+ /** Reference to a variable created by a setVariable task: `ctx.variables.<varTask>.<name>`. */
177
+ | {
178
+ kind: "variableParamRef";
179
+ varTask: string;
180
+ name: string;
181
+ }
182
+ /** Template string: `template(...parts)` where parts alternate strings and RefExpr. */
183
+ | {
184
+ kind: "template";
185
+ parts: readonly (string | RefExpr)[];
186
+ } | FieldRefAst | UserFieldRefAst | AppRefAst | AgentRefAst | AutomationRefAst | DocumentModelRefAst | DocumentModelFieldRefAst | ApprovalChainRefAst | ConnectorRefAst | CloudLinkRefAst | UnresolvedRefAst
187
+ /** Preserved terraform local expression for round-trip (e.g. status option ids by label). */
188
+ | {
189
+ kind: "localRef";
190
+ readonly localName: string;
191
+ readonly path: readonly import("../../../engine/tf/model.js").PathSeg[];
192
+ };
193
+ export type FilterValueAst = {
194
+ kind: "text";
195
+ value: string;
196
+ } | {
197
+ kind: "number";
198
+ value: number;
199
+ } | {
200
+ kind: "boolean";
201
+ value: boolean;
202
+ } | {
203
+ kind: "uuid";
204
+ value: string;
205
+ } | {
206
+ kind: "date";
207
+ value: string;
208
+ } | {
209
+ kind: "datetime";
210
+ value: string;
211
+ } | {
212
+ kind: "null";
213
+ } | {
214
+ kind: "currentUser";
215
+ currentUserType: "id" | "email" | "domain";
216
+ }
217
+ /** A reference value — wraps a RefExpr for the printer to render. */
218
+ | {
219
+ kind: "reference";
220
+ ref: RefExpr;
221
+ };
222
+ export type FilterAst = {
223
+ kind: "eq" | "gt" | "gte" | "lt" | "lte";
224
+ /** Either a field descriptor (`app.fields.X`) or a RefExpr (for ref* operators). */
225
+ left: RefExpr;
226
+ right: FilterValueAst | RefExpr;
227
+ not?: boolean;
228
+ } | {
229
+ kind: "like";
230
+ left: RefExpr;
231
+ right: FilterValueAst | RefExpr;
232
+ not?: boolean;
233
+ caseInsensitive?: boolean;
234
+ mode?: LikeMode;
235
+ } | {
236
+ kind: "in";
237
+ left: RefExpr;
238
+ values: readonly (FilterValueAst | RefExpr)[];
239
+ not?: boolean;
240
+ } | {
241
+ kind: "between";
242
+ left: RefExpr;
243
+ values: readonly [FilterValueAst | RefExpr, FilterValueAst | RefExpr];
244
+ not?: boolean;
245
+ } | {
246
+ /** Field falls within a relative calendar range — see `ConsecutiveRangeFilter`. */
247
+ kind: "consecutiveRange";
248
+ left: RefExpr;
249
+ unit: string;
250
+ count: number;
251
+ offset: number;
252
+ semantic: boolean;
253
+ } | {
254
+ kind: "contains" | "overlaps";
255
+ left: RefExpr;
256
+ values: readonly (FilterValueAst | RefExpr)[];
257
+ } | {
258
+ kind: "isNull";
259
+ left: RefExpr;
260
+ not?: boolean;
261
+ } | {
262
+ kind: "and" | "or";
263
+ children: readonly FilterAst[];
264
+ } | {
265
+ kind: "true" | "false";
266
+ };
267
+ export interface SortAst {
268
+ readonly field: RefExpr;
269
+ readonly direction: "ASC" | "DESC";
270
+ }
271
+ /**
272
+ * Runtime predicate matching the closed `RefExpr` discriminant set.
273
+ * Used by the shared filter printer to disambiguate `FilterValueAst |
274
+ * RefExpr` (both shapes carry a `kind` field) and by per-consumer
275
+ * printers when dispatching generic task-arg values.
276
+ */
277
+ export declare function isRefExpr(value: unknown): value is RefExpr;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Shared deserializer AST for filters, sorts, and the catalog references
3
+ * they carry. Lifted out of `src/automations/deserializer/ast.ts` so other
4
+ * tool surfaces (agent search tools, future skill/flow tools) can use
5
+ * the same printer infrastructure without forking the type definitions.
6
+ *
7
+ * ## One catalog-ref vocabulary, two containers
8
+ *
9
+ * The standalone catalog-ref nodes below (`AppRefAst`, `FieldRefAst`,
10
+ * `AgentRefAst`, `AutomationRefAst`, `SearchTableRefAst`,
11
+ * `ApprovalChainRefAst`) are the single definition of "a reference into
12
+ * the catalog." They show up in two positions:
13
+ *
14
+ * - **bare**, in a fixed builder slot that can only hold one kind of
15
+ * ref — a tool's `aspect:`, an approval chain's `lockedFields:`, a
16
+ * search table's `attributeFields:`. Every entity deserializer's
17
+ * `ast.ts` imports these directly.
18
+ * - **as members of `RefExpr`**, the union for a *polymorphic* slot — a
19
+ * filter / sort / task argument, where the value could equally be a
20
+ * literal, a template, or a task/trigger reference.
21
+ *
22
+ * `RefExpr` therefore *composes* these nodes rather than redefining them:
23
+ * a field ref is `{ kind: "field", ... }` whether it stands alone or sits
24
+ * inside a filter. The value/flow kinds (`literal`, `template`, `taskRef`,
25
+ * …) only exist inside `RefExpr` because they only ever appear in a
26
+ * polymorphic slot. Each node's `kind` names the catalog bag it points at
27
+ * (`"field"`, `"app"`, …) — distinct from the `MissingDataCollector`
28
+ * category strings (`"fieldRef"`, `"valueRef"`, …), which are an unrelated
29
+ * enum despite the similar spelling.
30
+ *
31
+ * The shared printer handles every kind; per-consumer normalize stages
32
+ * only emit the kinds their wire shape actually carries (agent search
33
+ * filters, for instance, only produce `literal`, `field`, `app`, and
34
+ * `unresolved`).
35
+ */
36
+ // ---------------------------------------------------------------------------
37
+ // Type guards — runtime shape checks for the AST nodes above
38
+ // ---------------------------------------------------------------------------
39
+ /**
40
+ * Runtime predicate matching the closed `RefExpr` discriminant set.
41
+ * Used by the shared filter printer to disambiguate `FilterValueAst |
42
+ * RefExpr` (both shapes carry a `kind` field) and by per-consumer
43
+ * printers when dispatching generic task-arg values.
44
+ */
45
+ export function isRefExpr(value) {
46
+ if (!value || typeof value !== "object")
47
+ return false;
48
+ const kind = value.kind;
49
+ return (kind === "literal" ||
50
+ kind === "taskRef" ||
51
+ kind === "triggerRef" ||
52
+ kind === "forEachRef" ||
53
+ kind === "forEachItemRef" ||
54
+ kind === "variableParamRef" ||
55
+ kind === "template" ||
56
+ kind === "field" ||
57
+ kind === "app" ||
58
+ kind === "agent" ||
59
+ kind === "automation" ||
60
+ kind === "documentModel" ||
61
+ kind === "documentModelField" ||
62
+ kind === "approvalChain" ||
63
+ kind === "connector" ||
64
+ kind === "unresolved");
65
+ }
@@ -0,0 +1,211 @@
1
+ /**
2
+ * Filter DSL — structured helpers that produce filter objects matching
3
+ * the Elementum Filter Java model exactly.
4
+ *
5
+ * Row-scoped vs context filters
6
+ * -----------------------------
7
+ * Field-based helpers (`eq`, `gt`, `lt`, `like`, `isIn`, `between`,
8
+ * `contains`, `overlaps`, `isNull`, ...) compare a *column of the current
9
+ * row* against a value. That only makes sense when a row is in scope — i.e.
10
+ * inside a row-filter callback supplied to a row-searching task. The
11
+ * parameter type is `AppField<"row">`, which is only produced by the row
12
+ * proxy handed to those callbacks. A bare `app.fields.X` at module scope is
13
+ * `AppField<"unscoped">` and will not type-check here.
14
+ *
15
+ * Row-less contexts (e.g. `switchTask` conditions, operator-filter slots)
16
+ * have no row — use `refEq` / `refIn` / `refGt` / `refLt` (with a
17
+ * task-output or trigger `Ref` on the left) or combine those with
18
+ * `and` / `or`. Passing a field descriptor in those contexts is a compile
19
+ * error by design.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * // Field-based (record search / findRelatedRecords filters)
24
+ * eq(app.fields.name, "ACME")
25
+ * eq(app.fields.name, ctx.trigger.vendorName) // Ref auto-typed from field
26
+ * gt(app.fields.amount, 1000)
27
+ *
28
+ * // Ref-based (switch case conditions)
29
+ * refGt(ctx.tasks.metrics.load, ctx.tasks.find.count) // both auto-typed NUMBER
30
+ * refEq(ctx.tasks.lookup.status, "active") // auto-typed TEXT
31
+ * ```
32
+ */
33
+ import { type Ref } from "../ref.js";
34
+ import type { AppField, FieldScope, FieldValueForAppField } from "../../../core/types/app.js";
35
+ import type { WorkflowFieldType } from "../types/field-types.js";
36
+ import type { FilterValue, FilterReference, ValueType, LikeMode, EqualsFilter, GreaterThanFilter, GreaterThanEqualsFilter, LessThanFilter, LessThanEqualsFilter, LikeFilter, InFilter, BetweenFilter, ConsecutiveRangeFilter, ContainsFilter, OverlapsFilter, IsNullFilter, AndFilter, OrFilter, TrueFilter, FalseFilter, FilterExpr } from "./types.js";
37
+ export type { FilterExpr, FilterValue, FilterReference, ValueType, LikeMode, EqualsFilter, GreaterThanFilter, GreaterThanEqualsFilter, LessThanFilter, LessThanEqualsFilter, LikeFilter, InFilter, BetweenFilter, ConsecutiveRangeFilter, ContainsFilter, OverlapsFilter, IsNullFilter, AndFilter, OrFilter, TrueFilter, FalseFilter, } from "./types.js";
38
+ export declare function fieldTypeToValueType(type: WorkflowFieldType): ValueType;
39
+ declare const TYPED_BRAND: unique symbol;
40
+ export interface TypedRef {
41
+ readonly [TYPED_BRAND]: true;
42
+ readonly ref: Ref<unknown>;
43
+ readonly valueType: ValueType;
44
+ }
45
+ /**
46
+ * Annotate a Ref with its ValueType for use in filter values.
47
+ * Use when there is no AppField context (e.g. some switch conditions).
48
+ * With `eq(app.fields.x, ref)`, the field supplies the type automatically.
49
+ */
50
+ export declare function typed(ref: Ref<unknown>, valueType: ValueType): TypedRef;
51
+ export declare function isTypedRef(value: unknown): value is TypedRef;
52
+ /** What the DSL functions accept as a filter value. */
53
+ export type FilterInput = string | number | boolean | null | TypedRef;
54
+ /** Extended input that also accepts bare Ref — used by ref* functions that auto-type from the operator default. */
55
+ export type RefFilterInput = FilterInput | Ref<unknown>;
56
+ /** Extended input that also accepts Ref (auto-typed when paired with AppField). */
57
+ export type FilterFieldInput = FilterInput | Ref<unknown>;
58
+ /**
59
+ * Type-safe filter value — constrains the value type based on the field's type.
60
+ * Refs are always accepted (auto-typed at runtime from the field).
61
+ *
62
+ * Constraint is `AppField<FieldScope>` (any scope) so this alias can be
63
+ * parameterized with either scoped or unscoped fields — the per-helper
64
+ * parameter declarations below are what actually gate to `"row"`.
65
+ */
66
+ export type TypeSafeFilterValue<F extends AppField<FieldScope>> = FieldValueForAppField<F> | Ref<FieldValueForAppField<F>> | TypedRef | null;
67
+ export type TypeSafeFilterValues<F extends AppField<FieldScope>> = (FieldValueForAppField<F> | Ref<FieldValueForAppField<F>> | TypedRef | null)[];
68
+ export declare function refDataToFilterReference(data: import("../ref.js").RefData): FilterReference;
69
+ export declare function toFilterValue(input: FilterInput): FilterValue;
70
+ /**
71
+ * Alias used by every field-based helper below — enforces the scope marker
72
+ * at the type level. Intersecting with `AppField<"row">` adds the phantom
73
+ * `__scope: "row"` tag, which unscoped `app.fields.X` does not carry.
74
+ */
75
+ type RowField = AppField<"row">;
76
+ /** EQUALS filter. Value type is checked against the field's type. Requires a row-scoped field. */
77
+ export declare function eq<F extends RowField>(field: F, value: TypeSafeFilterValue<F>, options?: {
78
+ not?: boolean;
79
+ }): EqualsFilter;
80
+ /** NOT EQUALS shorthand. Requires a row-scoped field. */
81
+ export declare function neq<F extends RowField>(field: F, value: TypeSafeFilterValue<F>): EqualsFilter;
82
+ /** GREATER_THAN filter. Requires a row-scoped field. */
83
+ export declare function gt<F extends RowField>(field: F, value: TypeSafeFilterValue<F>): GreaterThanFilter;
84
+ /** GREATER_THAN_EQUALS filter. Requires a row-scoped field. */
85
+ export declare function gte<F extends RowField>(field: F, value: TypeSafeFilterValue<F>): GreaterThanEqualsFilter;
86
+ /** LESS_THAN filter. Requires a row-scoped field. */
87
+ export declare function lt<F extends RowField>(field: F, value: TypeSafeFilterValue<F>): LessThanFilter;
88
+ /** LESS_THAN_EQUALS filter. Requires a row-scoped field. */
89
+ export declare function lte<F extends RowField>(field: F, value: TypeSafeFilterValue<F>): LessThanEqualsFilter;
90
+ /** LIKE filter with optional mode and case sensitivity. Requires a row-scoped field. */
91
+ export declare function like<F extends RowField>(field: F, value: TypeSafeFilterValue<F>, options?: {
92
+ not?: boolean;
93
+ caseInsensitive?: boolean;
94
+ mode?: LikeMode;
95
+ }): LikeFilter;
96
+ /** IN filter — field matches any of the provided values. Requires a row-scoped field. */
97
+ export declare function isIn<F extends RowField>(field: F, values: TypeSafeFilterValues<F>, options?: {
98
+ not?: boolean;
99
+ }): InFilter;
100
+ /** BETWEEN filter — field is between two values (inclusive). Requires a row-scoped field. */
101
+ export declare function between<F extends RowField>(field: F, low: TypeSafeFilterValue<F>, high: TypeSafeFilterValue<F>): BetweenFilter;
102
+ /**
103
+ * CONSECUTIVE_RANGE filter — field falls within a relative calendar range
104
+ * (`count` `unit`s, shifted `offset` `unit`s back from now). `semantic`
105
+ * selects whether the range snaps to calendar-unit boundaries (`true`) or
106
+ * is a rolling window measured from the current moment (`false`, the
107
+ * default). `unit` is a platform-defined calendar-unit string (e.g.
108
+ * `"QUARTER"`) — not validated here. Requires a row-scoped field.
109
+ */
110
+ export declare function consecutiveRange<F extends RowField>(field: F, options: {
111
+ unit: string;
112
+ count: number;
113
+ offset: number;
114
+ semantic?: boolean;
115
+ }): ConsecutiveRangeFilter;
116
+ /** CONTAINS filter — array field contains all of the provided values. Requires a row-scoped field. */
117
+ export declare function contains<F extends RowField>(field: F, values: TypeSafeFilterValues<F>): ContainsFilter;
118
+ /** OVERLAPS filter — array field overlaps with any of the provided values. Requires a row-scoped field. */
119
+ export declare function overlaps<F extends RowField>(field: F, values: TypeSafeFilterValues<F>): OverlapsFilter;
120
+ /** IS_NULL filter — field is null (or not null when not=true). Requires a row-scoped field. */
121
+ export declare function isNull(field: RowField, options?: {
122
+ not?: boolean;
123
+ }): IsNullFilter;
124
+ /** IS NOT NULL shorthand. Requires a row-scoped field. */
125
+ export declare function isNotNull(field: RowField): IsNullFilter;
126
+ /**
127
+ * EQUALS filter using a Ref as the left-hand side.
128
+ * Bare Refs on the right are auto-typed to match the left (default `"TEXT"`).
129
+ * Use in switch case conditions where plain field names are not available.
130
+ */
131
+ export declare function refEq<T>(left: Ref<T>, right: Ref<T> | FilterInput): EqualsFilter;
132
+ export declare function refEq(left: Ref<unknown>, right: RefFilterInput, leftType: ValueType): EqualsFilter;
133
+ /**
134
+ * IN filter using a Ref as the left-hand side.
135
+ * Bare Refs in the values array are auto-typed to match the left (default `"TEXT"`).
136
+ * Use in switch case conditions where plain field names are not available.
137
+ */
138
+ export declare function refIn<T>(left: Ref<T>, values: (Ref<T> | FilterInput)[]): InFilter;
139
+ export declare function refIn(left: Ref<unknown>, values: RefFilterInput[], leftType: ValueType): InFilter;
140
+ /**
141
+ * GREATER_THAN filter using a Ref as the left-hand side.
142
+ * Bare Refs on the right are auto-typed to `"NUMBER"` (override with `leftType`).
143
+ */
144
+ export declare function refGt<T>(left: Ref<T>, right: Ref<T> | FilterInput): GreaterThanFilter;
145
+ export declare function refGt(left: Ref<unknown>, right: RefFilterInput, leftType: ValueType): GreaterThanFilter;
146
+ /**
147
+ * GREATER_THAN_EQUALS filter using a Ref as the left-hand side.
148
+ * Bare Refs on the right are auto-typed to `"NUMBER"` (override with `leftType`).
149
+ */
150
+ export declare function refGte<T>(left: Ref<T>, right: Ref<T> | FilterInput): GreaterThanEqualsFilter;
151
+ export declare function refGte(left: Ref<unknown>, right: RefFilterInput, leftType: ValueType): GreaterThanEqualsFilter;
152
+ /**
153
+ * LESS_THAN filter using a Ref as the left-hand side.
154
+ * Bare Refs on the right are auto-typed to `"NUMBER"` (override with `leftType`).
155
+ */
156
+ export declare function refLt<T>(left: Ref<T>, right: Ref<T> | FilterInput): LessThanFilter;
157
+ export declare function refLt(left: Ref<unknown>, right: RefFilterInput, leftType: ValueType): LessThanFilter;
158
+ /**
159
+ * LESS_THAN_EQUALS filter using a Ref as the left-hand side.
160
+ * Bare Refs on the right are auto-typed to `"NUMBER"` (override with `leftType`).
161
+ */
162
+ export declare function refLte<T>(left: Ref<T>, right: Ref<T> | FilterInput): LessThanEqualsFilter;
163
+ export declare function refLte(left: Ref<unknown>, right: RefFilterInput, leftType: ValueType): LessThanEqualsFilter;
164
+ /**
165
+ * NOT EQUALS filter using a Ref as the left-hand side.
166
+ * Bare Refs on the right are auto-typed to match the left (default `"TEXT"`).
167
+ */
168
+ export declare function refNotEq<T>(left: Ref<T>, right: Ref<T> | FilterInput): EqualsFilter;
169
+ export declare function refNotEq(left: Ref<unknown>, right: RefFilterInput, leftType: ValueType): EqualsFilter;
170
+ /**
171
+ * LIKE filter using a Ref as the left-hand side. The right side is always a
172
+ * literal pattern (a Ref doesn't make sense as a LIKE pattern).
173
+ */
174
+ export declare function refLike(left: Ref<unknown>, value: string, options?: {
175
+ not?: boolean;
176
+ caseInsensitive?: boolean;
177
+ mode?: LikeMode;
178
+ }, leftType?: ValueType): LikeFilter;
179
+ /**
180
+ * BETWEEN filter using a Ref as the left-hand side (inclusive).
181
+ * Bare Refs for `low`/`high` are auto-typed to match the left (default `"NUMBER"`).
182
+ */
183
+ export declare function refBetween(left: Ref<unknown>, low: RefFilterInput, high: RefFilterInput, options?: {
184
+ not?: boolean;
185
+ }, leftType?: ValueType): BetweenFilter;
186
+ /**
187
+ * CONTAINS filter using a Ref as the left-hand side (array field contains all
188
+ * of the provided values). Bare Refs in `values` are auto-typed to match the
189
+ * left (default `"TEXT"`).
190
+ */
191
+ export declare function refContains(left: Ref<unknown>, values: RefFilterInput[], leftType?: ValueType): ContainsFilter;
192
+ /**
193
+ * OVERLAPS filter using a Ref as the left-hand side (array field overlaps
194
+ * with any of the provided values). Bare Refs in `values` are auto-typed to
195
+ * match the left (default `"TEXT"`).
196
+ */
197
+ export declare function refOverlaps(left: Ref<unknown>, values: RefFilterInput[], leftType?: ValueType): OverlapsFilter;
198
+ /** IS_NULL filter using a Ref as the left-hand side. */
199
+ export declare function refIsNull(left: Ref<unknown>, options?: {
200
+ not?: boolean;
201
+ }, leftType?: ValueType): IsNullFilter;
202
+ /** IS NOT NULL shorthand (ref-LHS). */
203
+ export declare function refIsNotNull(left: Ref<unknown>, leftType?: ValueType): IsNullFilter;
204
+ /** AND — all children must match. */
205
+ export declare function and(...children: FilterExpr[]): AndFilter;
206
+ /** OR — any child must match. */
207
+ export declare function or(...children: FilterExpr[]): OrFilter;
208
+ /** TRUE — matches every row. Mostly used to preserve pulled platform filters. */
209
+ export declare function trueFilter(): TrueFilter;
210
+ /** FALSE — matches no rows. Mostly used to preserve pulled platform filters. */
211
+ export declare function falseFilter(): FalseFilter;