codika 3.0.0

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 (403) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +68 -0
  3. package/dist/cli/commands/completion.d.ts +15 -0
  4. package/dist/cli/commands/completion.d.ts.map +1 -0
  5. package/dist/cli/commands/completion.js +810 -0
  6. package/dist/cli/commands/completion.js.map +1 -0
  7. package/dist/cli/commands/config/clear.d.ts +12 -0
  8. package/dist/cli/commands/config/clear.d.ts.map +1 -0
  9. package/dist/cli/commands/config/clear.js +35 -0
  10. package/dist/cli/commands/config/clear.js.map +1 -0
  11. package/dist/cli/commands/config/index.d.ts +15 -0
  12. package/dist/cli/commands/config/index.d.ts.map +1 -0
  13. package/dist/cli/commands/config/index.js +21 -0
  14. package/dist/cli/commands/config/index.js.map +1 -0
  15. package/dist/cli/commands/config/set.d.ts +41 -0
  16. package/dist/cli/commands/config/set.d.ts.map +1 -0
  17. package/dist/cli/commands/config/set.js +185 -0
  18. package/dist/cli/commands/config/set.js.map +1 -0
  19. package/dist/cli/commands/config/show.d.ts +12 -0
  20. package/dist/cli/commands/config/show.d.ts.map +1 -0
  21. package/dist/cli/commands/config/show.js +45 -0
  22. package/dist/cli/commands/config/show.js.map +1 -0
  23. package/dist/cli/commands/deploy/documents.d.ts +12 -0
  24. package/dist/cli/commands/deploy/documents.d.ts.map +1 -0
  25. package/dist/cli/commands/deploy/documents.js +217 -0
  26. package/dist/cli/commands/deploy/documents.js.map +1 -0
  27. package/dist/cli/commands/deploy/index.d.ts +14 -0
  28. package/dist/cli/commands/deploy/index.d.ts.map +1 -0
  29. package/dist/cli/commands/deploy/index.js +21 -0
  30. package/dist/cli/commands/deploy/index.js.map +1 -0
  31. package/dist/cli/commands/deploy/process-data-ingestion.d.ts +13 -0
  32. package/dist/cli/commands/deploy/process-data-ingestion.d.ts.map +1 -0
  33. package/dist/cli/commands/deploy/process-data-ingestion.js +226 -0
  34. package/dist/cli/commands/deploy/process-data-ingestion.js.map +1 -0
  35. package/dist/cli/commands/deploy/use-case.d.ts +9 -0
  36. package/dist/cli/commands/deploy/use-case.d.ts.map +1 -0
  37. package/dist/cli/commands/deploy/use-case.js +212 -0
  38. package/dist/cli/commands/deploy/use-case.js.map +1 -0
  39. package/dist/cli/commands/get/execution.d.ts +9 -0
  40. package/dist/cli/commands/get/execution.d.ts.map +1 -0
  41. package/dist/cli/commands/get/execution.js +159 -0
  42. package/dist/cli/commands/get/execution.js.map +1 -0
  43. package/dist/cli/commands/get/index.d.ts +13 -0
  44. package/dist/cli/commands/get/index.d.ts.map +1 -0
  45. package/dist/cli/commands/get/index.js +20 -0
  46. package/dist/cli/commands/get/index.js.map +1 -0
  47. package/dist/cli/commands/get/skills.d.ts +15 -0
  48. package/dist/cli/commands/get/skills.d.ts.map +1 -0
  49. package/dist/cli/commands/get/skills.js +135 -0
  50. package/dist/cli/commands/get/skills.js.map +1 -0
  51. package/dist/cli/commands/get/use-case.d.ts +9 -0
  52. package/dist/cli/commands/get/use-case.d.ts.map +1 -0
  53. package/dist/cli/commands/get/use-case.js +186 -0
  54. package/dist/cli/commands/get/use-case.js.map +1 -0
  55. package/dist/cli/commands/init.d.ts +14 -0
  56. package/dist/cli/commands/init.d.ts.map +1 -0
  57. package/dist/cli/commands/init.js +347 -0
  58. package/dist/cli/commands/init.js.map +1 -0
  59. package/dist/cli/commands/integration/delete.d.ts +13 -0
  60. package/dist/cli/commands/integration/delete.d.ts.map +1 -0
  61. package/dist/cli/commands/integration/delete.js +140 -0
  62. package/dist/cli/commands/integration/delete.js.map +1 -0
  63. package/dist/cli/commands/integration/index.d.ts +13 -0
  64. package/dist/cli/commands/integration/index.d.ts.map +1 -0
  65. package/dist/cli/commands/integration/index.js +20 -0
  66. package/dist/cli/commands/integration/index.js.map +1 -0
  67. package/dist/cli/commands/integration/list.d.ts +13 -0
  68. package/dist/cli/commands/integration/list.d.ts.map +1 -0
  69. package/dist/cli/commands/integration/list.js +129 -0
  70. package/dist/cli/commands/integration/list.js.map +1 -0
  71. package/dist/cli/commands/integration/set.d.ts +13 -0
  72. package/dist/cli/commands/integration/set.d.ts.map +1 -0
  73. package/dist/cli/commands/integration/set.js +253 -0
  74. package/dist/cli/commands/integration/set.js.map +1 -0
  75. package/dist/cli/commands/list/executions.d.ts +12 -0
  76. package/dist/cli/commands/list/executions.d.ts.map +1 -0
  77. package/dist/cli/commands/list/executions.js +168 -0
  78. package/dist/cli/commands/list/executions.js.map +1 -0
  79. package/dist/cli/commands/list/index.d.ts +11 -0
  80. package/dist/cli/commands/list/index.d.ts.map +1 -0
  81. package/dist/cli/commands/list/index.js +14 -0
  82. package/dist/cli/commands/list/index.js.map +1 -0
  83. package/dist/cli/commands/logout.d.ts +12 -0
  84. package/dist/cli/commands/logout.d.ts.map +1 -0
  85. package/dist/cli/commands/logout.js +58 -0
  86. package/dist/cli/commands/logout.js.map +1 -0
  87. package/dist/cli/commands/project/create.d.ts +8 -0
  88. package/dist/cli/commands/project/create.d.ts.map +1 -0
  89. package/dist/cli/commands/project/create.js +109 -0
  90. package/dist/cli/commands/project/create.js.map +1 -0
  91. package/dist/cli/commands/project/index.d.ts +12 -0
  92. package/dist/cli/commands/project/index.d.ts.map +1 -0
  93. package/dist/cli/commands/project/index.js +15 -0
  94. package/dist/cli/commands/project/index.js.map +1 -0
  95. package/dist/cli/commands/publish.d.ts +12 -0
  96. package/dist/cli/commands/publish.d.ts.map +1 -0
  97. package/dist/cli/commands/publish.js +152 -0
  98. package/dist/cli/commands/publish.js.map +1 -0
  99. package/dist/cli/commands/redeploy.d.ts +11 -0
  100. package/dist/cli/commands/redeploy.d.ts.map +1 -0
  101. package/dist/cli/commands/redeploy.js +166 -0
  102. package/dist/cli/commands/redeploy.js.map +1 -0
  103. package/dist/cli/commands/status.d.ts +63 -0
  104. package/dist/cli/commands/status.d.ts.map +1 -0
  105. package/dist/cli/commands/status.js +290 -0
  106. package/dist/cli/commands/status.js.map +1 -0
  107. package/dist/cli/commands/trigger.d.ts +8 -0
  108. package/dist/cli/commands/trigger.d.ts.map +1 -0
  109. package/dist/cli/commands/trigger.js +247 -0
  110. package/dist/cli/commands/trigger.js.map +1 -0
  111. package/dist/cli/commands/use.d.ts +13 -0
  112. package/dist/cli/commands/use.d.ts.map +1 -0
  113. package/dist/cli/commands/use.js +92 -0
  114. package/dist/cli/commands/use.js.map +1 -0
  115. package/dist/cli/commands/verify/index.d.ts +13 -0
  116. package/dist/cli/commands/verify/index.d.ts.map +1 -0
  117. package/dist/cli/commands/verify/index.js +18 -0
  118. package/dist/cli/commands/verify/index.js.map +1 -0
  119. package/dist/cli/commands/verify/use-case.d.ts +23 -0
  120. package/dist/cli/commands/verify/use-case.d.ts.map +1 -0
  121. package/dist/cli/commands/verify/use-case.js +94 -0
  122. package/dist/cli/commands/verify/use-case.js.map +1 -0
  123. package/dist/cli/commands/verify/workflow.d.ts +22 -0
  124. package/dist/cli/commands/verify/workflow.d.ts.map +1 -0
  125. package/dist/cli/commands/verify/workflow.js +82 -0
  126. package/dist/cli/commands/verify/workflow.js.map +1 -0
  127. package/dist/cli/commands/whoami.d.ts +13 -0
  128. package/dist/cli/commands/whoami.d.ts.map +1 -0
  129. package/dist/cli/commands/whoami.js +126 -0
  130. package/dist/cli/commands/whoami.js.map +1 -0
  131. package/dist/cli/index.d.ts +24 -0
  132. package/dist/cli/index.d.ts.map +1 -0
  133. package/dist/cli/index.js +90 -0
  134. package/dist/cli/index.js.map +1 -0
  135. package/dist/cli/templates/claude-md-template.d.ts +12 -0
  136. package/dist/cli/templates/claude-md-template.d.ts.map +1 -0
  137. package/dist/cli/templates/claude-md-template.js +162 -0
  138. package/dist/cli/templates/claude-md-template.js.map +1 -0
  139. package/dist/cli/templates/config-template.d.ts +18 -0
  140. package/dist/cli/templates/config-template.d.ts.map +1 -0
  141. package/dist/cli/templates/config-template.js +350 -0
  142. package/dist/cli/templates/config-template.js.map +1 -0
  143. package/dist/cli/templates/skill-templates.d.ts +24 -0
  144. package/dist/cli/templates/skill-templates.d.ts.map +1 -0
  145. package/dist/cli/templates/skill-templates.js +117 -0
  146. package/dist/cli/templates/skill-templates.js.map +1 -0
  147. package/dist/cli/templates/slug.d.ts +9 -0
  148. package/dist/cli/templates/slug.d.ts.map +1 -0
  149. package/dist/cli/templates/slug.js +17 -0
  150. package/dist/cli/templates/slug.js.map +1 -0
  151. package/dist/cli/templates/workflow-templates.d.ts +693 -0
  152. package/dist/cli/templates/workflow-templates.d.ts.map +1 -0
  153. package/dist/cli/templates/workflow-templates.js +516 -0
  154. package/dist/cli/templates/workflow-templates.js.map +1 -0
  155. package/dist/cli/utils/output.d.ts +65 -0
  156. package/dist/cli/utils/output.d.ts.map +1 -0
  157. package/dist/cli/utils/output.js +188 -0
  158. package/dist/cli/utils/output.js.map +1 -0
  159. package/dist/cli/utils/validation-output.d.ts +21 -0
  160. package/dist/cli/utils/validation-output.d.ts.map +1 -0
  161. package/dist/cli/utils/validation-output.js +204 -0
  162. package/dist/cli/utils/validation-output.js.map +1 -0
  163. package/dist/data/integration-fields.d.ts +27 -0
  164. package/dist/data/integration-fields.d.ts.map +1 -0
  165. package/dist/data/integration-fields.js +361 -0
  166. package/dist/data/integration-fields.js.map +1 -0
  167. package/dist/index.d.ts +25 -0
  168. package/dist/index.d.ts.map +1 -0
  169. package/dist/index.js +39 -0
  170. package/dist/index.js.map +1 -0
  171. package/dist/types/process-types.d.ts +740 -0
  172. package/dist/types/process-types.d.ts.map +1 -0
  173. package/dist/types/process-types.js +22 -0
  174. package/dist/types/process-types.js.map +1 -0
  175. package/dist/utils/config.d.ts +127 -0
  176. package/dist/utils/config.d.ts.map +1 -0
  177. package/dist/utils/config.js +315 -0
  178. package/dist/utils/config.js.map +1 -0
  179. package/dist/utils/data-ingestion-deploy-client.d.ts +53 -0
  180. package/dist/utils/data-ingestion-deploy-client.d.ts.map +1 -0
  181. package/dist/utils/data-ingestion-deploy-client.js +63 -0
  182. package/dist/utils/data-ingestion-deploy-client.js.map +1 -0
  183. package/dist/utils/data-ingestion-deployer.d.ts +78 -0
  184. package/dist/utils/data-ingestion-deployer.d.ts.map +1 -0
  185. package/dist/utils/data-ingestion-deployer.js +119 -0
  186. package/dist/utils/data-ingestion-deployer.js.map +1 -0
  187. package/dist/utils/deploy-client.d.ts +55 -0
  188. package/dist/utils/deploy-client.d.ts.map +1 -0
  189. package/dist/utils/deploy-client.js +73 -0
  190. package/dist/utils/deploy-client.js.map +1 -0
  191. package/dist/utils/deployment-archiver.d.ts +110 -0
  192. package/dist/utils/deployment-archiver.d.ts.map +1 -0
  193. package/dist/utils/deployment-archiver.js +158 -0
  194. package/dist/utils/deployment-archiver.js.map +1 -0
  195. package/dist/utils/document-deploy-client.d.ts +41 -0
  196. package/dist/utils/document-deploy-client.d.ts.map +1 -0
  197. package/dist/utils/document-deploy-client.js +46 -0
  198. package/dist/utils/document-deploy-client.js.map +1 -0
  199. package/dist/utils/encryption.d.ts +85 -0
  200. package/dist/utils/encryption.d.ts.map +1 -0
  201. package/dist/utils/encryption.js +162 -0
  202. package/dist/utils/encryption.js.map +1 -0
  203. package/dist/utils/execution-client.d.ts +71 -0
  204. package/dist/utils/execution-client.d.ts.map +1 -0
  205. package/dist/utils/execution-client.js +56 -0
  206. package/dist/utils/execution-client.js.map +1 -0
  207. package/dist/utils/integration-client.d.ts +134 -0
  208. package/dist/utils/integration-client.d.ts.map +1 -0
  209. package/dist/utils/integration-client.js +109 -0
  210. package/dist/utils/integration-client.js.map +1 -0
  211. package/dist/utils/list-executions-client.d.ts +47 -0
  212. package/dist/utils/list-executions-client.d.ts.map +1 -0
  213. package/dist/utils/list-executions-client.js +50 -0
  214. package/dist/utils/list-executions-client.js.map +1 -0
  215. package/dist/utils/metadata-client.d.ts +90 -0
  216. package/dist/utils/metadata-client.d.ts.map +1 -0
  217. package/dist/utils/metadata-client.js +66 -0
  218. package/dist/utils/metadata-client.js.map +1 -0
  219. package/dist/utils/project-client.d.ts +70 -0
  220. package/dist/utils/project-client.d.ts.map +1 -0
  221. package/dist/utils/project-client.js +63 -0
  222. package/dist/utils/project-client.js.map +1 -0
  223. package/dist/utils/project-json.d.ts +71 -0
  224. package/dist/utils/project-json.d.ts.map +1 -0
  225. package/dist/utils/project-json.js +129 -0
  226. package/dist/utils/project-json.js.map +1 -0
  227. package/dist/utils/publish-client.d.ts +53 -0
  228. package/dist/utils/publish-client.d.ts.map +1 -0
  229. package/dist/utils/publish-client.js +64 -0
  230. package/dist/utils/publish-client.js.map +1 -0
  231. package/dist/utils/redeploy-client.d.ts +39 -0
  232. package/dist/utils/redeploy-client.d.ts.map +1 -0
  233. package/dist/utils/redeploy-client.js +51 -0
  234. package/dist/utils/redeploy-client.js.map +1 -0
  235. package/dist/utils/skill-parser.d.ts +52 -0
  236. package/dist/utils/skill-parser.d.ts.map +1 -0
  237. package/dist/utils/skill-parser.js +127 -0
  238. package/dist/utils/skill-parser.js.map +1 -0
  239. package/dist/utils/skills-client.d.ts +39 -0
  240. package/dist/utils/skills-client.d.ts.map +1 -0
  241. package/dist/utils/skills-client.js +32 -0
  242. package/dist/utils/skills-client.js.map +1 -0
  243. package/dist/utils/trigger-client.d.ts +78 -0
  244. package/dist/utils/trigger-client.d.ts.map +1 -0
  245. package/dist/utils/trigger-client.js +81 -0
  246. package/dist/utils/trigger-client.js.map +1 -0
  247. package/dist/utils/use-case-deployer.d.ts +93 -0
  248. package/dist/utils/use-case-deployer.d.ts.map +1 -0
  249. package/dist/utils/use-case-deployer.js +270 -0
  250. package/dist/utils/use-case-deployer.js.map +1 -0
  251. package/dist/utils/version-manager.d.ts +63 -0
  252. package/dist/utils/version-manager.d.ts.map +1 -0
  253. package/dist/utils/version-manager.js +91 -0
  254. package/dist/utils/version-manager.js.map +1 -0
  255. package/dist/utils/workflow-encoding.d.ts +26 -0
  256. package/dist/utils/workflow-encoding.d.ts.map +1 -0
  257. package/dist/utils/workflow-encoding.js +41 -0
  258. package/dist/utils/workflow-encoding.js.map +1 -0
  259. package/dist/validation/fixer.d.ts +56 -0
  260. package/dist/validation/fixer.d.ts.map +1 -0
  261. package/dist/validation/fixer.js +168 -0
  262. package/dist/validation/fixer.js.map +1 -0
  263. package/dist/validation/rules/codika-init-required.d.ts +18 -0
  264. package/dist/validation/rules/codika-init-required.d.ts.map +1 -0
  265. package/dist/validation/rules/codika-init-required.js +70 -0
  266. package/dist/validation/rules/codika-init-required.js.map +1 -0
  267. package/dist/validation/rules/codika-submit-result.d.ts +22 -0
  268. package/dist/validation/rules/codika-submit-result.d.ts.map +1 -0
  269. package/dist/validation/rules/codika-submit-result.js +144 -0
  270. package/dist/validation/rules/codika-submit-result.js.map +1 -0
  271. package/dist/validation/rules/error-branch-required.d.ts +24 -0
  272. package/dist/validation/rules/error-branch-required.d.ts.map +1 -0
  273. package/dist/validation/rules/error-branch-required.js +103 -0
  274. package/dist/validation/rules/error-branch-required.js.map +1 -0
  275. package/dist/validation/rules/index.d.ts +18 -0
  276. package/dist/validation/rules/index.d.ts.map +1 -0
  277. package/dist/validation/rules/index.js +28 -0
  278. package/dist/validation/rules/index.js.map +1 -0
  279. package/dist/validation/rules/schedule-webhook-convergence.d.ts +24 -0
  280. package/dist/validation/rules/schedule-webhook-convergence.d.ts.map +1 -0
  281. package/dist/validation/rules/schedule-webhook-convergence.js +129 -0
  282. package/dist/validation/rules/schedule-webhook-convergence.js.map +1 -0
  283. package/dist/validation/rules/subworkflow-min-params.d.ts +21 -0
  284. package/dist/validation/rules/subworkflow-min-params.d.ts.map +1 -0
  285. package/dist/validation/rules/subworkflow-min-params.js +84 -0
  286. package/dist/validation/rules/subworkflow-min-params.js.map +1 -0
  287. package/dist/validation/runner.d.ts +43 -0
  288. package/dist/validation/runner.d.ts.map +1 -0
  289. package/dist/validation/runner.js +335 -0
  290. package/dist/validation/runner.js.map +1 -0
  291. package/dist/validation/types.d.ts +155 -0
  292. package/dist/validation/types.d.ts.map +1 -0
  293. package/dist/validation/types.js +8 -0
  294. package/dist/validation/types.js.map +1 -0
  295. package/dist/validation/use-case-scripts/calledby-consistency.d.ts +23 -0
  296. package/dist/validation/use-case-scripts/calledby-consistency.d.ts.map +1 -0
  297. package/dist/validation/use-case-scripts/calledby-consistency.js +236 -0
  298. package/dist/validation/use-case-scripts/calledby-consistency.js.map +1 -0
  299. package/dist/validation/use-case-scripts/config-exports.d.ts +17 -0
  300. package/dist/validation/use-case-scripts/config-exports.d.ts.map +1 -0
  301. package/dist/validation/use-case-scripts/config-exports.js +93 -0
  302. package/dist/validation/use-case-scripts/config-exports.js.map +1 -0
  303. package/dist/validation/use-case-scripts/custom-integration-schema.d.ts +21 -0
  304. package/dist/validation/use-case-scripts/custom-integration-schema.d.ts.map +1 -0
  305. package/dist/validation/use-case-scripts/custom-integration-schema.js +378 -0
  306. package/dist/validation/use-case-scripts/custom-integration-schema.js.map +1 -0
  307. package/dist/validation/use-case-scripts/index.d.ts +27 -0
  308. package/dist/validation/use-case-scripts/index.d.ts.map +1 -0
  309. package/dist/validation/use-case-scripts/index.js +52 -0
  310. package/dist/validation/use-case-scripts/index.js.map +1 -0
  311. package/dist/validation/use-case-scripts/integration-inheritance.d.ts +35 -0
  312. package/dist/validation/use-case-scripts/integration-inheritance.d.ts.map +1 -0
  313. package/dist/validation/use-case-scripts/integration-inheritance.js +348 -0
  314. package/dist/validation/use-case-scripts/integration-inheritance.js.map +1 -0
  315. package/dist/validation/use-case-scripts/schema-types.d.ts +21 -0
  316. package/dist/validation/use-case-scripts/schema-types.d.ts.map +1 -0
  317. package/dist/validation/use-case-scripts/schema-types.js +134 -0
  318. package/dist/validation/use-case-scripts/schema-types.js.map +1 -0
  319. package/dist/validation/use-case-scripts/skill-consistency.d.ts +21 -0
  320. package/dist/validation/use-case-scripts/skill-consistency.d.ts.map +1 -0
  321. package/dist/validation/use-case-scripts/skill-consistency.js +180 -0
  322. package/dist/validation/use-case-scripts/skill-consistency.js.map +1 -0
  323. package/dist/validation/use-case-scripts/subworkflow-references.d.ts +22 -0
  324. package/dist/validation/use-case-scripts/subworkflow-references.d.ts.map +1 -0
  325. package/dist/validation/use-case-scripts/subworkflow-references.js +139 -0
  326. package/dist/validation/use-case-scripts/subworkflow-references.js.map +1 -0
  327. package/dist/validation/use-case-scripts/trigger-type-consistency.d.ts +25 -0
  328. package/dist/validation/use-case-scripts/trigger-type-consistency.d.ts.map +1 -0
  329. package/dist/validation/use-case-scripts/trigger-type-consistency.js +265 -0
  330. package/dist/validation/use-case-scripts/trigger-type-consistency.js.map +1 -0
  331. package/dist/validation/use-case-scripts/trigger-types.d.ts +20 -0
  332. package/dist/validation/use-case-scripts/trigger-types.d.ts.map +1 -0
  333. package/dist/validation/use-case-scripts/trigger-types.js +177 -0
  334. package/dist/validation/use-case-scripts/trigger-types.js.map +1 -0
  335. package/dist/validation/use-case-scripts/triggers-required.d.ts +23 -0
  336. package/dist/validation/use-case-scripts/triggers-required.d.ts.map +1 -0
  337. package/dist/validation/use-case-scripts/triggers-required.js +111 -0
  338. package/dist/validation/use-case-scripts/triggers-required.js.map +1 -0
  339. package/dist/validation/use-case-scripts/webhook-path-consistency.d.ts +28 -0
  340. package/dist/validation/use-case-scripts/webhook-path-consistency.d.ts.map +1 -0
  341. package/dist/validation/use-case-scripts/webhook-path-consistency.js +288 -0
  342. package/dist/validation/use-case-scripts/webhook-path-consistency.js.map +1 -0
  343. package/dist/validation/use-case-scripts/workflow-imports.d.ts +16 -0
  344. package/dist/validation/use-case-scripts/workflow-imports.d.ts.map +1 -0
  345. package/dist/validation/use-case-scripts/workflow-imports.js +206 -0
  346. package/dist/validation/use-case-scripts/workflow-imports.js.map +1 -0
  347. package/dist/validation/workflow-scripts/credential-placeholders.d.ts +21 -0
  348. package/dist/validation/workflow-scripts/credential-placeholders.d.ts.map +1 -0
  349. package/dist/validation/workflow-scripts/credential-placeholders.js +278 -0
  350. package/dist/validation/workflow-scripts/credential-placeholders.js.map +1 -0
  351. package/dist/validation/workflow-scripts/db-always-output.d.ts +16 -0
  352. package/dist/validation/workflow-scripts/db-always-output.d.ts.map +1 -0
  353. package/dist/validation/workflow-scripts/db-always-output.js +95 -0
  354. package/dist/validation/workflow-scripts/db-always-output.js.map +1 -0
  355. package/dist/validation/workflow-scripts/exec-workflow-wait.d.ts +15 -0
  356. package/dist/validation/workflow-scripts/exec-workflow-wait.d.ts.map +1 -0
  357. package/dist/validation/workflow-scripts/exec-workflow-wait.js +85 -0
  358. package/dist/validation/workflow-scripts/exec-workflow-wait.js.map +1 -0
  359. package/dist/validation/workflow-scripts/index.d.ts +31 -0
  360. package/dist/validation/workflow-scripts/index.d.ts.map +1 -0
  361. package/dist/validation/workflow-scripts/index.js +58 -0
  362. package/dist/validation/workflow-scripts/index.js.map +1 -0
  363. package/dist/validation/workflow-scripts/instparm-quoting.d.ts +21 -0
  364. package/dist/validation/workflow-scripts/instparm-quoting.d.ts.map +1 -0
  365. package/dist/validation/workflow-scripts/instparm-quoting.js +59 -0
  366. package/dist/validation/workflow-scripts/instparm-quoting.js.map +1 -0
  367. package/dist/validation/workflow-scripts/llm-model-id.d.ts +17 -0
  368. package/dist/validation/workflow-scripts/llm-model-id.d.ts.map +1 -0
  369. package/dist/validation/workflow-scripts/llm-model-id.js +171 -0
  370. package/dist/validation/workflow-scripts/llm-model-id.js.map +1 -0
  371. package/dist/validation/workflow-scripts/llm-output-access.d.ts +23 -0
  372. package/dist/validation/workflow-scripts/llm-output-access.d.ts.map +1 -0
  373. package/dist/validation/workflow-scripts/llm-output-access.js +274 -0
  374. package/dist/validation/workflow-scripts/llm-output-access.js.map +1 -0
  375. package/dist/validation/workflow-scripts/merge-before-terminal.d.ts +20 -0
  376. package/dist/validation/workflow-scripts/merge-before-terminal.d.ts.map +1 -0
  377. package/dist/validation/workflow-scripts/merge-before-terminal.js +87 -0
  378. package/dist/validation/workflow-scripts/merge-before-terminal.js.map +1 -0
  379. package/dist/validation/workflow-scripts/placeholder-syntax.d.ts +29 -0
  380. package/dist/validation/workflow-scripts/placeholder-syntax.d.ts.map +1 -0
  381. package/dist/validation/workflow-scripts/placeholder-syntax.js +154 -0
  382. package/dist/validation/workflow-scripts/placeholder-syntax.js.map +1 -0
  383. package/dist/validation/workflow-scripts/retry-backoff.d.ts +16 -0
  384. package/dist/validation/workflow-scripts/retry-backoff.d.ts.map +1 -0
  385. package/dist/validation/workflow-scripts/retry-backoff.js +197 -0
  386. package/dist/validation/workflow-scripts/retry-backoff.js.map +1 -0
  387. package/dist/validation/workflow-scripts/webhook-id.d.ts +17 -0
  388. package/dist/validation/workflow-scripts/webhook-id.d.ts.map +1 -0
  389. package/dist/validation/workflow-scripts/webhook-id.js +79 -0
  390. package/dist/validation/workflow-scripts/webhook-id.js.map +1 -0
  391. package/dist/validation/workflow-scripts/workflow-format.d.ts +16 -0
  392. package/dist/validation/workflow-scripts/workflow-format.d.ts.map +1 -0
  393. package/dist/validation/workflow-scripts/workflow-format.js +51 -0
  394. package/dist/validation/workflow-scripts/workflow-format.js.map +1 -0
  395. package/dist/validation/workflow-scripts/workflow-sanitization.d.ts +21 -0
  396. package/dist/validation/workflow-scripts/workflow-sanitization.d.ts.map +1 -0
  397. package/dist/validation/workflow-scripts/workflow-sanitization.js +78 -0
  398. package/dist/validation/workflow-scripts/workflow-sanitization.js.map +1 -0
  399. package/dist/validation/workflow-scripts/workflow-settings.d.ts +19 -0
  400. package/dist/validation/workflow-scripts/workflow-settings.d.ts.map +1 -0
  401. package/dist/validation/workflow-scripts/workflow-settings.js +131 -0
  402. package/dist/validation/workflow-scripts/workflow-settings.js.map +1 -0
  403. package/package.json +64 -0
