@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,205 @@
1
+ /**
2
+ * v2 automation trigger factories. Each returns a {@link TriggerDef}: the wire
3
+ * trigger envelope (discriminated by kind, mirroring v1's `serializeStoredTrigger`)
4
+ * plus the typed `ctx.trigger` shape. Aspect/field references are `CatalogRef`
5
+ * tokens, resolved at deploy.
6
+ *
7
+ * `onDemand` reuses v1's typed-schema machinery + wire serializer directly —
8
+ * it's reference-model-agnostic (typed params, no id resolution), so there's
9
+ * nothing to retarget; it relocates to a shared home at the cutover.
10
+ */
11
+ import type { AspectRef, FieldRef } from "../../catalog/index.js";
12
+ import type { RecordShape } from "../field/record-shape.js";
13
+ import { type InferTriggerType, type OnDemandTriggerOptions, type TriggerInputFieldDef, type TriggerInputSchema } from "../../core/triggers/on-demand.js";
14
+ import type { TriggerFieldTypeAlias } from "../shared/types/field-types.js";
15
+ import type { Filter } from "./filter.js";
16
+ import { type TriggerChain } from "./build.js";
17
+ /**
18
+ * The record a record-trigger fires on. `A` is the app/element ref passed as
19
+ * `app:` — when it's a real catalog ref (carries a `fields` bag), `record` is
20
+ * typed per-field via `RecordShape`; otherwise it falls back to loose
21
+ * `Record<string, unknown>` (see `RecordShape`'s doc comment).
22
+ */
23
+ export interface RecordTriggerOutput<A extends AspectRef = AspectRef> {
24
+ readonly record: RecordShape<A>;
25
+ /** Raw ids of the fields that changed to fire this trigger (record-update only; empty on create). */
26
+ readonly changedFieldIds: readonly string[];
27
+ }
28
+ export interface RecordTriggerOptions<A extends AspectRef = AspectRef> {
29
+ readonly app: A;
30
+ /** Restrict to fire only when one of these fields changes. */
31
+ readonly changedFields?: readonly FieldRef[];
32
+ readonly thinkUi?: boolean;
33
+ /** Pre-built wire `Filter` (may embed `FieldRef` tokens — resolved at deploy). */
34
+ readonly filter?: Record<string, unknown>;
35
+ }
36
+ /** Fires when a record is created on the given aspect. */
37
+ export declare function recordCreated<A extends AspectRef>(opts: RecordTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
38
+ /** Fires when a record is updated on the given aspect. */
39
+ export declare function recordUpdated<A extends AspectRef>(opts: RecordTriggerOptions<A>): TriggerChain<RecordTriggerOutput<A>>;
40
+ export type ScheduleFrequency = "HOURLY" | "DAILY" | "WEEKLY" | "MONTHLY";
41
+ export type Weekday = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
42
+ export interface ScheduleTriggerOptions {
43
+ readonly frequency: ScheduleFrequency;
44
+ readonly interval?: number;
45
+ readonly timezone: string;
46
+ readonly startAt: string;
47
+ readonly weekdays?: readonly Weekday[];
48
+ readonly dayOfMonth?: number;
49
+ }
50
+ export type ScheduleTriggerOutput = Record<string, never>;
51
+ /** Runs an automation on a recurring schedule. */
52
+ export declare function schedule(opts: ScheduleTriggerOptions): TriggerChain<ScheduleTriggerOutput>;
53
+ /**
54
+ * On-demand (API-invokable) trigger with typed input parameters. Each param
55
+ * becomes `ctx.trigger.<name>` with its declared TS type. Reuses v1's typed
56
+ * schema + wire serializer (both reference-model-agnostic).
57
+ */
58
+ /**
59
+ * Schema values may be full field defs or the bare type alias (v3 shorthand):
60
+ * `onDemand({ STUDENT_NAME: "text" })` ≡ `onDemand({ STUDENT_NAME: { type: "text" } })`.
61
+ * The VALUE schema is the source of truth for both the typed `ctx.trigger` AND
62
+ * the wire trigger-parameter declarations — a bare type parameter would be
63
+ * erased and deploy a trigger with no declared inputs.
64
+ */
65
+ export type TriggerInputSchemaSpec = Record<string, TriggerInputFieldDef | TriggerFieldTypeAlias>;
66
+ /** Normalize a spec entry to the full def shape (type level). */
67
+ type NormalizeSpec<S extends TriggerInputSchemaSpec> = {
68
+ [K in keyof S]: S[K] extends TriggerFieldTypeAlias ? {
69
+ type: S[K];
70
+ } : Extract<S[K], TriggerInputFieldDef>;
71
+ };
72
+ export declare function onDemand<S extends TriggerInputSchemaSpec, Options extends OnDemandTriggerOptions = Record<string, never>>(schema: S, options?: Options): TriggerChain<InferTriggerType<NormalizeSpec<S> & TriggerInputSchema, Options>>;
73
+ export interface WebhookTriggerOptions {
74
+ readonly authenticated?: boolean;
75
+ /** Pre-built wire custom-response envelope. */
76
+ readonly customResponse?: {
77
+ readonly success: {
78
+ readonly enabled: boolean;
79
+ readonly format: "JSON" | "XML" | "Text";
80
+ readonly statusCode: number;
81
+ readonly body: string;
82
+ };
83
+ readonly failure: {
84
+ readonly enabled: boolean;
85
+ readonly format: "JSON" | "XML" | "Text";
86
+ readonly statusCode: number;
87
+ readonly body: string;
88
+ };
89
+ };
90
+ }
91
+ /** The inbound request payload exposed to tasks. */
92
+ export interface WebhookTriggerOutput {
93
+ readonly body: Record<string, unknown>;
94
+ readonly headers: Record<string, unknown>;
95
+ }
96
+ /** Fires on an inbound HTTP webhook. */
97
+ export declare function webHook(opts?: WebhookTriggerOptions): TriggerChain<WebhookTriggerOutput>;
98
+ /** @deprecated Use {@link webHook}. */
99
+ export declare function webhook(opts?: WebhookTriggerOptions): TriggerChain<WebhookTriggerOutput>;
100
+ export type TemporalUnit = "MINUTES" | "HOURS" | "DAYS";
101
+ export interface TemporalTriggerOptions {
102
+ readonly app: AspectRef;
103
+ readonly field: FieldRef;
104
+ readonly temporalUnit: TemporalUnit;
105
+ readonly value: number;
106
+ }
107
+ /** Fires relative to a date/datetime field on records in the given aspect. */
108
+ export declare function temporal(opts: TemporalTriggerOptions): TriggerChain<RecordTriggerOutput>;
109
+ export type approvalProcessStatusUpdatedStatus = "ACTIVE" | "STEP_APPROVED" | "CANCELLED" | "DENIED" | "APPROVED";
110
+ export interface approvalProcessStatusUpdatedTriggerOptions {
111
+ readonly app: AspectRef;
112
+ readonly approvalChain: string;
113
+ readonly status: approvalProcessStatusUpdatedStatus;
114
+ }
115
+ /** Fires when an approval chain on a record changes to the configured status. */
116
+ export declare function approvalProcessStatusUpdated(opts: approvalProcessStatusUpdatedTriggerOptions): TriggerChain<RecordTriggerOutput>;
117
+ export interface AttachmentTriggerOptions<A extends AspectRef = AspectRef> {
118
+ readonly app: A;
119
+ readonly filter?: Filter;
120
+ readonly thinkUi?: boolean;
121
+ }
122
+ export interface AttachmentTriggerOutput<A extends AspectRef = AspectRef> {
123
+ readonly record: RecordShape<A>;
124
+ /** Attachment sub-fields (name/url/mediaType/…) aren't typed yet — follow-up. */
125
+ readonly attachment: Record<string, unknown>;
126
+ }
127
+ /** Fires when an attachment is added to a record on the given aspect. */
128
+ export declare function attachment<A extends AspectRef>(opts: AttachmentTriggerOptions<A>): TriggerChain<AttachmentTriggerOutput<A>>;
129
+ export interface DataMineTriggerOptions {
130
+ readonly datamineId: string;
131
+ readonly fireOnAlert?: boolean;
132
+ readonly fireOnRecovery?: boolean;
133
+ }
134
+ /** Fires when a data mine meets/no longer meets requirements. */
135
+ export declare function dataMine(opts: DataMineTriggerOptions): TriggerChain<Record<string, unknown>>;
136
+ export interface EmailReceivedTriggerOptions {
137
+ readonly emailAliasId: string;
138
+ }
139
+ export interface EmailReceivedTriggerOutput {
140
+ readonly email_id: string;
141
+ readonly sender_email: string;
142
+ readonly sender_name: string;
143
+ readonly subject: string;
144
+ readonly body: string;
145
+ /** The rich-text/HTML rendering of the email body — a distinct platform trigger reference (wire name `bodyHtml`) from the plain-text `body`. */
146
+ readonly body_html: string;
147
+ readonly attachments: readonly Record<string, unknown>[];
148
+ readonly timestamp: string;
149
+ }
150
+ /** Fires when an email is received by the platform email alias. */
151
+ export declare function emailReceived(opts: EmailReceivedTriggerOptions): TriggerChain<EmailReceivedTriggerOutput>;
152
+ export interface CommentAddedTriggerOptions<A extends AspectRef = AspectRef> {
153
+ readonly app: A;
154
+ /** Conversation type the comment was added to (e.g. `"INTERNAL"`). */
155
+ readonly conversationType: string;
156
+ readonly filter?: Filter;
157
+ }
158
+ export interface CommentAddedTriggerOutput<A extends AspectRef = AspectRef> {
159
+ readonly record: RecordShape<A>;
160
+ /** Comment sub-fields aren't typed yet — follow-up. */
161
+ readonly comment: Record<string, unknown>;
162
+ }
163
+ /** Fires when a comment is added to a record on the given aspect. */
164
+ export declare function commentAdded<A extends AspectRef>(opts: CommentAddedTriggerOptions<A>): TriggerChain<CommentAddedTriggerOutput<A>>;
165
+ export type ConversationEndConversationType = "A2A" | "VOICE" | "EMAIL" | "SLACK" | "TEAMS";
166
+ export interface ConversationEndTriggerOptions {
167
+ readonly app: AspectRef;
168
+ readonly conversationType: ConversationEndConversationType;
169
+ }
170
+ export interface ConversationEndTriggerOutput {
171
+ readonly record: Record<string, unknown>;
172
+ readonly transcript: string;
173
+ }
174
+ /** Fires when a conversation of the selected type ends on the given aspect. */
175
+ export declare function conversationEnd(opts: ConversationEndTriggerOptions): TriggerChain<ConversationEndTriggerOutput>;
176
+ export interface SlackMessageTriggerOutput {
177
+ /** Slack thread id when the inbound message is part of a thread. */
178
+ readonly threadId: string;
179
+ readonly channelId: string;
180
+ readonly authorEmail: string;
181
+ readonly authorId: string;
182
+ readonly authorName: string;
183
+ readonly content: string;
184
+ readonly messageId: string;
185
+ readonly meta: Record<string, unknown>;
186
+ /** Compatibility aliases retained for existing automations. */
187
+ readonly slackThreadId: string;
188
+ readonly slackChannelId: string;
189
+ readonly messageAuthorEmail: string;
190
+ readonly messageAuthorId: string;
191
+ readonly messageAuthorName: string;
192
+ readonly messageContent: string;
193
+ readonly messageMetadata: Record<string, unknown>;
194
+ }
195
+ /** Fires when a Slack message is received. */
196
+ export declare function slackMessage(): TriggerChain<SlackMessageTriggerOutput>;
197
+ export interface SurveyResponseCreateTriggerOptions {
198
+ readonly app: AspectRef;
199
+ /** Raw survey template id until surveys are catalog-modeled. */
200
+ readonly survey: string;
201
+ }
202
+ export type SurveyResponseCreateTriggerOutput = Record<string, unknown>;
203
+ /** Fires when a response is created for the selected survey template. */
204
+ export declare function surveyResponseCreate(opts: SurveyResponseCreateTriggerOptions): TriggerChain<SurveyResponseCreateTriggerOutput>;
205
+ export {};
@@ -0,0 +1,202 @@
1
+ import { serializeOnDemandTrigger, } from "../../core/triggers/on-demand.js";
2
+ import { chainableTrigger } from "./build.js";
3
+ function recordTriggerFields(opts) {
4
+ return {
5
+ aspectId: opts.app, // token → aspect id at deploy
6
+ ...(opts.changedFields !== undefined ? { changedFieldIds: opts.changedFields } : {}),
7
+ ...(opts.thinkUi !== undefined ? { thinkUi: opts.thinkUi } : {}),
8
+ ...(opts.filter !== undefined ? { filter: opts.filter } : {}),
9
+ };
10
+ }
11
+ /** Fires when a record is created on the given aspect. */
12
+ export function recordCreated(opts) {
13
+ return chainableTrigger({ wire: { createRecord: recordTriggerFields(opts) }, __recordApp: opts.app.refName });
14
+ }
15
+ /** Fires when a record is updated on the given aspect. */
16
+ export function recordUpdated(opts) {
17
+ return chainableTrigger({ wire: { updateRecord: recordTriggerFields(opts) }, __recordApp: opts.app.refName });
18
+ }
19
+ function buildRrule(opts) {
20
+ const parts = [`FREQ=${opts.frequency}`];
21
+ const interval = opts.interval ?? 1;
22
+ if (interval > 1) {
23
+ parts.push(`INTERVAL=${interval}`);
24
+ }
25
+ if (opts.frequency === "WEEKLY" && opts.weekdays && opts.weekdays.length > 0) {
26
+ const map = {
27
+ MONDAY: "MO",
28
+ TUESDAY: "TU",
29
+ WEDNESDAY: "WE",
30
+ THURSDAY: "TH",
31
+ FRIDAY: "FR",
32
+ SATURDAY: "SA",
33
+ SUNDAY: "SU",
34
+ };
35
+ const byday = opts.weekdays
36
+ .map((w) => map[w.toUpperCase()])
37
+ .filter(Boolean)
38
+ .join(",");
39
+ if (byday) {
40
+ parts.push(`BYDAY=${byday}`);
41
+ }
42
+ }
43
+ else if (opts.frequency === "MONTHLY" && opts.dayOfMonth !== undefined) {
44
+ parts.push(`BYMONTHDAY=${opts.dayOfMonth}`);
45
+ }
46
+ return parts.join(";");
47
+ }
48
+ /** Runs an automation on a recurring schedule. */
49
+ export function schedule(opts) {
50
+ const rrule = buildRrule(opts);
51
+ return chainableTrigger({
52
+ wire: {
53
+ schedule: {
54
+ rrule,
55
+ dtStart: opts.startAt,
56
+ startAt: opts.startAt,
57
+ timezone: opts.timezone,
58
+ frequency: opts.frequency,
59
+ interval: opts.interval ?? 1,
60
+ type: "SCHEDULE",
61
+ ...(opts.frequency === "WEEKLY" && opts.weekdays !== undefined ? { weekdays: opts.weekdays } : {}),
62
+ ...(opts.frequency === "MONTHLY" && opts.dayOfMonth !== undefined ? { dayOfMonth: opts.dayOfMonth } : {}),
63
+ },
64
+ },
65
+ });
66
+ }
67
+ export function onDemand(schema, options) {
68
+ const normalized = Object.fromEntries(Object.entries(schema).map(([k, v]) => [k, typeof v === "string" ? { type: v } : v]));
69
+ return chainableTrigger({
70
+ wire: serializeOnDemandTrigger(normalized, options),
71
+ __params: Object.entries(normalized).map(([name, def]) => ({ name, required: def.required ?? false })),
72
+ });
73
+ }
74
+ /** Fires on an inbound HTTP webhook. */
75
+ export function webHook(opts = {}) {
76
+ return chainableTrigger({
77
+ wire: {
78
+ webhook: {
79
+ ...(opts.authenticated !== undefined ? { authenticated: opts.authenticated } : {}),
80
+ ...(opts.customResponse !== undefined ? { customResponse: opts.customResponse } : {}),
81
+ },
82
+ },
83
+ });
84
+ }
85
+ /** @deprecated Use {@link webHook}. */
86
+ export function webhook(opts = {}) {
87
+ return webHook(opts);
88
+ }
89
+ /** Fires relative to a date/datetime field on records in the given aspect. */
90
+ export function temporal(opts) {
91
+ return chainableTrigger({
92
+ wire: {
93
+ temporal: {
94
+ aspectId: opts.app,
95
+ aspectFieldId: opts.field,
96
+ temporalUnit: opts.temporalUnit,
97
+ value: opts.value,
98
+ type: "TEMPORAL",
99
+ },
100
+ },
101
+ __recordApp: opts.app.refName,
102
+ });
103
+ }
104
+ /** Fires when an approval chain on a record changes to the configured status. */
105
+ export function approvalProcessStatusUpdated(opts) {
106
+ return chainableTrigger({
107
+ wire: {
108
+ approvalChain: {
109
+ aspectId: opts.app,
110
+ approvalChainTemplateId: opts.approvalChain,
111
+ status: opts.status,
112
+ type: "APPROVAL_CHAIN_UPDATE",
113
+ },
114
+ },
115
+ __recordApp: opts.app.refName,
116
+ });
117
+ }
118
+ /** Fires when an attachment is added to a record on the given aspect. */
119
+ export function attachment(opts) {
120
+ return chainableTrigger({
121
+ wire: {
122
+ attachment: {
123
+ aspectId: opts.app,
124
+ type: "ATTACHMENT_UPDATE",
125
+ ...(opts.filter !== undefined ? { filter: opts.filter } : {}),
126
+ ...(opts.thinkUi !== undefined ? { thinkUi: opts.thinkUi } : {}),
127
+ },
128
+ },
129
+ __recordApp: opts.app.refName,
130
+ });
131
+ }
132
+ /** Fires when a data mine meets/no longer meets requirements. */
133
+ export function dataMine(opts) {
134
+ return chainableTrigger({
135
+ wire: {
136
+ datamine: {
137
+ datamineId: opts.datamineId,
138
+ type: "DATAMINE",
139
+ ...(opts.fireOnAlert !== undefined ? { fireOnAlert: opts.fireOnAlert } : {}),
140
+ ...(opts.fireOnRecovery !== undefined ? { fireOnRecovery: opts.fireOnRecovery } : {}),
141
+ },
142
+ },
143
+ });
144
+ }
145
+ /** Fires when an email is received by the platform email alias. */
146
+ export function emailReceived(opts) {
147
+ return chainableTrigger({
148
+ wire: {
149
+ emailReceived: {
150
+ emailAliasId: opts.emailAliasId,
151
+ type: "EMAIL_INGESTION",
152
+ },
153
+ },
154
+ });
155
+ }
156
+ /** Fires when a comment is added to a record on the given aspect. */
157
+ export function commentAdded(opts) {
158
+ return chainableTrigger({
159
+ wire: {
160
+ commentAdded: {
161
+ aspectId: opts.app,
162
+ conversationType: opts.conversationType,
163
+ ...(opts.filter !== undefined ? { filter: opts.filter } : {}),
164
+ },
165
+ },
166
+ __recordApp: opts.app.refName,
167
+ });
168
+ }
169
+ /** Fires when a conversation of the selected type ends on the given aspect. */
170
+ export function conversationEnd(opts) {
171
+ return chainableTrigger({
172
+ wire: {
173
+ conversationEnd: {
174
+ aspectId: opts.app,
175
+ conversationType: opts.conversationType,
176
+ type: "CONVERSATION_END",
177
+ },
178
+ },
179
+ });
180
+ }
181
+ /** Fires when a Slack message is received. */
182
+ export function slackMessage() {
183
+ return chainableTrigger({
184
+ wire: {
185
+ slackMessage: {
186
+ type: "SLACK_MESSAGE",
187
+ },
188
+ },
189
+ });
190
+ }
191
+ /** Fires when a response is created for the selected survey template. */
192
+ export function surveyResponseCreate(opts) {
193
+ return chainableTrigger({
194
+ wire: {
195
+ survey: {
196
+ aspectId: opts.app,
197
+ surveyTemplateId: opts.survey,
198
+ type: "SURVEY_RESPONSE_CREATE",
199
+ },
200
+ },
201
+ });
202
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * The automation sub-type tables (Phase 1). An automation is a COMPOSITE: one
3
+ * `elementum_automation` + one `elementum_workflow_publish` + one trigger block
4
+ * + N task blocks, each trigger/task kind its own terraform resource type. This
5
+ * is the automation analogue of `entities/agent-tool/types.ts`: per-sub-type
6
+ * knowledge is one ROW, and only *implemented* kinds round-trip.
7
+ *
8
+ * Phase 1 implements the `onDemand` trigger and the `executeScript` +
9
+ * `setVariable` (create form) tasks end to end. Every other kind is DECLARED so
10
+ * the pull partition REPORTS it by name (plan §6) instead of "unknown resource",
11
+ * and adoption/build-vs-export scope ONLY the implemented resource types — an adopted
12
+ * kind the printer can't reconstruct would plan as a destroy on rebuild.
13
+ *
14
+ * `typeKey` is the wire discriminant the authoring builders emit
15
+ * (`triggers.ts` trigger `wire` keys, `tasks.ts` `TaskDef.key`); `resourceType`
16
+ * is the terraform type ei's export uses. Only the implemented rows' `typeKey`
17
+ * is load-bearing (to-tf maps authored → resource by it); the declared rows
18
+ * need only an accurate `resourceType` for from-tf recognition.
19
+ */
20
+ export interface AutomationSubType {
21
+ /** Wire discriminant: a trigger `wire` key or a `TaskDef.key`. */
22
+ readonly typeKey: string;
23
+ /** Terraform resource type, e.g. "elementum_on_demand_trigger". */
24
+ readonly resourceType: string;
25
+ /** Round-trips on the terraform path (to-tf + from-tf + printer). */
26
+ readonly implemented?: true;
27
+ }
28
+ /** The automation's own resource + its versioning/publish resource. */
29
+ export declare const AUTOMATION_RESOURCE_TYPE = "elementum_automation";
30
+ export declare const WORKFLOW_PUBLISH_RESOURCE_TYPE = "elementum_workflow_publish";
31
+ /** Trigger kinds. One trigger per automation. Phase 1: onDemand only. */
32
+ export declare const TRIGGER_SUB_TYPES: readonly AutomationSubType[];
33
+ /**
34
+ * Task kinds. All rows are implemented as of `aiFileAnalysis` (the last
35
+ * holdout — it needs its `elementum_ai_file_reader` target to also round-trip,
36
+ * see `entities/file-reader/types.ts`). `variable` (setVariable's create
37
+ * form) is the one worth calling out: the tf dialect carries ONE variable per
38
+ * task as variable_name/variable_type/value, and the provider's variable_id
39
+ * is COMPUTED, so the compose-path client UUID never reaches HCL. A future
40
+ * new task kind lands here declared-only first (see the doc comment on
41
+ * {@link ALL_AUTOMATION_TASK_TYPE_SET} below) until its row flips implemented.
42
+ */
43
+ export declare const TASK_SUB_TYPES: readonly AutomationSubType[];
44
+ export declare const BRANCH_SUB_TYPES: readonly AutomationSubType[];
45
+ export declare const ALL_AUTOMATION_SUB_TYPES: readonly AutomationSubType[];
46
+ export declare const AUTOMATION_SUB_TYPE_BY_TYPE_KEY: ReadonlyMap<string, AutomationSubType>;
47
+ export declare const AUTOMATION_SUB_TYPE_BY_RESOURCE: ReadonlyMap<string, AutomationSubType>;
48
+ /** Trigger/task resource types the terraform path round-trips today. */
49
+ export declare const IMPLEMENTED_TRIGGER_RESOURCE_TYPES: readonly string[];
50
+ export declare const IMPLEMENTED_TASK_RESOURCE_TYPES: readonly string[];
51
+ /**
52
+ * The resource types adoption/build-vs-export scope for automations: the automation +
53
+ * workflow_publish skeleton plus the implemented trigger/task kinds. Composite,
54
+ * so the whole set moves together.
55
+ */
56
+ export declare const IMPLEMENTED_AUTOMATION_RESOURCE_TYPES: readonly string[];
57
+ /** Every declared automation-family resource type — the partition recognizes these by name. */
58
+ export declare const ALL_AUTOMATION_RESOURCE_TYPES: readonly string[];
59
+ export declare const AUTOMATION_RESOURCE_TYPES: readonly string[];
60
+ export declare const AUTOMATION_TRIGGER_TYPES: readonly string[];
61
+ export declare const AUTOMATION_TASK_TYPES: readonly string[];
62
+ export declare const AUTOMATION_BRANCH_TYPES: string[];
63
+ export declare const AUTOMATION_TRIGGER_TYPE_SET: ReadonlySet<string>;
64
+ export declare const AUTOMATION_TASK_TYPE_SET: ReadonlySet<string>;
65
+ /**
66
+ * Every DECLARED task resource type, implemented or not — for from-tf's graph
67
+ * walk (which task blocks belong to this automation's tree) and its
68
+ * dependency-recognition checks. Deliberately broader than
69
+ * {@link AUTOMATION_TASK_TYPE_SET} (implemented-only, the adoption/build-vs-export
70
+ * scope): a declared-but-unimplemented type (none currently declared — a
71
+ * future new task kind lands here first, before its row flips implemented)
72
+ * must still be walked into the task graph so from-tf's own dedicated
73
+ * diagnostic for it fires, rather than the block silently falling out of the
74
+ * graph and surfacing as an unrelated "unresolved parent"/"orphaned task"
75
+ * error.
76
+ */
77
+ export declare const ALL_AUTOMATION_TASK_TYPE_SET: ReadonlySet<string>;
78
+ export declare const AUTOMATION_BRANCH_TYPE_SET: ReadonlySet<string>;
@@ -0,0 +1,131 @@
1
+ /**
2
+ * The automation sub-type tables (Phase 1). An automation is a COMPOSITE: one
3
+ * `elementum_automation` + one `elementum_workflow_publish` + one trigger block
4
+ * + N task blocks, each trigger/task kind its own terraform resource type. This
5
+ * is the automation analogue of `entities/agent-tool/types.ts`: per-sub-type
6
+ * knowledge is one ROW, and only *implemented* kinds round-trip.
7
+ *
8
+ * Phase 1 implements the `onDemand` trigger and the `executeScript` +
9
+ * `setVariable` (create form) tasks end to end. Every other kind is DECLARED so
10
+ * the pull partition REPORTS it by name (plan §6) instead of "unknown resource",
11
+ * and adoption/build-vs-export scope ONLY the implemented resource types — an adopted
12
+ * kind the printer can't reconstruct would plan as a destroy on rebuild.
13
+ *
14
+ * `typeKey` is the wire discriminant the authoring builders emit
15
+ * (`triggers.ts` trigger `wire` keys, `tasks.ts` `TaskDef.key`); `resourceType`
16
+ * is the terraform type ei's export uses. Only the implemented rows' `typeKey`
17
+ * is load-bearing (to-tf maps authored → resource by it); the declared rows
18
+ * need only an accurate `resourceType` for from-tf recognition.
19
+ */
20
+ /** The automation's own resource + its versioning/publish resource. */
21
+ export const AUTOMATION_RESOURCE_TYPE = "elementum_automation";
22
+ export const WORKFLOW_PUBLISH_RESOURCE_TYPE = "elementum_workflow_publish";
23
+ /** Trigger kinds. One trigger per automation. Phase 1: onDemand only. */
24
+ export const TRIGGER_SUB_TYPES = [
25
+ { typeKey: "onDemand", resourceType: "elementum_on_demand_trigger", implemented: true },
26
+ { typeKey: "createRecord", resourceType: "elementum_record_created_trigger", implemented: true },
27
+ { typeKey: "updateRecord", resourceType: "elementum_record_updated_trigger", implemented: true },
28
+ { typeKey: "webhook", resourceType: "elementum_webhook_trigger", implemented: true },
29
+ { typeKey: "approvalChain", resourceType: "elementum_approval_chain_trigger", implemented: true },
30
+ { typeKey: "attachment", resourceType: "elementum_attachment_added_trigger", implemented: true },
31
+ { typeKey: "datamine", resourceType: "elementum_datamine_trigger", implemented: true },
32
+ { typeKey: "emailReceived", resourceType: "elementum_email_ingestion_trigger", implemented: true },
33
+ { typeKey: "commentAdded", resourceType: "elementum_comment_added_trigger", implemented: true },
34
+ { typeKey: "conversationEnd", resourceType: "elementum_agent_conversation_ended_trigger", implemented: true },
35
+ { typeKey: "slackMessage", resourceType: "elementum_slack_message_trigger", implemented: true },
36
+ { typeKey: "survey", resourceType: "elementum_survey_trigger", implemented: true },
37
+ ];
38
+ /**
39
+ * Task kinds. All rows are implemented as of `aiFileAnalysis` (the last
40
+ * holdout — it needs its `elementum_ai_file_reader` target to also round-trip,
41
+ * see `entities/file-reader/types.ts`). `variable` (setVariable's create
42
+ * form) is the one worth calling out: the tf dialect carries ONE variable per
43
+ * task as variable_name/variable_type/value, and the provider's variable_id
44
+ * is COMPUTED, so the compose-path client UUID never reaches HCL. A future
45
+ * new task kind lands here declared-only first (see the doc comment on
46
+ * {@link ALL_AUTOMATION_TASK_TYPE_SET} below) until its row flips implemented.
47
+ */
48
+ export const TASK_SUB_TYPES = [
49
+ { typeKey: "executeScript", resourceType: "elementum_execute_script_task", implemented: true },
50
+ { typeKey: "variable", resourceType: "elementum_variable_task", implemented: true },
51
+ { typeKey: "updateVariable", resourceType: "elementum_update_variable_task", implemented: true },
52
+ { typeKey: "updateField", resourceType: "elementum_update_field_task", implemented: true },
53
+ { typeKey: "recordSearch", resourceType: "elementum_record_search_task", implemented: true },
54
+ { typeKey: "tableRecordsSearch", resourceType: "elementum_table_records_search_task", implemented: true },
55
+ { typeKey: "createRecord", resourceType: "elementum_create_record_task", implemented: true },
56
+ { typeKey: "findRelatedRecords", resourceType: "elementum_find_related_records_task", implemented: true },
57
+ { typeKey: "relateRecords", resourceType: "elementum_relate_records_task", implemented: true },
58
+ { typeKey: "sendEmail", resourceType: "elementum_send_email_task", implemented: true },
59
+ { typeKey: "message", resourceType: "elementum_message_task", implemented: true },
60
+ { typeKey: "notification", resourceType: "elementum_notification_task", implemented: true },
61
+ { typeKey: "aiAgent", resourceType: "elementum_ai_agent_task", implemented: true },
62
+ { typeKey: "aiClassify", resourceType: "elementum_ai_classify_task", implemented: true },
63
+ { typeKey: "aiSummarize", resourceType: "elementum_ai_summarize_task", implemented: true },
64
+ { typeKey: "aiTransform", resourceType: "elementum_ai_transform_task", implemented: true },
65
+ { typeKey: "aiSearchTable", resourceType: "elementum_ai_search_table_task", implemented: true },
66
+ { typeKey: "aiFileAnalysis", resourceType: "elementum_ai_file_read_task", implemented: true },
67
+ { typeKey: "api", resourceType: "elementum_api_task", implemented: true },
68
+ { typeKey: "calculation", resourceType: "elementum_calculation_task", implemented: true },
69
+ { typeKey: "procedure", resourceType: "elementum_procedure_task", implemented: true },
70
+ { typeKey: "runAutomation", resourceType: "elementum_run_automation_task", implemented: true },
71
+ { typeKey: "documentModel", resourceType: "elementum_file_reader_task", implemented: true },
72
+ { typeKey: "approvalChain", resourceType: "elementum_approval_chain_task", implemented: true },
73
+ { typeKey: "approvalStatusUpdate", resourceType: "elementum_approval_status_update_task", implemented: true },
74
+ { typeKey: "addWatcher", resourceType: "elementum_add_watcher_task", implemented: true },
75
+ { typeKey: "saveAttachment", resourceType: "elementum_save_attachment_task", implemented: true },
76
+ { typeKey: "userSearch", resourceType: "elementum_user_search_task", implemented: true },
77
+ { typeKey: "aspectRecordFieldLocking", resourceType: "elementum_aspect_record_field_locking_task", implemented: true },
78
+ { typeKey: "initiateCall", resourceType: "elementum_initiate_call_task", implemented: true },
79
+ // Operators (branching) — later phases:
80
+ { typeKey: "forEach", resourceType: "elementum_for_each_task", implemented: true },
81
+ { typeKey: "forkJoin", resourceType: "elementum_fork_join_task", implemented: true },
82
+ { typeKey: "switch", resourceType: "elementum_switch_task", implemented: true },
83
+ ];
84
+ export const BRANCH_SUB_TYPES = [
85
+ { typeKey: "switchCase", resourceType: "elementum_switch_case", implemented: true },
86
+ { typeKey: "forkJoinBranch", resourceType: "elementum_fork_join_branch", implemented: true },
87
+ ];
88
+ export const ALL_AUTOMATION_SUB_TYPES = [...TRIGGER_SUB_TYPES, ...TASK_SUB_TYPES, ...BRANCH_SUB_TYPES];
89
+ export const AUTOMATION_SUB_TYPE_BY_TYPE_KEY = new Map(ALL_AUTOMATION_SUB_TYPES.map((t) => [t.typeKey, t]));
90
+ export const AUTOMATION_SUB_TYPE_BY_RESOURCE = new Map(ALL_AUTOMATION_SUB_TYPES.map((t) => [t.resourceType, t]));
91
+ /** Trigger/task resource types the terraform path round-trips today. */
92
+ export const IMPLEMENTED_TRIGGER_RESOURCE_TYPES = TRIGGER_SUB_TYPES.filter((t) => t.implemented === true).map((t) => t.resourceType);
93
+ export const IMPLEMENTED_TASK_RESOURCE_TYPES = TASK_SUB_TYPES.filter((t) => t.implemented === true).map((t) => t.resourceType);
94
+ /**
95
+ * The resource types adoption/build-vs-export scope for automations: the automation +
96
+ * workflow_publish skeleton plus the implemented trigger/task kinds. Composite,
97
+ * so the whole set moves together.
98
+ */
99
+ export const IMPLEMENTED_AUTOMATION_RESOURCE_TYPES = [
100
+ AUTOMATION_RESOURCE_TYPE,
101
+ WORKFLOW_PUBLISH_RESOURCE_TYPE,
102
+ ...IMPLEMENTED_TRIGGER_RESOURCE_TYPES,
103
+ ...IMPLEMENTED_TASK_RESOURCE_TYPES,
104
+ ...BRANCH_SUB_TYPES.map((t) => t.resourceType),
105
+ ];
106
+ /** Every declared automation-family resource type — the partition recognizes these by name. */
107
+ export const ALL_AUTOMATION_RESOURCE_TYPES = [
108
+ AUTOMATION_RESOURCE_TYPE,
109
+ WORKFLOW_PUBLISH_RESOURCE_TYPE,
110
+ ...ALL_AUTOMATION_SUB_TYPES.map((t) => t.resourceType),
111
+ ];
112
+ export const AUTOMATION_RESOURCE_TYPES = IMPLEMENTED_AUTOMATION_RESOURCE_TYPES;
113
+ export const AUTOMATION_TRIGGER_TYPES = IMPLEMENTED_TRIGGER_RESOURCE_TYPES;
114
+ export const AUTOMATION_TASK_TYPES = IMPLEMENTED_TASK_RESOURCE_TYPES;
115
+ export const AUTOMATION_BRANCH_TYPES = BRANCH_SUB_TYPES.map((t) => t.resourceType);
116
+ export const AUTOMATION_TRIGGER_TYPE_SET = new Set(AUTOMATION_TRIGGER_TYPES);
117
+ export const AUTOMATION_TASK_TYPE_SET = new Set(AUTOMATION_TASK_TYPES);
118
+ /**
119
+ * Every DECLARED task resource type, implemented or not — for from-tf's graph
120
+ * walk (which task blocks belong to this automation's tree) and its
121
+ * dependency-recognition checks. Deliberately broader than
122
+ * {@link AUTOMATION_TASK_TYPE_SET} (implemented-only, the adoption/build-vs-export
123
+ * scope): a declared-but-unimplemented type (none currently declared — a
124
+ * future new task kind lands here first, before its row flips implemented)
125
+ * must still be walked into the task graph so from-tf's own dedicated
126
+ * diagnostic for it fires, rather than the block silently falling out of the
127
+ * graph and surfacing as an unrelated "unresolved parent"/"orphaned task"
128
+ * error.
129
+ */
130
+ export const ALL_AUTOMATION_TASK_TYPE_SET = new Set(TASK_SUB_TYPES.map((t) => t.resourceType));
131
+ export const AUTOMATION_BRANCH_TYPE_SET = new Set(AUTOMATION_BRANCH_TYPES);