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,41 @@
1
+ /**
2
+ * Document Deployment Client
3
+ * HTTP client for deploying use case documents to the Codika platform.
4
+ */
5
+ export interface DocumentInput {
6
+ stage: number;
7
+ title: string;
8
+ content: string;
9
+ summary: string;
10
+ }
11
+ export interface CreatedDocumentInfo {
12
+ stage: number;
13
+ documentId: string;
14
+ version: string;
15
+ status: 'accepted';
16
+ }
17
+ export interface DeployDocumentsSuccessResult {
18
+ success: true;
19
+ projectId: string;
20
+ documentsCreated: CreatedDocumentInfo[];
21
+ requestId: string;
22
+ }
23
+ export interface DeployDocumentsErrorResult {
24
+ success: false;
25
+ error: string;
26
+ errorCode?: string;
27
+ details?: {
28
+ stage?: number;
29
+ reason?: string;
30
+ };
31
+ requestId?: string;
32
+ }
33
+ export type DeployDocumentsResult = DeployDocumentsSuccessResult | DeployDocumentsErrorResult;
34
+ export declare function deployDocuments(options: {
35
+ projectId: string;
36
+ documents: DocumentInput[];
37
+ apiUrl: string;
38
+ apiKey: string;
39
+ }): Promise<DeployDocumentsResult>;
40
+ export declare function isDeployDocumentsSuccess(result: DeployDocumentsResult): result is DeployDocumentsSuccessResult;
41
+ //# sourceMappingURL=document-deploy-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-deploy-client.d.ts","sourceRoot":"","sources":["../../src/utils/document-deploy-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,GAAG,0BAA0B,CAAC;AAI9F,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAqCjC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,qBAAqB,GAC5B,MAAM,IAAI,4BAA4B,CAExC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Document Deployment Client
3
+ * HTTP client for deploying use case documents to the Codika platform.
4
+ */
5
+ // ── API Functions ────────────────────────────────────────
6
+ export async function deployDocuments(options) {
7
+ const { projectId, documents, apiUrl, apiKey } = options;
8
+ try {
9
+ const response = await fetch(apiUrl, {
10
+ method: 'POST',
11
+ headers: {
12
+ 'Content-Type': 'application/json',
13
+ 'X-Process-Manager-Key': apiKey,
14
+ },
15
+ body: JSON.stringify({ projectId, documents }),
16
+ });
17
+ const result = await response.json();
18
+ if (result.success) {
19
+ return {
20
+ success: true,
21
+ projectId: result.data.projectId,
22
+ documentsCreated: result.data.documentsCreated,
23
+ requestId: result.requestId,
24
+ };
25
+ }
26
+ else {
27
+ return {
28
+ success: false,
29
+ error: result.error?.message || 'Unknown error',
30
+ errorCode: result.error?.code,
31
+ details: result.error?.details,
32
+ requestId: result.requestId,
33
+ };
34
+ }
35
+ }
36
+ catch (error) {
37
+ return {
38
+ success: false,
39
+ error: error instanceof Error ? error.message : String(error),
40
+ };
41
+ }
42
+ }
43
+ export function isDeployDocumentsSuccess(result) {
44
+ return result.success === true;
45
+ }
46
+ //# sourceMappingURL=document-deploy-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-deploy-client.js","sourceRoot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C,KAAK,CAAC;SAC9D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,MAA6B;IAE7B,OAAO,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC;AACjC,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Encryption Utilities (Node.js port)
3
+ *
4
+ * Hybrid encryption (RSA-OAEP + AES-GCM) for integration tokens and secrets.
5
+ * This is a Node.js port of the browser-based encryption from
6
+ * codika-app-platform/src/lib/services/integrations/utils/integrationEncryption.ts
7
+ *
8
+ * Compatibility:
9
+ * - Uses WebCrypto API (crypto.subtle) available in Node 18+
10
+ * - AES-GCM output includes the 16-byte auth tag appended to the ciphertext,
11
+ * matching the browser WebCrypto behavior
12
+ * - The backend (functions/src/utils/crypto/decryption.ts) splits the last 16 bytes
13
+ * as the auth tag when decrypting
14
+ * - RSA-OAEP with SHA-256 matches backend's RSA_PKCS1_OAEP_PADDING + oaepHash 'sha256'
15
+ * - Serialization format: JSON.stringify({ encryptedKey, encryptedData, iv }) all base64
16
+ */
17
+ /**
18
+ * Encrypted data structure containing all components needed for decryption.
19
+ * This matches the structure expected by the backend's `deserializeAndDecrypt()`.
20
+ */
21
+ export interface EncryptedData {
22
+ /** RSA-OAEP encrypted AES-256 key, base64-encoded */
23
+ encryptedKey: string;
24
+ /** AES-GCM encrypted data with 16-byte auth tag appended, base64-encoded */
25
+ encryptedData: string;
26
+ /** 96-bit initialization vector for AES-GCM, base64-encoded */
27
+ iv: string;
28
+ }
29
+ /**
30
+ * Encrypted field representation for storage in Firestore.
31
+ * The `value` field contains the JSON-serialized EncryptedData.
32
+ */
33
+ export interface EncryptedField {
34
+ /** JSON.stringify(EncryptedData) */
35
+ value: string;
36
+ /** Always true for encrypted fields */
37
+ encrypted: boolean;
38
+ /** Optional human-readable description of the secret */
39
+ description?: string;
40
+ }
41
+ /**
42
+ * Fetch the RSA public key (PEM format) from the Codika platform.
43
+ *
44
+ * The key is cached in memory for the lifetime of the process to avoid
45
+ * redundant network requests.
46
+ *
47
+ * @param publicKeyUrl - URL to fetch the public key from.
48
+ * Defaults to `CODIKA_PUBLIC_KEY_URL` env var, or the platform's hosted key.
49
+ * @returns The public key in PEM format
50
+ * @throws If the key cannot be fetched
51
+ */
52
+ export declare function fetchPublicKey(publicKeyUrl?: string): Promise<string>;
53
+ /**
54
+ * Encrypt a plaintext secret using RSA-OAEP + AES-GCM hybrid encryption.
55
+ *
56
+ * The encryption process:
57
+ * 1. Fetches the RSA public key from the Codika platform (cached per process)
58
+ * 2. Generates a random 256-bit AES key
59
+ * 3. Generates a random 96-bit IV
60
+ * 4. Encrypts the plaintext with AES-256-GCM (output includes 16-byte auth tag)
61
+ * 5. Encrypts the AES key with RSA-OAEP (SHA-256)
62
+ * 6. Returns an {@link EncryptedField} ready for Firestore storage
63
+ *
64
+ * The output is compatible with the backend's `deserializeAndDecrypt()` function
65
+ * which uses Node.js `crypto.privateDecrypt()` for the RSA step and
66
+ * `crypto.createDecipheriv('aes-256-gcm')` for the AES step, splitting the
67
+ * last 16 bytes of `encryptedData` as the GCM auth tag.
68
+ *
69
+ * @param plaintext - The secret value to encrypt
70
+ * @param description - Optional description of the secret (stored unencrypted)
71
+ * @param publicKeyUrl - Optional URL override for the public key.
72
+ * Defaults to `CODIKA_PUBLIC_KEY_URL` env var, or the platform's hosted key.
73
+ * @returns An {@link EncryptedField} with the serialized encrypted data
74
+ * @throws If encryption fails (e.g., public key unavailable, crypto error)
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const field = await encryptSecret('sk-my-api-key', 'OpenAI API Key');
79
+ * // field.value is JSON with { encryptedKey, encryptedData, iv }
80
+ * // field.encrypted is true
81
+ * // Store field in Firestore
82
+ * ```
83
+ */
84
+ export declare function encryptSecret(plaintext: string, description?: string, publicKeyUrl?: string): Promise<EncryptedField>;
85
+ //# sourceMappingURL=encryption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../src/utils/encryption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAgBH;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AASD;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAqB3E;AA8BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,aAAa,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,cAAc,CAAC,CA8EzB"}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Encryption Utilities (Node.js port)
3
+ *
4
+ * Hybrid encryption (RSA-OAEP + AES-GCM) for integration tokens and secrets.
5
+ * This is a Node.js port of the browser-based encryption from
6
+ * codika-app-platform/src/lib/services/integrations/utils/integrationEncryption.ts
7
+ *
8
+ * Compatibility:
9
+ * - Uses WebCrypto API (crypto.subtle) available in Node 18+
10
+ * - AES-GCM output includes the 16-byte auth tag appended to the ciphertext,
11
+ * matching the browser WebCrypto behavior
12
+ * - The backend (functions/src/utils/crypto/decryption.ts) splits the last 16 bytes
13
+ * as the auth tag when decrypting
14
+ * - RSA-OAEP with SHA-256 matches backend's RSA_PKCS1_OAEP_PADDING + oaepHash 'sha256'
15
+ * - Serialization format: JSON.stringify({ encryptedKey, encryptedData, iv }) all base64
16
+ */
17
+ import { webcrypto } from 'crypto';
18
+ const subtle = webcrypto.subtle;
19
+ // ========================================
20
+ // CONSTANTS
21
+ // ========================================
22
+ const DEFAULT_PUBLIC_KEY_URL = 'https://codika-app.web.app/encryption/public.pem';
23
+ // ========================================
24
+ // PUBLIC KEY CACHE
25
+ // ========================================
26
+ /** In-memory cache for fetched public keys, keyed by URL */
27
+ const publicKeyCache = new Map();
28
+ /**
29
+ * Fetch the RSA public key (PEM format) from the Codika platform.
30
+ *
31
+ * The key is cached in memory for the lifetime of the process to avoid
32
+ * redundant network requests.
33
+ *
34
+ * @param publicKeyUrl - URL to fetch the public key from.
35
+ * Defaults to `CODIKA_PUBLIC_KEY_URL` env var, or the platform's hosted key.
36
+ * @returns The public key in PEM format
37
+ * @throws If the key cannot be fetched
38
+ */
39
+ export async function fetchPublicKey(publicKeyUrl) {
40
+ const url = publicKeyUrl ?? process.env.CODIKA_PUBLIC_KEY_URL ?? DEFAULT_PUBLIC_KEY_URL;
41
+ const cached = publicKeyCache.get(url);
42
+ if (cached) {
43
+ return cached;
44
+ }
45
+ const response = await fetch(url);
46
+ if (!response.ok) {
47
+ throw new Error(`Failed to fetch public key from ${url}: ${response.status} ${response.statusText}`);
48
+ }
49
+ const pem = await response.text();
50
+ if (!pem.includes('-----BEGIN PUBLIC KEY-----')) {
51
+ throw new Error(`Invalid public key format from ${url}: missing PEM header`);
52
+ }
53
+ publicKeyCache.set(url, pem);
54
+ return pem;
55
+ }
56
+ // ========================================
57
+ // INTERNAL HELPERS
58
+ // ========================================
59
+ /**
60
+ * Convert a PEM-encoded public key to an ArrayBuffer (DER format).
61
+ */
62
+ function pemToArrayBuffer(pem) {
63
+ const base64 = pem
64
+ .replace('-----BEGIN PUBLIC KEY-----', '')
65
+ .replace('-----END PUBLIC KEY-----', '')
66
+ .replace(/\s/g, '');
67
+ const buffer = Buffer.from(base64, 'base64');
68
+ return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
69
+ }
70
+ /**
71
+ * Convert an ArrayBuffer to a base64 string.
72
+ */
73
+ function arrayBufferToBase64(buffer) {
74
+ return Buffer.from(buffer).toString('base64');
75
+ }
76
+ // ========================================
77
+ // ENCRYPTION
78
+ // ========================================
79
+ /**
80
+ * Encrypt a plaintext secret using RSA-OAEP + AES-GCM hybrid encryption.
81
+ *
82
+ * The encryption process:
83
+ * 1. Fetches the RSA public key from the Codika platform (cached per process)
84
+ * 2. Generates a random 256-bit AES key
85
+ * 3. Generates a random 96-bit IV
86
+ * 4. Encrypts the plaintext with AES-256-GCM (output includes 16-byte auth tag)
87
+ * 5. Encrypts the AES key with RSA-OAEP (SHA-256)
88
+ * 6. Returns an {@link EncryptedField} ready for Firestore storage
89
+ *
90
+ * The output is compatible with the backend's `deserializeAndDecrypt()` function
91
+ * which uses Node.js `crypto.privateDecrypt()` for the RSA step and
92
+ * `crypto.createDecipheriv('aes-256-gcm')` for the AES step, splitting the
93
+ * last 16 bytes of `encryptedData` as the GCM auth tag.
94
+ *
95
+ * @param plaintext - The secret value to encrypt
96
+ * @param description - Optional description of the secret (stored unencrypted)
97
+ * @param publicKeyUrl - Optional URL override for the public key.
98
+ * Defaults to `CODIKA_PUBLIC_KEY_URL` env var, or the platform's hosted key.
99
+ * @returns An {@link EncryptedField} with the serialized encrypted data
100
+ * @throws If encryption fails (e.g., public key unavailable, crypto error)
101
+ *
102
+ * @example
103
+ * ```ts
104
+ * const field = await encryptSecret('sk-my-api-key', 'OpenAI API Key');
105
+ * // field.value is JSON with { encryptedKey, encryptedData, iv }
106
+ * // field.encrypted is true
107
+ * // Store field in Firestore
108
+ * ```
109
+ */
110
+ export async function encryptSecret(plaintext, description, publicKeyUrl) {
111
+ try {
112
+ // 1. Fetch and import the RSA public key
113
+ const pem = await fetchPublicKey(publicKeyUrl);
114
+ const publicKey = await subtle.importKey('spki', pemToArrayBuffer(pem), {
115
+ name: 'RSA-OAEP',
116
+ hash: { name: 'SHA-256' }
117
+ }, false, ['encrypt']);
118
+ // 2. Generate a random 256-bit AES key
119
+ const aesKey = await subtle.generateKey({
120
+ name: 'AES-GCM',
121
+ length: 256
122
+ }, true, // extractable — we need to export it for RSA encryption
123
+ ['encrypt']);
124
+ const aesKeyRaw = await subtle.exportKey('raw', aesKey);
125
+ // 3. Generate a random 96-bit IV (recommended for AES-GCM)
126
+ const iv = new Uint8Array(12);
127
+ webcrypto.getRandomValues(iv);
128
+ // 4. Encrypt the plaintext with AES-GCM
129
+ // WebCrypto AES-GCM automatically appends the 16-byte auth tag to the ciphertext.
130
+ // This is critical: the backend expects this format and splits the last 16 bytes.
131
+ const encoder = new TextEncoder();
132
+ const plaintextBytes = encoder.encode(plaintext);
133
+ const encryptedDataBuffer = await subtle.encrypt({
134
+ name: 'AES-GCM',
135
+ iv: iv
136
+ }, aesKey, plaintextBytes);
137
+ // 5. Encrypt the AES key with RSA-OAEP
138
+ const encryptedKeyBuffer = await subtle.encrypt({
139
+ name: 'RSA-OAEP'
140
+ }, publicKey, aesKeyRaw);
141
+ // 6. Build the encrypted data structure (all base64)
142
+ const encryptedData = {
143
+ encryptedKey: arrayBufferToBase64(encryptedKeyBuffer),
144
+ encryptedData: arrayBufferToBase64(encryptedDataBuffer),
145
+ iv: arrayBufferToBase64(iv.buffer)
146
+ };
147
+ // 7. Build the encrypted field
148
+ const field = {
149
+ value: JSON.stringify(encryptedData),
150
+ encrypted: true
151
+ };
152
+ if (description) {
153
+ field.description = description;
154
+ }
155
+ return field;
156
+ }
157
+ catch (error) {
158
+ const message = error instanceof Error ? error.message : 'Unknown error';
159
+ throw new Error(`Failed to encrypt secret: ${message}`);
160
+ }
161
+ }
162
+ //# sourceMappingURL=encryption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.js","sourceRoot":"","sources":["../../src/utils/encryption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,GAA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
+ * HTTP client for fetching execution details from the Codika platform via API key
4
+ */
5
+ /**
6
+ * Options for fetching execution details
7
+ */
8
+ export interface GetExecutionDetailsOptions {
9
+ /** Process instance ID */
10
+ processInstanceId: string;
11
+ /** Codika execution ID */
12
+ executionId: string;
13
+ /** Recursively fetch sub-workflow executions */
14
+ deep?: boolean;
15
+ /** Strip noise for readability */
16
+ slim?: boolean;
17
+ /** API URL for the getExecutionDetailsPublic endpoint */
18
+ apiUrl: string;
19
+ /** API key (organization API key or admin key) */
20
+ apiKey: string;
21
+ }
22
+ /**
23
+ * Success response from execution details fetch
24
+ */
25
+ export interface GetExecutionDetailsSuccessResponse {
26
+ success: true;
27
+ execution: {
28
+ codikaExecutionId: string;
29
+ n8nExecutionId: string;
30
+ status: string;
31
+ n8nExecution: any;
32
+ };
33
+ requestId: string;
34
+ }
35
+ /**
36
+ * Error response from execution details fetch
37
+ */
38
+ export interface GetExecutionDetailsErrorResponse {
39
+ success: false;
40
+ error: string;
41
+ code: string;
42
+ }
43
+ /**
44
+ * Combined response type
45
+ */
46
+ export type GetExecutionDetailsResponse = GetExecutionDetailsSuccessResponse | GetExecutionDetailsErrorResponse;
47
+ /**
48
+ * Type guard for success response
49
+ */
50
+ export declare function isGetExecutionDetailsSuccess(response: GetExecutionDetailsResponse): response is GetExecutionDetailsSuccessResponse;
51
+ /**
52
+ * Type guard for error response
53
+ */
54
+ export declare function isGetExecutionDetailsError(response: GetExecutionDetailsResponse): response is GetExecutionDetailsErrorResponse;
55
+ /**
56
+ * Fetch execution details from the Codika platform
57
+ *
58
+ * @param options - Execution details fetch options
59
+ * @returns Execution details result
60
+ */
61
+ export declare function getExecutionDetails(options: GetExecutionDetailsOptions): Promise<GetExecutionDetailsResponse>;
62
+ /**
63
+ * Fetch execution details and throw on error
64
+ * Convenience function for when you want exceptions on failure
65
+ *
66
+ * @param options - Execution details fetch options
67
+ * @returns Success response with execution details
68
+ * @throws Error if fetch fails
69
+ */
70
+ export declare function getExecutionDetailsOrThrow(options: GetExecutionDetailsOptions): Promise<GetExecutionDetailsSuccessResponse>;
71
+ //# sourceMappingURL=execution-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-client.d.ts","sourceRoot":"","sources":["../../src/utils/execution-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,0BAA0B;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE;QACT,iBAAiB,EAAE,MAAM,CAAC;QAC1B,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,GAAG,CAAC;KACnB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACnC,kCAAkC,GAClC,gCAAgC,CAAC;AAErC;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,2BAA2B,GACpC,QAAQ,IAAI,kCAAkC,CAEhD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,2BAA2B,GACpC,QAAQ,IAAI,gCAAgC,CAE9C;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC,CA0BtC;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,kCAAkC,CAAC,CAU7C"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Execution Client
3
+ * HTTP client for fetching execution details from the Codika platform via API key
4
+ */
5
+ /**
6
+ * Type guard for success response
7
+ */
8
+ export function isGetExecutionDetailsSuccess(response) {
9
+ return response.success === true;
10
+ }
11
+ /**
12
+ * Type guard for error response
13
+ */
14
+ export function isGetExecutionDetailsError(response) {
15
+ return response.success === false;
16
+ }
17
+ /**
18
+ * Fetch execution details from the Codika platform
19
+ *
20
+ * @param options - Execution details fetch options
21
+ * @returns Execution details result
22
+ */
23
+ export async function getExecutionDetails(options) {
24
+ const { processInstanceId, executionId, deep, slim, apiKey, apiUrl, } = options;
25
+ const params = new URLSearchParams();
26
+ if (deep)
27
+ params.set('deep', 'true');
28
+ if (slim)
29
+ params.set('slim', 'true');
30
+ const queryString = params.toString();
31
+ const url = `${apiUrl}/${processInstanceId}/${executionId}${queryString ? '?' + queryString : ''}`;
32
+ const response = await fetch(url, {
33
+ method: 'GET',
34
+ headers: {
35
+ 'X-Process-Manager-Key': apiKey,
36
+ },
37
+ });
38
+ const result = (await response.json());
39
+ return result;
40
+ }
41
+ /**
42
+ * Fetch execution details and throw on error
43
+ * Convenience function for when you want exceptions on failure
44
+ *
45
+ * @param options - Execution details fetch options
46
+ * @returns Success response with execution details
47
+ * @throws Error if fetch fails
48
+ */
49
+ export async function getExecutionDetailsOrThrow(options) {
50
+ const result = await getExecutionDetails(options);
51
+ if (isGetExecutionDetailsError(result)) {
52
+ throw new Error(`Execution details fetch failed: ${result.error}`);
53
+ }
54
+ return result;
55
+ }
56
+ //# sourceMappingURL=execution-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-client.js","sourceRoot":"","sources":["../../src/utils/execution-client.ts"],"names":[],"mappings":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A0B,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACb,mCAAmC,MAAM,CAAC,KAAK,EAAE,CAClD,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Integration Client
3
+ *
4
+ * HTTP client for managing integrations via public API endpoints.
5
+ * Follows the same pattern as redeploy-client.ts.
6
+ */
7
+ interface EncryptedField {
8
+ value: string;
9
+ encrypted: boolean;
10
+ description?: string;
11
+ }
12
+ export interface CreateIntegrationRequest {
13
+ organizationId?: string;
14
+ integrationId: string;
15
+ contextType: 'organization' | 'member' | 'process_instance';
16
+ memberId?: string;
17
+ processInstanceId?: string;
18
+ secrets: Record<string, EncryptedField>;
19
+ metadata: Record<string, any>;
20
+ customIntegrationSchema?: Record<string, any>;
21
+ }
22
+ export interface CreateIntegrationSuccessResponse {
23
+ success: true;
24
+ data: {
25
+ message: string;
26
+ n8nCredentialId?: string;
27
+ };
28
+ requestId: string;
29
+ }
30
+ export interface CreateIntegrationErrorResponse {
31
+ success: false;
32
+ error: {
33
+ code: string;
34
+ message: string;
35
+ };
36
+ requestId: string;
37
+ }
38
+ export type CreateIntegrationResponse = CreateIntegrationSuccessResponse | CreateIntegrationErrorResponse;
39
+ export declare function isCreateIntegrationSuccess(response: CreateIntegrationResponse): response is CreateIntegrationSuccessResponse;
40
+ export interface CreateIntegrationOptions {
41
+ apiUrl: string;
42
+ apiKey: string;
43
+ body: CreateIntegrationRequest;
44
+ }
45
+ export declare function createIntegrationRemote(options: CreateIntegrationOptions): Promise<CreateIntegrationResponse>;
46
+ export interface DeleteIntegrationRequest {
47
+ organizationId?: string;
48
+ integrationId: string;
49
+ contextType: 'organization' | 'member' | 'process_instance';
50
+ memberId?: string;
51
+ processInstanceId?: string;
52
+ confirmDeletion?: boolean;
53
+ }
54
+ export interface PendingDeactivation {
55
+ processInstanceId: string;
56
+ title: string;
57
+ }
58
+ export interface DeleteIntegrationSuccessResponse {
59
+ success: true;
60
+ data: {
61
+ message: string;
62
+ deactivatedCount?: number;
63
+ };
64
+ requestId: string;
65
+ }
66
+ export interface DeleteIntegrationPendingResponse {
67
+ success: false;
68
+ data: {
69
+ message: string;
70
+ pendingDeactivations: {
71
+ count: number;
72
+ processes: PendingDeactivation[];
73
+ };
74
+ };
75
+ requestId: string;
76
+ }
77
+ export interface DeleteIntegrationErrorResponse {
78
+ success: false;
79
+ error: {
80
+ code: string;
81
+ message: string;
82
+ };
83
+ requestId: string;
84
+ }
85
+ export type DeleteIntegrationResponse = DeleteIntegrationSuccessResponse | DeleteIntegrationPendingResponse | DeleteIntegrationErrorResponse;
86
+ export declare function isDeleteIntegrationSuccess(response: DeleteIntegrationResponse): response is DeleteIntegrationSuccessResponse;
87
+ export declare function isDeleteIntegrationPending(response: DeleteIntegrationResponse): response is DeleteIntegrationPendingResponse;
88
+ export interface DeleteIntegrationOptions {
89
+ apiUrl: string;
90
+ apiKey: string;
91
+ body: DeleteIntegrationRequest;
92
+ }
93
+ export declare function deleteIntegrationRemote(options: DeleteIntegrationOptions): Promise<DeleteIntegrationResponse>;
94
+ export interface ListIntegrationsRequest {
95
+ organizationId?: string;
96
+ contextType: 'organization' | 'member' | 'process_instance';
97
+ memberId?: string;
98
+ processInstanceId?: string;
99
+ }
100
+ export interface IntegrationSummaryEntry {
101
+ integrationId: string;
102
+ connected: boolean;
103
+ connectedAt?: string;
104
+ connectedBy?: string;
105
+ hasValidTokens?: boolean;
106
+ n8nCredentialId?: string;
107
+ customSchema?: Record<string, any>;
108
+ }
109
+ export interface ListIntegrationsSuccessResponse {
110
+ success: true;
111
+ data: {
112
+ connectedIntegrations: string[];
113
+ integrations: IntegrationSummaryEntry[];
114
+ };
115
+ requestId: string;
116
+ }
117
+ export interface ListIntegrationsErrorResponse {
118
+ success: false;
119
+ error: {
120
+ code: string;
121
+ message: string;
122
+ };
123
+ requestId: string;
124
+ }
125
+ export type ListIntegrationsResponse = ListIntegrationsSuccessResponse | ListIntegrationsErrorResponse;
126
+ export declare function isListIntegrationsSuccess(response: ListIntegrationsResponse): response is ListIntegrationsSuccessResponse;
127
+ export interface ListIntegrationsOptions {
128
+ apiUrl: string;
129
+ apiKey: string;
130
+ body: ListIntegrationsRequest;
131
+ }
132
+ export declare function listIntegrationsRemote(options: ListIntegrationsOptions): Promise<ListIntegrationsResponse>;
133
+ export {};
134
+ //# sourceMappingURL=integration-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-client.d.ts","sourceRoot":"","sources":["../../src/utils/integration-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,MAAM,WAAW,wBAAwB;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,cAAc,GAAG,QAAQ,GAAG,kBAAkB,CAAC;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,uBAAuB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;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