@@ -0,0 +1,740 @@
1
+ /**
2
+ * Process Types - Duplicated from codika_app_platform
3
+ * These types define the structure for process deployments
4
+ *
5
+ * UNIFIED FLAT STRUCTURE: All field properties are at the top level (no nested config)
6
+ */
7
+ /**
8
+ * ProcessType values - use for setting values
9
+ * Example: processType: ProcessType.personal
10
+ *
11
+ * Controls how instances are created:
12
+ * - personal: Each user installs their own instance (default)
13
+ * - organizational: One shared instance per organization
14
+ */
15
+ export declare const ProcessType: {
16
+ readonly personal: "personal";
17
+ readonly organizational: "organizational";
18
+ };
19
+ /**
20
+ * ProcessType type - use for type annotations
21
+ * Values: 'personal' | 'organizational'
22
+ */
23
+ export type ProcessType = typeof ProcessType[keyof typeof ProcessType];
24
+ /**
25
+ * Field types supported in form schemas
26
+ */
27
+ export type FieldType = 'string' | 'text' | 'number' | 'boolean' | 'date' | 'select' | 'multiselect' | 'radio' | 'file' | 'array' | 'object' | 'objectArray';
28
+ /**
29
+ * Base interface for all form fields
30
+ */
31
+ export interface FormFieldBase {
32
+ key: string;
33
+ label: string;
34
+ description?: string;
35
+ tooltip?: string;
36
+ placeholder?: string;
37
+ required?: boolean;
38
+ }
39
+ /**
40
+ * String field - single-line text input
41
+ */
42
+ export interface FormStringField extends FormFieldBase {
43
+ type: 'string';
44
+ defaultValue?: string;
45
+ minLength?: number;
46
+ maxLength?: number;
47
+ regex?: string;
48
+ regexError?: string;
49
+ }
50
+ /**
51
+ * Text field - multi-line textarea
52
+ */
53
+ export interface FormTextField extends FormFieldBase {
54
+ type: 'text';
55
+ defaultValue?: string;
56
+ minLength?: number;
57
+ maxLength?: number;
58
+ rows?: number;
59
+ regex?: string;
60
+ regexError?: string;
61
+ }
62
+ /**
63
+ * Number field - numeric input
64
+ */
65
+ export interface FormNumberField extends FormFieldBase {
66
+ type: 'number';
67
+ defaultValue?: number;
68
+ numberType?: 'integer' | 'double';
69
+ min?: number;
70
+ max?: number;
71
+ step?: number;
72
+ }
73
+ /**
74
+ * Boolean field - checkbox or switch toggle
75
+ */
76
+ export interface FormBooleanField extends FormFieldBase {
77
+ type: 'boolean';
78
+ defaultValue?: boolean;
79
+ enabledLabel?: string;
80
+ disabledLabel?: string;
81
+ }
82
+ /**
83
+ * Date field - date picker
84
+ */
85
+ export interface FormDateField extends FormFieldBase {
86
+ type: 'date';
87
+ defaultValue?: string;
88
+ minDate?: string;
89
+ maxDate?: string;
90
+ }
91
+ /**
92
+ * Select field - dropdown single selection
93
+ */
94
+ export interface FormSelectField extends FormFieldBase {
95
+ type: 'select';
96
+ defaultValue?: string;
97
+ options: Array<{
98
+ value: string;
99
+ label: string;
100
+ }>;
101
+ }
102
+ /**
103
+ * MultiSelect field - multiple selection
104
+ */
105
+ export interface FormMultiSelectField extends FormFieldBase {
106
+ type: 'multiselect';
107
+ defaultValue?: string[];
108
+ options: Array<{
109
+ value: string;
110
+ label: string;
111
+ }>;
112
+ minSelections?: number;
113
+ maxSelections?: number;
114
+ }
115
+ /**
116
+ * Radio field - single selection with visible options
117
+ */
118
+ export interface FormRadioField extends FormFieldBase {
119
+ type: 'radio';
120
+ defaultValue?: string;
121
+ options: Array<{
122
+ value: string;
123
+ label: string;
124
+ }>;
125
+ }
126
+ /**
127
+ * File field - file upload
128
+ */
129
+ export interface FormFileField extends FormFieldBase {
130
+ type: 'file';
131
+ maxSize?: number;
132
+ allowedMimeTypes?: string[];
133
+ showPreview?: boolean;
134
+ tags?: string[];
135
+ }
136
+ /**
137
+ * Base type for array item fields (primitive fields without key/label/required)
138
+ * These properties are managed by the array container itself
139
+ */
140
+ type ArrayItemFieldBase = Omit<FormFieldBase, 'key' | 'label' | 'required'>;
141
+ /**
142
+ * Union type for all primitive field types that can be used as array items
143
+ * (excludes array, objectArray, file, section, multiselect)
144
+ * Note: multiselect excluded because it produces nested arrays which Firestore cannot store
145
+ */
146
+ export type FormArrayItemField = (ArrayItemFieldBase & Omit<FormStringField, keyof FormFieldBase> & {
147
+ type: 'string';
148
+ }) | (ArrayItemFieldBase & Omit<FormTextField, keyof FormFieldBase> & {
149
+ type: 'text';
150
+ }) | (ArrayItemFieldBase & Omit<FormNumberField, keyof FormFieldBase> & {
151
+ type: 'number';
152
+ }) | (ArrayItemFieldBase & Omit<FormBooleanField, keyof FormFieldBase> & {
153
+ type: 'boolean';
154
+ }) | (ArrayItemFieldBase & Omit<FormDateField, keyof FormFieldBase> & {
155
+ type: 'date';
156
+ }) | (ArrayItemFieldBase & Omit<FormSelectField, keyof FormFieldBase> & {
157
+ type: 'select';
158
+ }) | (ArrayItemFieldBase & Omit<FormRadioField, keyof FormFieldBase> & {
159
+ type: 'radio';
160
+ });
161
+ /**
162
+ * Array field - repeatable input of primitive values
163
+ *
164
+ * Uses itemField to define the field type and all its properties directly,
165
+ * giving access to ALL type-specific properties (e.g., rows for text fields).
166
+ */
167
+ export interface FormArrayField extends FormFieldBase {
168
+ type: 'array';
169
+ defaultValue?: (string | number | boolean)[];
170
+ itemField: FormArrayItemField;
171
+ minItems?: number;
172
+ maxItems?: number;
173
+ }
174
+ /**
175
+ * Object field - single structured object with nested fields
176
+ */
177
+ export interface FormObjectField extends FormFieldBase {
178
+ type: 'object';
179
+ schema: FormInputItem[];
180
+ defaultValue?: Record<string, unknown>;
181
+ }
182
+ /**
183
+ * ObjectArray field - array of structured objects
184
+ */
185
+ export interface FormObjectArrayField extends FormFieldBase {
186
+ type: 'objectArray';
187
+ defaultValue?: Record<string, unknown>[];
188
+ itemSchema: FormInputItem[];
189
+ minItems?: number;
190
+ maxItems?: number;
191
+ }
192
+ /**
193
+ * Union type for all form field types
194
+ */
195
+ export type FormField = FormStringField | FormTextField | FormNumberField | FormBooleanField | FormDateField | FormSelectField | FormMultiSelectField | FormRadioField | FormFileField | FormArrayField | FormObjectField | FormObjectArrayField;
196
+ /**
197
+ * Section container for organizing fields
198
+ */
199
+ export interface FormSection {
200
+ type: 'section';
201
+ title: string;
202
+ description?: string;
203
+ collapsible?: boolean;
204
+ defaultOpen?: boolean;
205
+ inputSchema: FormInputItem[];
206
+ }
207
+ /**
208
+ * Item in form schema - either a field or a section
209
+ */
210
+ export type FormInputItem = FormField | FormSection;
211
+ /**
212
+ * Main form input schema - array of fields or sections
213
+ */
214
+ export type FormInputSchema = FormInputItem[];
215
+ /**
216
+ * Form Output Schema Types
217
+ */
218
+ export type FormOutputItem = FormField | FormSection;
219
+ export type FormOutputSchema = FormOutputItem[];
220
+ export interface HttpTrigger {
221
+ triggerId: string;
222
+ type: 'http';
223
+ url: string;
224
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE';
225
+ title?: string | null;
226
+ description?: string;
227
+ inputSchema?: FormInputSchema;
228
+ authMethod?: 'none' | 'bearer' | 'basic';
229
+ authToken?: string;
230
+ }
231
+ export interface ScheduleTrigger {
232
+ triggerId: string;
233
+ type: 'schedule';
234
+ cronExpression: string;
235
+ timezone: string;
236
+ humanReadable: string;
237
+ manualTriggerUrl: string;
238
+ title?: string | null;
239
+ description?: string;
240
+ }
241
+ export interface ServiceEventTrigger {
242
+ triggerId: string;
243
+ type: 'service_event';
244
+ service: 'telegram' | 'email' | 'slack' | 'discord' | 'other';
245
+ eventType: string;
246
+ title?: string | null;
247
+ description?: string;
248
+ }
249
+ export type SubworkflowInputType = 'string' | 'number' | 'boolean' | 'array' | 'object';
250
+ export interface SubworkflowInput {
251
+ name: string;
252
+ type: SubworkflowInputType;
253
+ }
254
+ export interface SubworkflowTrigger {
255
+ triggerId: string;
256
+ type: 'subworkflow';
257
+ title?: string | null;
258
+ description?: string;
259
+ inputSchema?: SubworkflowInput[];
260
+ calledBy?: string[];
261
+ }
262
+ export interface DataIngestionTrigger {
263
+ triggerId: string;
264
+ type: 'data_ingestion';
265
+ title?: string | null;
266
+ description?: string;
267
+ webhooks: {
268
+ embed: string;
269
+ delete: string;
270
+ };
271
+ cost?: number;
272
+ }
273
+ export type WorkflowTrigger = HttpTrigger | ScheduleTrigger | ServiceEventTrigger | SubworkflowTrigger | DataIngestionTrigger;
274
+ /**
275
+ * Workflow Category
276
+ * Distinguishes user-facing workflows from internal data processing workflows
277
+ */
278
+ export type WorkflowCategory = 'user_facing' | 'data_ingestion';
279
+ /**
280
+ * Data Ingestion Endpoint Configuration
281
+ * Quick reference to the data ingestion workflow for fast lookup
282
+ */
283
+ export interface DataIngestionEndpoint {
284
+ workflowTemplateId: string;
285
+ webhookUrl: string;
286
+ purpose: string;
287
+ }
288
+ /**
289
+ * Agent Configuration
290
+ * Defines an AI agent associated with a process deployment
291
+ */
292
+ export interface AgentConfig {
293
+ id: string;
294
+ name: string;
295
+ systemPrompt: string;
296
+ title: string;
297
+ description: string;
298
+ welcomeMessage: string;
299
+ }
300
+ export interface KnowledgeBaseAccessConfig {
301
+ processDocTags: string[];
302
+ processInstanceDocTags: string[];
303
+ }
304
+ export interface WorkflowInfo {
305
+ workflowTemplateId: string;
306
+ workflowId: string;
307
+ workflowName: string;
308
+ triggers: WorkflowTrigger[];
309
+ markdownInfo?: string | null;
310
+ knowledgeBaseAccess: KnowledgeBaseAccessConfig;
311
+ integrationUids?: string[];
312
+ workflowCategory?: WorkflowCategory;
313
+ outputSchema?: FormOutputSchema;
314
+ n8nWorkflowJsonBase64?: string;
315
+ n8nWorkflowId?: string;
316
+ n8nWorkflowIsActive?: boolean;
317
+ n8nActivationError?: string;
318
+ cost?: number;
319
+ costEstimationForLLMTokens?: number;
320
+ }
321
+ export interface WorkflowConfigurationInput {
322
+ workflowTemplateId: string;
323
+ workflowId: string;
324
+ workflowName: string;
325
+ triggers: WorkflowTrigger[];
326
+ markdownInfo?: string;
327
+ knowledgeBaseAccess: KnowledgeBaseAccessConfig;
328
+ integrationUids?: string[];
329
+ workflowCategory?: WorkflowCategory;
330
+ outputSchema?: FormOutputSchema;
331
+ n8nWorkflowJsonBase64: string;
332
+ cost?: number;
333
+ costEstimationForLLMTokens?: number;
334
+ }
335
+ /**
336
+ * Field types for deployment parameters
337
+ * Excludes 'file' as it's not needed for deployment configuration
338
+ */
339
+ export type DeploymentFieldType = Exclude<FieldType, 'file'>;
340
+ /**
341
+ * Base interface for all deployment input fields
342
+ */
343
+ export interface DeploymentFieldBase {
344
+ key: string;
345
+ type: DeploymentFieldType;
346
+ label: string;
347
+ description?: string;
348
+ tooltip?: string;
349
+ placeholder?: string;
350
+ required?: boolean;
351
+ }
352
+ /**
353
+ * String field - single line text input
354
+ */
355
+ export interface DeploymentStringField extends DeploymentFieldBase {
356
+ type: 'string';
357
+ defaultValue?: string;
358
+ minLength?: number;
359
+ maxLength?: number;
360
+ regex?: string;
361
+ regexError?: string;
362
+ }
363
+ /**
364
+ * Text field - multi-line textarea input
365
+ */
366
+ export interface DeploymentTextField extends DeploymentFieldBase {
367
+ type: 'text';
368
+ defaultValue?: string;
369
+ minLength?: number;
370
+ maxLength?: number;
371
+ rows?: number;
372
+ regex?: string;
373
+ regexError?: string;
374
+ }
375
+ /**
376
+ * Number field - numeric input
377
+ */
378
+ export interface DeploymentNumberField extends DeploymentFieldBase {
379
+ type: 'number';
380
+ defaultValue?: number;
381
+ numberType?: 'integer' | 'double';
382
+ min?: number;
383
+ max?: number;
384
+ step?: number;
385
+ }
386
+ /**
387
+ * Boolean field - toggle/switch input
388
+ */
389
+ export interface DeploymentBooleanField extends DeploymentFieldBase {
390
+ type: 'boolean';
391
+ defaultValue?: boolean;
392
+ enabledLabel?: string;
393
+ disabledLabel?: string;
394
+ }
395
+ /**
396
+ * Date field - date picker
397
+ */
398
+ export interface DeploymentDateField extends DeploymentFieldBase {
399
+ type: 'date';
400
+ defaultValue?: string;
401
+ minDate?: string;
402
+ maxDate?: string;
403
+ }
404
+ /**
405
+ * Select field - dropdown single selection
406
+ */
407
+ export interface DeploymentSelectField extends DeploymentFieldBase {
408
+ type: 'select';
409
+ options: Array<{
410
+ value: string;
411
+ label: string;
412
+ }>;
413
+ defaultValue?: string;
414
+ }
415
+ /**
416
+ * MultiSelect field - multiple selection
417
+ */
418
+ export interface DeploymentMultiSelectField extends DeploymentFieldBase {
419
+ type: 'multiselect';
420
+ options: Array<{
421
+ value: string;
422
+ label: string;
423
+ }>;
424
+ defaultValue?: string[];
425
+ minSelections?: number;
426
+ maxSelections?: number;
427
+ }
428
+ /**
429
+ * Radio field - radio button group
430
+ */
431
+ export interface DeploymentRadioField extends DeploymentFieldBase {
432
+ type: 'radio';
433
+ options: Array<{
434
+ value: string;
435
+ label: string;
436
+ }>;
437
+ defaultValue?: string;
438
+ }
439
+ /**
440
+ * Base type for deployment array item fields (primitive fields without key/label/required)
441
+ * These properties are managed by the array container itself
442
+ */
443
+ type DeploymentArrayItemFieldBase = Omit<DeploymentFieldBase, 'key' | 'label' | 'required'>;
444
+ /**
445
+ * Union type for all primitive field types that can be used as deployment array items
446
+ * (excludes array, objectArray, object, section, file, multiselect)
447
+ * Note: multiselect excluded because it produces nested arrays which Firestore cannot store
448
+ */
449
+ export type DeploymentArrayItemField = (DeploymentArrayItemFieldBase & Omit<DeploymentStringField, keyof DeploymentFieldBase> & {
450
+ type: 'string';
451
+ }) | (DeploymentArrayItemFieldBase & Omit<DeploymentTextField, keyof DeploymentFieldBase> & {
452
+ type: 'text';
453
+ }) | (DeploymentArrayItemFieldBase & Omit<DeploymentNumberField, keyof DeploymentFieldBase> & {
454
+ type: 'number';
455
+ }) | (DeploymentArrayItemFieldBase & Omit<DeploymentBooleanField, keyof DeploymentFieldBase> & {
456
+ type: 'boolean';
457
+ }) | (DeploymentArrayItemFieldBase & Omit<DeploymentDateField, keyof DeploymentFieldBase> & {
458
+ type: 'date';
459
+ }) | (DeploymentArrayItemFieldBase & Omit<DeploymentSelectField, keyof DeploymentFieldBase> & {
460
+ type: 'select';
461
+ }) | (DeploymentArrayItemFieldBase & Omit<DeploymentRadioField, keyof DeploymentFieldBase> & {
462
+ type: 'radio';
463
+ });
464
+ /**
465
+ * Array field - repeatable input of primitive values
466
+ *
467
+ * Uses itemField to define the field type and all its properties directly,
468
+ * giving access to ALL type-specific properties (e.g., rows for text fields).
469
+ */
470
+ export interface DeploymentArrayField extends DeploymentFieldBase {
471
+ type: 'array';
472
+ defaultValue?: (string | number | boolean)[];
473
+ /** Item field definition. Defaults to { type: 'string' } if not specified. */
474
+ itemField?: DeploymentArrayItemField;
475
+ minItems?: number;
476
+ maxItems?: number;
477
+ }
478
+ /**
479
+ * Object field - single structured object with nested fields
480
+ */
481
+ export interface DeploymentObjectField extends DeploymentFieldBase {
482
+ type: 'object';
483
+ schema: DeploymentInputItem[];
484
+ defaultValue?: Record<string, unknown>;
485
+ }
486
+ /**
487
+ * ObjectArray field - array of objects with structured schema
488
+ */
489
+ export interface DeploymentObjectArrayField extends DeploymentFieldBase {
490
+ type: 'objectArray';
491
+ itemSchema: DeploymentInputItem[];
492
+ defaultValue?: Record<string, unknown>[];
493
+ minItems?: number;
494
+ maxItems?: number;
495
+ }
496
+ /**
497
+ * Union type for all deployment input field types
498
+ */
499
+ export type DeploymentInputField = DeploymentStringField | DeploymentTextField | DeploymentNumberField | DeploymentBooleanField | DeploymentDateField | DeploymentSelectField | DeploymentMultiSelectField | DeploymentRadioField | DeploymentArrayField | DeploymentObjectField | DeploymentObjectArrayField;
500
+ /**
501
+ * Section for grouping deployment fields
502
+ */
503
+ export interface DeploymentSection {
504
+ type: 'section';
505
+ title: string;
506
+ description?: string;
507
+ collapsible?: boolean;
508
+ defaultOpen?: boolean;
509
+ inputSchema: DeploymentInputItem[];
510
+ }
511
+ /**
512
+ * Item in deployment input schema - either a field or a section
513
+ */
514
+ export type DeploymentInputItem = DeploymentInputField | DeploymentSection;
515
+ /**
516
+ * Schema for deployment input fields
517
+ */
518
+ export type DeploymentInputSchema = DeploymentInputItem[];
519
+ /**
520
+ * Type for deployment parameter values
521
+ */
522
+ export type DeploymentParameterValue = string | number | boolean | string[] | (string | number | boolean)[] | Record<string, unknown> | Record<string, unknown>[];
523
+ /**
524
+ * Record of deployment parameter values keyed by field key
525
+ */
526
+ export type DeploymentParameterValues = Record<string, DeploymentParameterValue>;
527
+ /**
528
+ * Field schema for a custom integration's secret or metadata field.
529
+ */
530
+ export interface CustomIntegrationFieldSchema {
531
+ /** Field key, UPPER_SNAKE_CASE (e.g., 'API_KEY', 'BASE_URL') */
532
+ key: string;
533
+ /** Human-readable label */
534
+ label: string;
535
+ /** Field input type */
536
+ type: 'password' | 'string' | 'url' | 'number';
537
+ /** Help text for the field */
538
+ description?: string;
539
+ /** Placeholder text for the input */
540
+ placeholder?: string;
541
+ /** Whether the field is required (default: true for secrets, false for metadata) */
542
+ required?: boolean;
543
+ }
544
+ /**
545
+ * Schema for a custom integration defined by a use case.
546
+ * Allows use cases to declare arbitrary integration requirements
547
+ * without needing hardcoded handler files.
548
+ *
549
+ * Custom integration IDs MUST start with 'cstm_' to prevent collisions
550
+ * with built-in integration IDs.
551
+ */
552
+ export interface CustomIntegrationSchema {
553
+ /** Unique ID, snake_case. Must start with 'cstm_' (e.g., 'cstm_acme_crm') */
554
+ id: string;
555
+ /** Display name shown in dashboard (e.g., 'Acme CRM') */
556
+ name: string;
557
+ /** Help text for users */
558
+ description?: string;
559
+ /** Where this integration is stored */
560
+ contextType: 'organization' | 'member' | 'process_instance';
561
+ /**
562
+ * n8n credential type to create. Maps to n8n's generic credential types:
563
+ * - 'httpHeaderAuth': API key in HTTP header (covers Bearer, X-API-Key, etc.)
564
+ * - 'httpBasicAuth': Username + password (HTTP Basic)
565
+ * - 'httpQueryAuth': API key as query parameter
566
+ * - 'none': No n8n credential (integration data used differently)
567
+ */
568
+ n8nCredentialType: 'httpHeaderAuth' | 'httpBasicAuth' | 'httpQueryAuth' | 'none';
569
+ /**
570
+ * Maps secret/metadata field keys to n8n credential data field names.
571
+ * Example for httpHeaderAuth: { 'API_KEY': 'value', 'HEADER_NAME': 'name' }
572
+ * Required when n8nCredentialType !== 'none'.
573
+ */
574
+ n8nCredentialMapping?: Record<string, string>;
575
+ /** Secret fields (encrypted, stored securely) */
576
+ secretFields: CustomIntegrationFieldSchema[];
577
+ /** Non-secret metadata fields (optional, for display/config) */
578
+ metadataFields?: CustomIntegrationFieldSchema[];
579
+ /** Lucide icon name for dashboard display (e.g., 'Building2') */
580
+ icon?: string;
581
+ /** URL to a custom logo image. Takes precedence over icon when provided. */
582
+ logoUrl?: string;
583
+ /** Primary color (hex) for dashboard display (e.g., '#4F46E5') */
584
+ color?: string;
585
+ }
586
+ export interface ProcessDeploymentConfigurationInput {
587
+ title: string;
588
+ subtitle: string;
589
+ description: string;
590
+ workflows: WorkflowConfigurationInput[];
591
+ processDeploymentMarkdown: string;
592
+ releaseNotes?: string;
593
+ tags: string[];
594
+ integrationUids: string[];
595
+ dataIngestionEndpoint?: DataIngestionEndpoint;
596
+ icon?: string;
597
+ deploymentInputSchema?: DeploymentInputSchema;
598
+ defaultDeploymentParameters?: DeploymentParameterValues;
599
+ agent?: AgentConfig;
600
+ processType?: ProcessType;
601
+ /**
602
+ * Custom integration schemas defined by this use case.
603
+ * Allows declaring arbitrary integration requirements that the platform
604
+ * handles dynamically — rendering forms, creating n8n credentials,
605
+ * and resolving placeholders.
606
+ *
607
+ * Custom integration IDs MUST start with 'cstm_'.
608
+ * IDs are automatically merged into integrationUids during deployment.
609
+ */
610
+ customIntegrations?: CustomIntegrationSchema[];
611
+ }
612
+ export type VersionStrategy = 'major_bump' | 'minor_bump' | 'explicit';
613
+ /**
614
+ * Metadata document for deployment
615
+ * Represents ANY file with its relative path for exact reconstruction
616
+ */
617
+ export interface MetadataDocument {
618
+ /** Relative path from use case root (e.g., "config.ts", "workflows/main.json", ".codika-agent/prd/prd.md") */
619
+ relativePath: string;
620
+ /** MIME content type (e.g., "application/json", "text/markdown") */
621
+ contentType: string;
622
+ /** Base64-encoded file content */
623
+ contentBase64: string;
624
+ /** Optional description of the document */
625
+ description?: string;
626
+ }
627
+ /**
628
+ * Result of uploading a metadata document
629
+ */
630
+ export interface MetadataDocumentUploadResult {
631
+ /** Relative path for reconstruction */
632
+ relativePath: string;
633
+ /** Storage path in Firebase Storage */
634
+ storagePath: string;
635
+ /** Whether the upload was successful */
636
+ success: boolean;
637
+ /** Error message if upload failed */
638
+ error?: string;
639
+ }
640
+ /**
641
+ * A skill document describing how to interact with a specific workflow.
642
+ * Follows the Claude Agent Skills format: directory with SKILL.md + frontmatter.
643
+ * See: https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview
644
+ */
645
+ export interface SkillDocument {
646
+ /** Must match a workflowTemplateId from the workflows array */
647
+ workflowTemplateId: string;
648
+ /** Skill name — max 64 chars, lowercase letters/numbers/hyphens only (Claude spec) */
649
+ name: string;
650
+ /** Short description, third person — max 1024 chars (Claude spec) */
651
+ description: string;
652
+ /** Full SKILL.md content including frontmatter */
653
+ contentMarkdown: string;
654
+ /** Relative path from use case root (e.g., "skills/main-workflow/SKILL.md") */
655
+ relativePath: string;
656
+ }
657
+ export interface DeployProcessUseCaseRequest {
658
+ projectId: string;
659
+ versionStrategy?: VersionStrategy;
660
+ explicitVersion?: string;
661
+ configuration: ProcessDeploymentConfigurationInput;
662
+ /** Optional metadata documents to store alongside the deployment */
663
+ metadataDocuments?: MetadataDocument[];
664
+ /** Skill documents describing how to interact with workflows */
665
+ skills?: SkillDocument[];
666
+ }
667
+ export interface DeployedWorkflowInfo {
668
+ workflowTemplateId: string;
669
+ n8nWorkflowId: string;
670
+ status: 'active' | 'inactive' | 'failed';
671
+ }
672
+ export interface DeployProcessUseCaseSuccessData {
673
+ templateId: string;
674
+ version: string;
675
+ isNewProcess: boolean;
676
+ processId: string;
677
+ processInstanceId?: string;
678
+ deploymentInstanceId: string;
679
+ workflowsDeployed: DeployedWorkflowInfo[];
680
+ deploymentStatus: 'deployed' | 'failed' | 'pending';
681
+ error?: string;
682
+ /** Results of metadata document uploads, if any were provided */
683
+ metadataDocumentsStored?: MetadataDocumentUploadResult[];
684
+ }
685
+ export interface DeployProcessUseCaseSuccessResponse {
686
+ success: true;
687
+ data: DeployProcessUseCaseSuccessData;
688
+ requestId: string;
689
+ }
690
+ export type DeployProcessUseCaseErrorCode = 'INVALID_REQUEST' | 'INVALID_PROJECT_ID' | 'INVALID_CONFIGURATION' | 'INVALID_WORKFLOW_JSON' | 'INVALID_VERSION' | 'UNAUTHORIZED' | 'PROJECT_NOT_FOUND' | 'ORGANIZATION_NOT_FOUND' | 'USER_NOT_FOUND' | 'DEPLOYMENT_IN_PROGRESS' | 'N8N_DEPLOYMENT_FAILED' | 'INTERNAL_ERROR';
691
+ export interface DeployProcessUseCaseErrorDetails {
692
+ field?: string;
693
+ reason?: string;
694
+ index?: number;
695
+ }
696
+ export interface DeployProcessUseCaseErrorResponse {
697
+ success: false;
698
+ error: {
699
+ code: DeployProcessUseCaseErrorCode;
700
+ message: string;
701
+ details?: DeployProcessUseCaseErrorDetails;
702
+ };
703
+ requestId: string;
704
+ }
705
+ export type DeployProcessUseCaseResponse = DeployProcessUseCaseSuccessResponse | DeployProcessUseCaseErrorResponse;
706
+ /**
707
+ * Process Data Ingestion Configuration Input
708
+ */
709
+ export interface ProcessDataIngestionConfigInput {
710
+ workflowTemplateId: string;
711
+ workflowName: string;
712
+ n8nWorkflowJsonBase64: string;
713
+ webhooks: {
714
+ embed: string;
715
+ delete: string;
716
+ };
717
+ purpose: string;
718
+ markdownInfo?: string;
719
+ cost?: number;
720
+ }
721
+ export type DataIngestionVersionStrategy = 'major_bump' | 'minor_bump' | 'explicit';
722
+ export interface DeployDataIngestionRequest {
723
+ processId: string;
724
+ versionStrategy?: DataIngestionVersionStrategy;
725
+ explicitVersion?: string;
726
+ config: ProcessDataIngestionConfigInput;
727
+ }
728
+ export interface DeployDataIngestionResponse {
729
+ success: boolean;
730
+ dataIngestionId: string;
731
+ version: string;
732
+ status: 'pending' | 'active' | 'failed' | 'inactive' | 'superseded';
733
+ webhookUrls?: {
734
+ embed: string;
735
+ delete: string;
736
+ };
737
+ error?: string;
738
+ }
739
+ export {};
740
+ //# sourceMappingURL=process-types.d.ts.map