@vertesia/workflow 0.54.0 → 0.55.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 (357) hide show
  1. package/lib/cjs/activities/advanced/createDocumentTypeFromInteractionRun.js +32 -0
  2. package/lib/cjs/activities/advanced/createDocumentTypeFromInteractionRun.js.map +1 -0
  3. package/lib/cjs/activities/advanced/createOrUpdateDocumentFromInteractionRun.js +72 -0
  4. package/lib/cjs/activities/advanced/createOrUpdateDocumentFromInteractionRun.js.map +1 -0
  5. package/lib/cjs/activities/advanced/updateDocumentFromInteractionRun.js +18 -0
  6. package/lib/cjs/activities/advanced/updateDocumentFromInteractionRun.js.map +1 -0
  7. package/lib/cjs/activities/chunkDocument.js +84 -0
  8. package/lib/cjs/activities/chunkDocument.js.map +1 -0
  9. package/lib/cjs/activities/createDocumentFromOther.js +64 -0
  10. package/lib/cjs/activities/createDocumentFromOther.js.map +1 -0
  11. package/lib/cjs/activities/executeInteraction.js +154 -0
  12. package/lib/cjs/activities/executeInteraction.js.map +1 -0
  13. package/lib/cjs/activities/extractDocumentText.js +156 -0
  14. package/lib/cjs/activities/extractDocumentText.js.map +1 -0
  15. package/lib/cjs/activities/generateDocumentProperties.js +77 -0
  16. package/lib/cjs/activities/generateDocumentProperties.js.map +1 -0
  17. package/lib/cjs/activities/generateEmbeddings.js +248 -0
  18. package/lib/cjs/activities/generateEmbeddings.js.map +1 -0
  19. package/lib/cjs/activities/generateImageRendition.js +167 -0
  20. package/lib/cjs/activities/generateImageRendition.js.map +1 -0
  21. package/lib/cjs/activities/generateOrAssignContentType.js +112 -0
  22. package/lib/cjs/activities/generateOrAssignContentType.js.map +1 -0
  23. package/lib/cjs/activities/getObjectFromStore.js +20 -0
  24. package/lib/cjs/activities/getObjectFromStore.js.map +1 -0
  25. package/lib/cjs/activities/handleError.js +22 -0
  26. package/lib/cjs/activities/handleError.js.map +1 -0
  27. package/lib/cjs/activities/index-dsl.js +39 -0
  28. package/lib/cjs/activities/index-dsl.js.map +1 -0
  29. package/lib/cjs/activities/index.js +21 -0
  30. package/lib/cjs/activities/index.js.map +1 -0
  31. package/lib/cjs/activities/media/processPdfWithTextract.js +102 -0
  32. package/lib/cjs/activities/media/processPdfWithTextract.js.map +1 -0
  33. package/lib/cjs/activities/media/transcribeMediaWithGladia.js +51 -0
  34. package/lib/cjs/activities/media/transcribeMediaWithGladia.js.map +1 -0
  35. package/lib/cjs/activities/notifyWebhook.js +34 -0
  36. package/lib/cjs/activities/notifyWebhook.js.map +1 -0
  37. package/lib/cjs/activities/setDocumentStatus.js +15 -0
  38. package/lib/cjs/activities/setDocumentStatus.js.map +1 -0
  39. package/lib/cjs/conversion/TextractProcessor.js +417 -0
  40. package/lib/cjs/conversion/TextractProcessor.js.map +1 -0
  41. package/lib/cjs/conversion/image.js +94 -0
  42. package/lib/cjs/conversion/image.js.map +1 -0
  43. package/lib/cjs/conversion/markitdown.js +42 -0
  44. package/lib/cjs/conversion/markitdown.js.map +1 -0
  45. package/lib/cjs/conversion/mutool.js +147 -0
  46. package/lib/cjs/conversion/mutool.js.map +1 -0
  47. package/lib/cjs/conversion/pandoc.js +39 -0
  48. package/lib/cjs/conversion/pandoc.js.map +1 -0
  49. package/lib/cjs/dsl/conditions.js +81 -0
  50. package/lib/cjs/dsl/conditions.js.map +1 -0
  51. package/lib/cjs/dsl/dsl-workflow.js +271 -0
  52. package/lib/cjs/dsl/dsl-workflow.js.map +1 -0
  53. package/lib/cjs/dsl/dslProxyActivities.js +23 -0
  54. package/lib/cjs/dsl/dslProxyActivities.js.map +1 -0
  55. package/lib/cjs/dsl/projections.js +59 -0
  56. package/lib/cjs/dsl/projections.js.map +1 -0
  57. package/lib/cjs/dsl/setup/ActivityContext.js +120 -0
  58. package/lib/cjs/dsl/setup/ActivityContext.js.map +1 -0
  59. package/lib/cjs/dsl/setup/fetch/DataProvider.js +51 -0
  60. package/lib/cjs/dsl/setup/fetch/DataProvider.js.map +1 -0
  61. package/lib/cjs/dsl/setup/fetch/index.js +16 -0
  62. package/lib/cjs/dsl/setup/fetch/index.js.map +1 -0
  63. package/lib/cjs/dsl/setup/fetch/providers.js +67 -0
  64. package/lib/cjs/dsl/setup/fetch/providers.js.map +1 -0
  65. package/lib/cjs/dsl/test/test-child-workflow.js +10 -0
  66. package/lib/cjs/dsl/test/test-child-workflow.js.map +1 -0
  67. package/lib/cjs/dsl/validation.js +122 -0
  68. package/lib/cjs/dsl/validation.js.map +1 -0
  69. package/lib/cjs/dsl/vars.js +341 -0
  70. package/lib/cjs/dsl/vars.js.map +1 -0
  71. package/lib/cjs/dsl/walk.js +100 -0
  72. package/lib/cjs/dsl/walk.js.map +1 -0
  73. package/lib/cjs/dsl.js +20 -0
  74. package/lib/cjs/dsl.js.map +1 -0
  75. package/lib/cjs/errors.js +48 -0
  76. package/lib/cjs/errors.js.map +1 -0
  77. package/lib/cjs/index.js +50 -0
  78. package/lib/cjs/index.js.map +1 -0
  79. package/lib/cjs/iterative-generation/activities/extractToc.js +47 -0
  80. package/lib/cjs/iterative-generation/activities/extractToc.js.map +1 -0
  81. package/lib/cjs/iterative-generation/activities/finalizeOutput.js +69 -0
  82. package/lib/cjs/iterative-generation/activities/finalizeOutput.js.map +1 -0
  83. package/lib/cjs/iterative-generation/activities/generatePart.js +73 -0
  84. package/lib/cjs/iterative-generation/activities/generatePart.js.map +1 -0
  85. package/lib/cjs/iterative-generation/activities/generateToc.js +91 -0
  86. package/lib/cjs/iterative-generation/activities/generateToc.js.map +1 -0
  87. package/lib/cjs/iterative-generation/activities/index.js +12 -0
  88. package/lib/cjs/iterative-generation/activities/index.js.map +1 -0
  89. package/lib/cjs/iterative-generation/iterativeGenerationWorkflow.js +56 -0
  90. package/lib/cjs/iterative-generation/iterativeGenerationWorkflow.js.map +1 -0
  91. package/lib/cjs/iterative-generation/types.js +5 -0
  92. package/lib/cjs/iterative-generation/types.js.map +1 -0
  93. package/lib/cjs/iterative-generation/utils.js +121 -0
  94. package/lib/cjs/iterative-generation/utils.js.map +1 -0
  95. package/lib/cjs/package.json +3 -0
  96. package/lib/cjs/result-types.js +10 -0
  97. package/lib/cjs/result-types.js.map +1 -0
  98. package/lib/cjs/system/notifyWebhookWorkflow.js +47 -0
  99. package/lib/cjs/system/notifyWebhookWorkflow.js.map +1 -0
  100. package/lib/cjs/system/recalculateEmbeddingsWorkflow.js +28 -0
  101. package/lib/cjs/system/recalculateEmbeddingsWorkflow.js.map +1 -0
  102. package/lib/cjs/utils/auth.js +15 -0
  103. package/lib/cjs/utils/auth.js.map +1 -0
  104. package/lib/cjs/utils/blobs.js +69 -0
  105. package/lib/cjs/utils/blobs.js.map +1 -0
  106. package/lib/cjs/utils/chunks.js +14 -0
  107. package/lib/cjs/utils/chunks.js.map +1 -0
  108. package/lib/cjs/utils/client.js +26 -0
  109. package/lib/cjs/utils/client.js.map +1 -0
  110. package/lib/cjs/utils/expand-vars.js +33 -0
  111. package/lib/cjs/utils/expand-vars.js.map +1 -0
  112. package/lib/cjs/utils/memory.js +65 -0
  113. package/lib/cjs/utils/memory.js.map +1 -0
  114. package/lib/cjs/utils/tokens.js +38 -0
  115. package/lib/cjs/utils/tokens.js.map +1 -0
  116. package/lib/cjs/vars.js +20 -0
  117. package/lib/cjs/vars.js.map +1 -0
  118. package/lib/cjs/workflows.js +15 -0
  119. package/lib/cjs/workflows.js.map +1 -0
  120. package/lib/esm/activities/advanced/createDocumentTypeFromInteractionRun.js +29 -0
  121. package/lib/esm/activities/advanced/createDocumentTypeFromInteractionRun.js.map +1 -0
  122. package/lib/esm/activities/advanced/createOrUpdateDocumentFromInteractionRun.js +69 -0
  123. package/lib/esm/activities/advanced/createOrUpdateDocumentFromInteractionRun.js.map +1 -0
  124. package/lib/esm/activities/advanced/updateDocumentFromInteractionRun.js +15 -0
  125. package/lib/esm/activities/advanced/updateDocumentFromInteractionRun.js.map +1 -0
  126. package/lib/esm/activities/chunkDocument.js +81 -0
  127. package/lib/esm/activities/chunkDocument.js.map +1 -0
  128. package/lib/esm/activities/createDocumentFromOther.js +58 -0
  129. package/lib/esm/activities/createDocumentFromOther.js.map +1 -0
  130. package/lib/esm/activities/executeInteraction.js +150 -0
  131. package/lib/esm/activities/executeInteraction.js.map +1 -0
  132. package/lib/esm/activities/extractDocumentText.js +153 -0
  133. package/lib/esm/activities/extractDocumentText.js.map +1 -0
  134. package/lib/esm/activities/generateDocumentProperties.js +74 -0
  135. package/lib/esm/activities/generateDocumentProperties.js.map +1 -0
  136. package/lib/esm/activities/generateEmbeddings.js +245 -0
  137. package/lib/esm/activities/generateEmbeddings.js.map +1 -0
  138. package/lib/esm/activities/generateImageRendition.js +161 -0
  139. package/lib/esm/activities/generateImageRendition.js.map +1 -0
  140. package/lib/esm/activities/generateOrAssignContentType.js +109 -0
  141. package/lib/esm/activities/generateOrAssignContentType.js.map +1 -0
  142. package/lib/esm/activities/getObjectFromStore.js +17 -0
  143. package/lib/esm/activities/getObjectFromStore.js.map +1 -0
  144. package/lib/esm/activities/handleError.js +19 -0
  145. package/lib/esm/activities/handleError.js.map +1 -0
  146. package/lib/esm/activities/index-dsl.js +19 -0
  147. package/lib/esm/activities/index-dsl.js.map +1 -0
  148. package/lib/esm/activities/index.js +5 -0
  149. package/lib/esm/activities/index.js.map +1 -0
  150. package/lib/esm/activities/media/processPdfWithTextract.js +98 -0
  151. package/lib/esm/activities/media/processPdfWithTextract.js.map +1 -0
  152. package/lib/esm/activities/media/transcribeMediaWithGladia.js +48 -0
  153. package/lib/esm/activities/media/transcribeMediaWithGladia.js.map +1 -0
  154. package/lib/esm/activities/notifyWebhook.js +31 -0
  155. package/lib/esm/activities/notifyWebhook.js.map +1 -0
  156. package/lib/esm/activities/setDocumentStatus.js +12 -0
  157. package/lib/esm/activities/setDocumentStatus.js.map +1 -0
  158. package/lib/esm/conversion/TextractProcessor.js +410 -0
  159. package/lib/esm/conversion/TextractProcessor.js.map +1 -0
  160. package/lib/esm/conversion/image.js +88 -0
  161. package/lib/esm/conversion/image.js.map +1 -0
  162. package/lib/esm/conversion/markitdown.js +36 -0
  163. package/lib/esm/conversion/markitdown.js.map +1 -0
  164. package/lib/esm/conversion/mutool.js +139 -0
  165. package/lib/esm/conversion/mutool.js.map +1 -0
  166. package/lib/esm/conversion/pandoc.js +36 -0
  167. package/lib/esm/conversion/pandoc.js.map +1 -0
  168. package/lib/esm/dsl/conditions.js +75 -0
  169. package/lib/esm/dsl/conditions.js.map +1 -0
  170. package/lib/esm/dsl/dsl-workflow.js +264 -0
  171. package/lib/esm/dsl/dsl-workflow.js.map +1 -0
  172. package/lib/esm/dsl/dslProxyActivities.js +20 -0
  173. package/lib/esm/dsl/dslProxyActivities.js.map +1 -0
  174. package/lib/esm/dsl/projections.js +55 -0
  175. package/lib/esm/dsl/projections.js.map +1 -0
  176. package/lib/esm/dsl/setup/ActivityContext.js +115 -0
  177. package/lib/esm/dsl/setup/ActivityContext.js.map +1 -0
  178. package/lib/esm/dsl/setup/fetch/DataProvider.js +47 -0
  179. package/lib/esm/dsl/setup/fetch/DataProvider.js.map +1 -0
  180. package/lib/esm/dsl/setup/fetch/index.js +12 -0
  181. package/lib/esm/dsl/setup/fetch/index.js.map +1 -0
  182. package/lib/esm/dsl/setup/fetch/providers.js +61 -0
  183. package/lib/esm/dsl/setup/fetch/providers.js.map +1 -0
  184. package/lib/esm/dsl/test/test-child-workflow.js +5 -0
  185. package/lib/esm/dsl/test/test-child-workflow.js.map +1 -0
  186. package/lib/esm/dsl/validation.js +118 -0
  187. package/lib/esm/dsl/validation.js.map +1 -0
  188. package/lib/esm/dsl/vars.js +335 -0
  189. package/lib/esm/dsl/vars.js.map +1 -0
  190. package/lib/esm/dsl/walk.js +96 -0
  191. package/lib/esm/dsl/walk.js.map +1 -0
  192. package/lib/esm/dsl.js +4 -0
  193. package/lib/esm/dsl.js.map +1 -0
  194. package/lib/esm/errors.js +41 -0
  195. package/lib/esm/errors.js.map +1 -0
  196. package/lib/esm/index.js +32 -0
  197. package/lib/esm/index.js.map +1 -0
  198. package/lib/esm/iterative-generation/activities/extractToc.js +44 -0
  199. package/lib/esm/iterative-generation/activities/extractToc.js.map +1 -0
  200. package/lib/esm/iterative-generation/activities/finalizeOutput.js +66 -0
  201. package/lib/esm/iterative-generation/activities/finalizeOutput.js.map +1 -0
  202. package/lib/esm/iterative-generation/activities/generatePart.js +70 -0
  203. package/lib/esm/iterative-generation/activities/generatePart.js.map +1 -0
  204. package/lib/esm/iterative-generation/activities/generateToc.js +88 -0
  205. package/lib/esm/iterative-generation/activities/generateToc.js.map +1 -0
  206. package/lib/esm/iterative-generation/activities/index.js +5 -0
  207. package/lib/esm/iterative-generation/activities/index.js.map +1 -0
  208. package/lib/esm/iterative-generation/iterativeGenerationWorkflow.js +53 -0
  209. package/lib/esm/iterative-generation/iterativeGenerationWorkflow.js.map +1 -0
  210. package/lib/esm/iterative-generation/types.js +2 -0
  211. package/lib/esm/iterative-generation/types.js.map +1 -0
  212. package/lib/esm/iterative-generation/utils.js +112 -0
  213. package/lib/esm/iterative-generation/utils.js.map +1 -0
  214. package/lib/esm/result-types.js +7 -0
  215. package/lib/esm/result-types.js.map +1 -0
  216. package/lib/esm/system/notifyWebhookWorkflow.js +44 -0
  217. package/lib/esm/system/notifyWebhookWorkflow.js.map +1 -0
  218. package/lib/esm/system/recalculateEmbeddingsWorkflow.js +25 -0
  219. package/lib/esm/system/recalculateEmbeddingsWorkflow.js.map +1 -0
  220. package/lib/esm/utils/auth.js +8 -0
  221. package/lib/esm/utils/auth.js.map +1 -0
  222. package/lib/esm/utils/blobs.js +58 -0
  223. package/lib/esm/utils/blobs.js.map +1 -0
  224. package/lib/esm/utils/chunks.js +9 -0
  225. package/lib/esm/utils/chunks.js.map +1 -0
  226. package/lib/esm/utils/client.js +23 -0
  227. package/lib/esm/utils/client.js.map +1 -0
  228. package/lib/esm/utils/expand-vars.js +30 -0
  229. package/lib/esm/utils/expand-vars.js.map +1 -0
  230. package/lib/esm/utils/memory.js +55 -0
  231. package/lib/esm/utils/memory.js.map +1 -0
  232. package/lib/esm/utils/tokens.js +34 -0
  233. package/lib/esm/utils/tokens.js.map +1 -0
  234. package/lib/esm/vars.js +4 -0
  235. package/lib/esm/vars.js.map +1 -0
  236. package/lib/esm/workflows.js +8 -0
  237. package/lib/esm/workflows.js.map +1 -0
  238. package/lib/types/activities/advanced/createDocumentTypeFromInteractionRun.d.ts +17 -0
  239. package/lib/types/activities/advanced/createDocumentTypeFromInteractionRun.d.ts.map +1 -0
  240. package/lib/types/activities/advanced/createOrUpdateDocumentFromInteractionRun.d.ts +39 -0
  241. package/lib/types/activities/advanced/createOrUpdateDocumentFromInteractionRun.d.ts.map +1 -0
  242. package/lib/types/activities/advanced/updateDocumentFromInteractionRun.d.ts +19 -0
  243. package/lib/types/activities/advanced/updateDocumentFromInteractionRun.d.ts.map +1 -0
  244. package/lib/types/activities/chunkDocument.d.ts +33 -0
  245. package/lib/types/activities/chunkDocument.d.ts.map +1 -0
  246. package/lib/types/activities/createDocumentFromOther.d.ts +21 -0
  247. package/lib/types/activities/createDocumentFromOther.d.ts.map +1 -0
  248. package/lib/types/activities/executeInteraction.d.ts +55 -0
  249. package/lib/types/activities/executeInteraction.d.ts.map +1 -0
  250. package/lib/types/activities/extractDocumentText.d.ts +10 -0
  251. package/lib/types/activities/extractDocumentText.d.ts.map +1 -0
  252. package/lib/types/activities/generateDocumentProperties.d.ts +32 -0
  253. package/lib/types/activities/generateDocumentProperties.d.ts.map +1 -0
  254. package/lib/types/activities/generateEmbeddings.d.ts +53 -0
  255. package/lib/types/activities/generateEmbeddings.d.ts.map +1 -0
  256. package/lib/types/activities/generateImageRendition.d.ts +15 -0
  257. package/lib/types/activities/generateImageRendition.d.ts.map +1 -0
  258. package/lib/types/activities/generateOrAssignContentType.d.ts +44 -0
  259. package/lib/types/activities/generateOrAssignContentType.d.ts.map +1 -0
  260. package/lib/types/activities/getObjectFromStore.d.ts +14 -0
  261. package/lib/types/activities/getObjectFromStore.d.ts.map +1 -0
  262. package/lib/types/activities/handleError.d.ts +6 -0
  263. package/lib/types/activities/handleError.d.ts.map +1 -0
  264. package/lib/types/activities/index-dsl.d.ts +18 -0
  265. package/lib/types/activities/index-dsl.d.ts.map +1 -0
  266. package/lib/types/activities/index.d.ts +5 -0
  267. package/lib/types/activities/index.d.ts.map +1 -0
  268. package/lib/types/activities/media/processPdfWithTextract.d.ts +26 -0
  269. package/lib/types/activities/media/processPdfWithTextract.d.ts.map +1 -0
  270. package/lib/types/activities/media/transcribeMediaWithGladia.d.ts +14 -0
  271. package/lib/types/activities/media/transcribeMediaWithGladia.d.ts.map +1 -0
  272. package/lib/types/activities/notifyWebhook.d.ts +16 -0
  273. package/lib/types/activities/notifyWebhook.d.ts.map +1 -0
  274. package/lib/types/activities/setDocumentStatus.d.ts +15 -0
  275. package/lib/types/activities/setDocumentStatus.d.ts.map +1 -0
  276. package/lib/types/conversion/TextractProcessor.d.ts +45 -0
  277. package/lib/types/conversion/TextractProcessor.d.ts.map +1 -0
  278. package/lib/types/conversion/image.d.ts +11 -0
  279. package/lib/types/conversion/image.d.ts.map +1 -0
  280. package/lib/types/conversion/markitdown.d.ts +2 -0
  281. package/lib/types/conversion/markitdown.d.ts.map +1 -0
  282. package/lib/types/conversion/mutool.d.ts +19 -0
  283. package/lib/types/conversion/mutool.d.ts.map +1 -0
  284. package/lib/types/conversion/pandoc.d.ts +2 -0
  285. package/lib/types/conversion/pandoc.d.ts.map +1 -0
  286. package/lib/types/dsl/conditions.d.ts +2 -0
  287. package/lib/types/dsl/conditions.d.ts.map +1 -0
  288. package/lib/types/dsl/dsl-workflow.d.ts +5 -0
  289. package/lib/types/dsl/dsl-workflow.d.ts.map +1 -0
  290. package/lib/types/dsl/dslProxyActivities.d.ts +10 -0
  291. package/lib/types/dsl/dslProxyActivities.d.ts.map +1 -0
  292. package/lib/types/dsl/projections.d.ts +4 -0
  293. package/lib/types/dsl/projections.d.ts.map +1 -0
  294. package/lib/types/dsl/setup/ActivityContext.d.ts +17 -0
  295. package/lib/types/dsl/setup/ActivityContext.d.ts.map +1 -0
  296. package/lib/types/dsl/setup/fetch/DataProvider.d.ts +9 -0
  297. package/lib/types/dsl/setup/fetch/DataProvider.d.ts.map +1 -0
  298. package/lib/types/dsl/setup/fetch/index.d.ts +6 -0
  299. package/lib/types/dsl/setup/fetch/index.d.ts.map +1 -0
  300. package/lib/types/dsl/setup/fetch/providers.d.ts +25 -0
  301. package/lib/types/dsl/setup/fetch/providers.d.ts.map +1 -0
  302. package/lib/types/dsl/test/test-child-workflow.d.ts +4 -0
  303. package/lib/types/dsl/test/test-child-workflow.d.ts.map +1 -0
  304. package/lib/types/dsl/validation.d.ts +4 -0
  305. package/lib/types/dsl/validation.d.ts.map +1 -0
  306. package/lib/types/dsl/vars.d.ts +48 -0
  307. package/lib/types/dsl/vars.d.ts.map +1 -0
  308. package/lib/types/dsl/walk.d.ts +18 -0
  309. package/lib/types/dsl/walk.d.ts.map +1 -0
  310. package/lib/types/dsl.d.ts +4 -0
  311. package/lib/types/dsl.d.ts.map +1 -0
  312. package/lib/types/errors.d.ts +22 -0
  313. package/lib/types/errors.d.ts.map +1 -0
  314. package/lib/types/index.d.ts +31 -0
  315. package/lib/types/index.d.ts.map +1 -0
  316. package/lib/types/iterative-generation/activities/extractToc.d.ts +10 -0
  317. package/lib/types/iterative-generation/activities/extractToc.d.ts.map +1 -0
  318. package/lib/types/iterative-generation/activities/finalizeOutput.d.ts +3 -0
  319. package/lib/types/iterative-generation/activities/finalizeOutput.d.ts.map +1 -0
  320. package/lib/types/iterative-generation/activities/generatePart.d.ts +3 -0
  321. package/lib/types/iterative-generation/activities/generatePart.d.ts.map +1 -0
  322. package/lib/types/iterative-generation/activities/generateToc.d.ts +4 -0
  323. package/lib/types/iterative-generation/activities/generateToc.d.ts.map +1 -0
  324. package/lib/types/iterative-generation/activities/index.d.ts +5 -0
  325. package/lib/types/iterative-generation/activities/index.d.ts.map +1 -0
  326. package/lib/types/iterative-generation/iterativeGenerationWorkflow.d.ts +3 -0
  327. package/lib/types/iterative-generation/iterativeGenerationWorkflow.d.ts.map +1 -0
  328. package/lib/types/iterative-generation/types.d.ts +79 -0
  329. package/lib/types/iterative-generation/types.d.ts.map +1 -0
  330. package/lib/types/iterative-generation/utils.d.ts +27 -0
  331. package/lib/types/iterative-generation/utils.d.ts.map +1 -0
  332. package/lib/types/result-types.d.ts +22 -0
  333. package/lib/types/result-types.d.ts.map +1 -0
  334. package/lib/types/system/notifyWebhookWorkflow.d.ts +3 -0
  335. package/lib/types/system/notifyWebhookWorkflow.d.ts.map +1 -0
  336. package/lib/types/system/recalculateEmbeddingsWorkflow.d.ts +25 -0
  337. package/lib/types/system/recalculateEmbeddingsWorkflow.d.ts.map +1 -0
  338. package/lib/types/utils/auth.d.ts +4 -0
  339. package/lib/types/utils/auth.d.ts.map +1 -0
  340. package/lib/types/utils/blobs.d.ts +8 -0
  341. package/lib/types/utils/blobs.d.ts.map +1 -0
  342. package/lib/types/utils/chunks.d.ts +9 -0
  343. package/lib/types/utils/chunks.d.ts.map +1 -0
  344. package/lib/types/utils/client.d.ts +7 -0
  345. package/lib/types/utils/client.d.ts.map +1 -0
  346. package/lib/types/utils/expand-vars.d.ts +8 -0
  347. package/lib/types/utils/expand-vars.d.ts.map +1 -0
  348. package/lib/types/utils/memory.d.ts +8 -0
  349. package/lib/types/utils/memory.d.ts.map +1 -0
  350. package/lib/types/utils/tokens.d.ts +11 -0
  351. package/lib/types/utils/tokens.d.ts.map +1 -0
  352. package/lib/types/vars.d.ts +3 -0
  353. package/lib/types/vars.d.ts.map +1 -0
  354. package/lib/types/workflows.d.ts +8 -0
  355. package/lib/types/workflows.d.ts.map +1 -0
  356. package/lib/workflows-bundle.js +20991 -0
  357. package/package.json +3 -3
@@ -0,0 +1,55 @@
1
+ import { NodeStreamSource } from "@vertesia/client/node";
2
+ import { buildMemoryPack as _buildMemoryPack, loadMemoryPack as _loadMemoryPack } from "@vertesia/memory";
3
+ import { createReadStream, createWriteStream } from "fs";
4
+ import { rm } from "fs/promises";
5
+ import { webStreamToReadable } from "node-web-stream-adapters";
6
+ import { pipeline } from "stream/promises";
7
+ import tmp from "tmp";
8
+ import zlib from "zlib";
9
+ tmp.setGracefulCleanup();
10
+ export async function publishMemoryPack(client, file, name) {
11
+ const stream = createReadStream(file);
12
+ try {
13
+ const source = new NodeStreamSource(stream, name);
14
+ await client.files.uploadMemoryPack(source);
15
+ }
16
+ catch (err) {
17
+ stream.destroy();
18
+ throw err;
19
+ }
20
+ }
21
+ export async function buildMemoryPack(recipeFn) {
22
+ const tarFile = tmp.fileSync({
23
+ prefix: "composable-memory-pack-",
24
+ postfix: ".tar.gz",
25
+ });
26
+ return await _buildMemoryPack(recipeFn, {
27
+ out: tarFile.name,
28
+ gzip: true,
29
+ });
30
+ }
31
+ export async function buildAndPublishMemoryPack(client, name, recipeFn) {
32
+ const tarFile = await buildMemoryPack(recipeFn);
33
+ try {
34
+ await publishMemoryPack(client, tarFile, name);
35
+ }
36
+ finally {
37
+ await rm(tarFile);
38
+ }
39
+ }
40
+ export async function fetchMemoryPack(client, name) {
41
+ const webStream = await client.files.downloadMemoryPack(name);
42
+ const tarFile = tmp.fileSync({
43
+ prefix: "composable-memory-pack-",
44
+ postfix: ".tar",
45
+ discardDescriptor: true,
46
+ });
47
+ const streamIn = webStreamToReadable(webStream);
48
+ const streamOut = createWriteStream(tarFile.name);
49
+ await pipeline(streamIn, zlib.createGunzip(), streamOut);
50
+ return tarFile.name;
51
+ }
52
+ export function loadMemoryPack(client, name) {
53
+ return fetchMemoryPack(client, name).then(file => _loadMemoryPack(file));
54
+ }
55
+ //# sourceMappingURL=memory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/utils/memory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAwB,eAAe,IAAI,gBAAgB,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChI,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AACzD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,GAAG,CAAC,kBAAkB,EAAE,CAAC;AAGzB,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAsB,EAAE,IAAY,EAAE,IAAY;IACtF,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAClD,MAAM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAChB,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,GAAG,CAAC;IACd,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,QAA8D;IAChG,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC;QACzB,MAAM,EAAE,yBAAyB;QACjC,OAAO,EAAE,SAAS;KACrB,CAAC,CAAC;IACH,OAAO,MAAM,gBAAgB,CAAC,QAAQ,EAAE;QACpC,GAAG,EAAE,OAAO,CAAC,IAAI;QACjB,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,MAAsB,EAAE,IAAY,EAAE,QAA8D;IAChJ,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,CAAC;QACD,MAAM,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;YAAS,CAAC;QACP,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAsB,EAAE,IAAY;IACtE,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,CAAC;QACzB,MAAM,EAAE,yBAAyB;QACjC,OAAO,EAAE,MAAM;QACf,iBAAiB,EAAE,IAAI;KAC1B,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,SAAS,CAAC,CAAC;IACzD,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAsB,EAAE,IAAY;IAC/D,OAAO,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { get_encoding } from "tiktoken";
2
+ export function truncByMaxTokens(content, by) {
3
+ let encoding;
4
+ let maxTokens;
5
+ if (typeof by === 'number') {
6
+ maxTokens = by;
7
+ encoding = "cl100k_base";
8
+ }
9
+ else {
10
+ maxTokens = by.max_tokens;
11
+ encoding = by.encoding || "cl100k_base";
12
+ }
13
+ const enc = get_encoding(encoding);
14
+ let tokens = enc.encode(content);
15
+ if (tokens.length > maxTokens) {
16
+ tokens = tokens.slice(0, maxTokens);
17
+ return new TextDecoder().decode(enc.decode(tokens));
18
+ }
19
+ else {
20
+ return content;
21
+ }
22
+ }
23
+ export function countTokens(text, encoding = 'cl100k_base') {
24
+ const encoder = get_encoding(encoding);
25
+ if (!encoder) {
26
+ throw new Error(`Unknown encoding ${encoding}`);
27
+ }
28
+ const tokens = encoder.encode(text);
29
+ return {
30
+ count: tokens.length,
31
+ encoding: encoding,
32
+ };
33
+ }
34
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/utils/tokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,YAAY,EAAE,MAAM,UAAU,CAAC;AAQ1D,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,EAAgB;IAC9D,IAAI,QAA0B,CAAC;IAC/B,IAAI,SAAiB,CAAC;IACtB,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;QACzB,SAAS,GAAG,EAAE,CAAC;QACf,QAAQ,GAAG,aAAa,CAAC;IAC7B,CAAC;SAAM,CAAC;QACJ,SAAS,GAAG,EAAE,CAAC,UAAU,CAAC;QAC1B,QAAQ,GAAG,EAAE,CAAC,QAAQ,IAAI,aAAa,CAAC;IAC5C,CAAC;IACD,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;QAC5B,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QACpC,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC;SAAM,CAAC;QACJ,OAAO,OAAO,CAAC;IACnB,CAAC;AACL,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,WAA6B,aAAa;IAEhF,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAEpC,OAAO;QACH,KAAK,EAAE,MAAM,CAAC,MAAM;QACpB,QAAQ,EAAE,QAAQ;KACrB,CAAC;AAEN,CAAC"}
@@ -0,0 +1,4 @@
1
+ // exported as a named export /vars
2
+ export * from "./dsl/validation.js";
3
+ export * from "./dsl/vars.js";
4
+ //# sourceMappingURL=vars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../src/vars.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Export workflows to be registered on temporal workers
3
+ */
4
+ export { dslWorkflow } from "./dsl/dsl-workflow.js";
5
+ export { iterativeGenerationWorkflow } from "./iterative-generation/iterativeGenerationWorkflow.js";
6
+ export { notifyWebhookWorkflow } from "./system/notifyWebhookWorkflow.js";
7
+ export { recalculateEmbeddingsWorkflow } from "./system/recalculateEmbeddingsWorkflow.js";
8
+ //# sourceMappingURL=workflows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/workflows.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec, ExecutionRun } from "@vertesia/common";
2
+ export interface CreateDocumentTypeFromInteractionRunParams {
3
+ /**
4
+ * The execution run object to use. Required.
5
+ * Not required in params since it is usually fetched
6
+ */
7
+ run: ExecutionRun;
8
+ /**
9
+ * If defined then update the object type with the created type
10
+ */
11
+ updateObjectId?: string;
12
+ }
13
+ export interface CreateDocumentTypeFromInteractionRun extends DSLActivitySpec<CreateDocumentTypeFromInteractionRunParams> {
14
+ name: 'createDocumentTypeFromInteractionRun';
15
+ }
16
+ export declare function createDocumentTypeFromInteractionRun(payload: DSLActivityExecutionPayload<CreateDocumentTypeFromInteractionRunParams>): Promise<any>;
17
+ //# sourceMappingURL=createDocumentTypeFromInteractionRun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDocumentTypeFromInteractionRun.d.ts","sourceRoot":"","sources":["../../../../src/activities/advanced/createDocumentTypeFromInteractionRun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,2BAA2B,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAO9H,MAAM,WAAW,0CAA0C;IACvD;;;OAGG;IACH,GAAG,EAAE,YAAY,CAAC;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,oCAAqC,SAAQ,eAAe,CAAC,0CAA0C,CAAC;IACrH,IAAI,EAAE,sCAAsC,CAAC;CAChD;AAED,wBAAsB,oCAAoC,CAAC,OAAO,EAAE,2BAA2B,CAAC,0CAA0C,CAAC,gBA8B1I"}
@@ -0,0 +1,39 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ interface CreateOrUpdateObjectFromInteractionRunParams {
3
+ /**
4
+ * The execution run object to use. Required.
5
+ * Not required in params since it is usually fetched
6
+ */
7
+ run_id?: string;
8
+ /**
9
+ * The document type to use. Required if update_existing_id is false.
10
+ * Not required in params since it is usually fetched
11
+ */
12
+ object_type?: string;
13
+ /**
14
+ * The id of the document to update. If not provided, a new document will be created
15
+ */
16
+ update_existing_id?: string;
17
+ /**
18
+ * The name of the object to use. If not provided, the name will be generated from the interaction result
19
+ */
20
+ fallback_name?: string;
21
+ /**
22
+ * The name of the parent object to use. If not provided, the document will be created at the root level
23
+ */
24
+ parent?: string;
25
+ /**
26
+ * The name of the property to use for the text. If not provided, the text will be set to the result of the interaction
27
+ */
28
+ update_text_from_property?: string;
29
+ }
30
+ export interface CreateOrUpdateObjectFromInteractionRun extends DSLActivitySpec<CreateOrUpdateObjectFromInteractionRunParams> {
31
+ name: 'createOrUpdateDocumentFromInteractionRun';
32
+ }
33
+ export declare function createOrUpdateDocumentFromInteractionRun(payload: DSLActivityExecutionPayload<CreateOrUpdateObjectFromInteractionRunParams>): Promise<{
34
+ id: string;
35
+ isNew: boolean;
36
+ type: string;
37
+ }>;
38
+ export {};
39
+ //# sourceMappingURL=createOrUpdateDocumentFromInteractionRun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createOrUpdateDocumentFromInteractionRun.d.ts","sourceRoot":"","sources":["../../../../src/activities/advanced/createOrUpdateDocumentFromInteractionRun.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,2BAA2B,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGrG,UAAU,4CAA4C;IAClD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;CAEtC;AAED,MAAM,WAAW,sCAAuC,SAAQ,eAAe,CAAC,4CAA4C,CAAC;IACzH,IAAI,EAAE,0CAA0C,CAAC;CACpD;AAED,wBAAsB,wCAAwC,CAAC,OAAO,EAAE,2BAA2B,CAAC,4CAA4C,CAAC;;;;GAyEhJ"}
@@ -0,0 +1,19 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec, ExecutionRun } from "@vertesia/common";
2
+ export interface UpdateDocumentFromInteractionRunParams {
3
+ /**
4
+ * The execution run object to use. Required.
5
+ * Not required in params since it is usually fetched
6
+ */
7
+ run?: ExecutionRun;
8
+ }
9
+ export interface UpdateDocumentFromInteractionRun extends DSLActivitySpec<UpdateDocumentFromInteractionRunParams> {
10
+ name: 'updateDocumentFromInteractionRun';
11
+ }
12
+ export declare function updateDocumentFromInteractionRun(payload: DSLActivityExecutionPayload<UpdateDocumentFromInteractionRunParams>): Promise<{
13
+ status: string;
14
+ error: string;
15
+ } | {
16
+ status: string;
17
+ error?: undefined;
18
+ }>;
19
+ //# sourceMappingURL=updateDocumentFromInteractionRun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateDocumentFromInteractionRun.d.ts","sourceRoot":"","sources":["../../../../src/activities/advanced/updateDocumentFromInteractionRun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAK9F,MAAM,WAAW,sCAAsC;IACnD;;;OAGG;IACH,GAAG,CAAC,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,gCAAiC,SAAQ,eAAe,CAAC,sCAAsC,CAAC;IAC7G,IAAI,EAAE,kCAAkC,CAAC;CAC5C;AAED,wBAAsB,gCAAgC,CAAC,OAAO,EAAE,2BAA2B,CAAC,sCAAsC,CAAC;;;;;;GAgBlI"}
@@ -0,0 +1,33 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ import { InteractionExecutionParams } from "./executeInteraction.js";
3
+ export interface ChunkDocumentResult {
4
+ id: string;
5
+ status: "completed" | "failed" | "skipped";
6
+ parts?: string[];
7
+ message?: string;
8
+ }
9
+ export interface ChunkDocumentParams extends InteractionExecutionParams {
10
+ /**
11
+ * If true, force chunking even if the document is already chunked
12
+ */
13
+ force?: boolean;
14
+ /**
15
+ * The interaction name to use for chunking
16
+ * If not set, the default interaction will be used
17
+ */
18
+ interactionName?: string;
19
+ /**
20
+ * The object type to use for the document parts
21
+ * If not set, the type of the document will be used
22
+ */
23
+ docPartType?: string;
24
+ /**
25
+ * If true, create parts as document objects
26
+ */
27
+ createParts?: boolean;
28
+ }
29
+ export interface ChunkDocument extends DSLActivitySpec<ChunkDocumentParams> {
30
+ name: 'chunkDocument';
31
+ }
32
+ export declare function chunkDocument(payload: DSLActivityExecutionPayload<ChunkDocumentParams>): Promise<ChunkDocumentResult>;
33
+ //# sourceMappingURL=chunkDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunkDocument.d.ts","sourceRoot":"","sources":["../../../src/activities/chunkDocument.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGhF,OAAO,EAAE,0BAA0B,EAAkC,MAAM,yBAAyB,CAAC;AAMrG,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAA;IAC1C,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IAEnE;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,aAAc,SAAQ,eAAe,CAAC,mBAAmB,CAAC;IACvE,IAAI,EAAE,eAAe,CAAC;CACzB;AAGD,wBAAsB,aAAa,CAAC,OAAO,EAAE,2BAA2B,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAgG3H"}
@@ -0,0 +1,21 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ interface CreatePdfDocumentFromSourceParams {
3
+ target_object_type: string;
4
+ title: string;
5
+ filename?: string;
6
+ pages: number[];
7
+ parent?: string;
8
+ }
9
+ export interface CreatePdfDocumentFromSource extends DSLActivitySpec<CreatePdfDocumentFromSourceParams> {
10
+ name: 'createPdfDocumentFromSource';
11
+ }
12
+ /**
13
+ * Create a new PDF by extracting pages from a source PDF
14
+ * @returns
15
+ */
16
+ export declare function createPdfDocumentFromSource(payload: DSLActivityExecutionPayload<CreatePdfDocumentFromSourceParams>): Promise<{
17
+ newObjectId: string;
18
+ uploadedFile: string;
19
+ }>;
20
+ export {};
21
+ //# sourceMappingURL=createDocumentFromOther.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDocumentFromOther.d.ts","sourceRoot":"","sources":["../../../src/activities/createDocumentFromOther.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAOhF,UAAU,iCAAiC;IAEvC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CAEnB;AAGD,MAAM,WAAW,2BAA4B,SAAQ,eAAe,CAAC,iCAAiC,CAAC;IACnG,IAAI,EAAE,6BAA6B,CAAC;CACvC;AAGD;;;GAGG;AACH,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,2BAA2B,CAAC,iCAAiC,CAAC;;;GA8DxH"}
@@ -0,0 +1,55 @@
1
+ import { ModelOptions } from "@llumiverse/core";
2
+ import { VertesiaClient } from "@vertesia/client";
3
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
4
+ import { TruncateSpec } from "../utils/tokens.js";
5
+ export interface InteractionExecutionParams {
6
+ /**
7
+ * The environment to use. If not specified the project default environment will be used.
8
+ * If the latter is not specified an exception will be thrown.
9
+ */
10
+ environment?: string;
11
+ /**
12
+ * The model to use. If not specified the project default model will be used.
13
+ * If the latter is not specified the default model of the environment will be used.
14
+ * If the latter is not specified an exception will be thrown.
15
+ */
16
+ model?: string;
17
+ /**
18
+ * Force a JSON schema for the result
19
+ */
20
+ result_schema?: any;
21
+ /**
22
+ * Tags to add to the execution run
23
+ */
24
+ tags?: string[];
25
+ /**
26
+ * Wether or not to include the previous error in the interaction prompt data
27
+ */
28
+ include_previous_error?: boolean;
29
+ /**
30
+ * Options to control generation
31
+ */
32
+ model_options?: ModelOptions;
33
+ }
34
+ /**
35
+ * TODO: must be kept in sync with InteractionAsyncExecutionPayload form @vertesia/common
36
+ * Also see the executeInteractionAsync endpoint on the server for how the client payload is sent to the workflow.
37
+ * (interaction is translated to interactionName)
38
+ */
39
+ export interface ExecuteInteractionParams extends InteractionExecutionParams {
40
+ interactionName: string;
41
+ prompt_data: Record<string, any>;
42
+ /**
43
+ * Additional prompt data passed by the workflow configuration. This will be merged with prompt_data if any.
44
+ * You should use `import: ["static_prompt_data"]` to import the workflow prompt data as static_prompt_data param.
45
+ * Otherwise the workflow prompt data will be ignored.
46
+ */
47
+ static_prompt_data?: Record<string, any>;
48
+ truncate?: Record<string, TruncateSpec>;
49
+ }
50
+ export interface ExecuteInteraction extends DSLActivitySpec<ExecuteInteractionParams> {
51
+ name: "executeInteraction";
52
+ }
53
+ export declare function executeInteraction(payload: DSLActivityExecutionPayload<ExecuteInteractionParams>): Promise<any>;
54
+ export declare function executeInteractionFromActivity(client: VertesiaClient, interactionName: string, params: InteractionExecutionParams, prompt_data: any, debug?: boolean): Promise<import("@vertesia/common").InteractionExecutionResult<any, any>>;
55
+ //# sourceMappingURL=executeInteraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeInteraction.d.ts","sourceRoot":"","sources":["../../../src/activities/executeInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACH,2BAA2B,EAC3B,eAAe,EAKlB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAoB,MAAM,oBAAoB,CAAC;AAgDpE,MAAM,WAAW,0BAA0B;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,GAAG,CAAC;IAEpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAyB,SAAQ,0BAA0B;IAExE,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,wBAAwB,CAAC;IACjF,IAAI,EAAE,oBAAoB,CAAC;CAC9B;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,2BAA2B,CAAC,wBAAwB,CAAC,gBA0CtG;AAED,wBAAsB,8BAA8B,CAChD,MAAM,EAAE,cAAc,EACtB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,0BAA0B,EAClC,WAAW,EAAE,GAAG,EAChB,KAAK,CAAC,EAAE,OAAO,4EAuElB"}
@@ -0,0 +1,10 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ import { TextExtractionResult } from "../result-types.js";
3
+ export interface ExtractDocumentTextParams {
4
+ }
5
+ export interface ExtractDocumentText extends DSLActivitySpec<ExtractDocumentTextParams> {
6
+ name: "extractDocumentText";
7
+ projection?: never;
8
+ }
9
+ export declare function extractDocumentText(payload: DSLActivityExecutionPayload<ExtractDocumentTextParams>): Promise<TextExtractionResult>;
10
+ //# sourceMappingURL=extractDocumentText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractDocumentText.d.ts","sourceRoot":"","sources":["../../../src/activities/extractDocumentText.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,2BAA2B,EAC3B,eAAe,EAClB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAAE,oBAAoB,EAAwB,MAAM,oBAAoB,CAAC;AAWhF,MAAM,WAAW,yBAAyB;CAAG;AAC7C,MAAM,WAAW,mBAAoB,SAAQ,eAAe,CAAC,yBAAyB,CAAC;IACnF,IAAI,EAAE,qBAAqB,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC;CACtB;AAED,wBAAsB,mBAAmB,CACrC,OAAO,EAAE,2BAA2B,CAAC,yBAAyB,CAAC,GAChE,OAAO,CAAC,oBAAoB,CAAC,CA8H/B"}
@@ -0,0 +1,32 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ import { TruncateSpec } from "../utils/tokens.js";
3
+ import { InteractionExecutionParams } from "./executeInteraction.js";
4
+ export interface GenerateDocumentPropertiesParams extends InteractionExecutionParams {
5
+ typesHint?: string[];
6
+ /**
7
+ * truncate the input doc text to the specified max_tokens
8
+ */
9
+ truncate?: TruncateSpec;
10
+ interactionName?: string;
11
+ use_vision?: boolean;
12
+ }
13
+ export interface GenerateDocumentProperties extends DSLActivitySpec<GenerateDocumentPropertiesParams> {
14
+ name: "generateDocumentProperties";
15
+ }
16
+ export declare function generateDocumentProperties(payload: DSLActivityExecutionPayload<GenerateDocumentPropertiesParams>): Promise<{
17
+ status: string;
18
+ error: string;
19
+ document?: undefined;
20
+ message?: undefined;
21
+ } | {
22
+ document: string;
23
+ status: string;
24
+ message: string;
25
+ error?: undefined;
26
+ } | {
27
+ status: string;
28
+ error?: undefined;
29
+ document?: undefined;
30
+ message?: undefined;
31
+ }>;
32
+ //# sourceMappingURL=generateDocumentProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateDocumentProperties.d.ts","sourceRoot":"","sources":["../../../src/activities/generateDocumentProperties.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAkC,MAAM,yBAAyB,CAAC;AAGrG,MAAM,WAAW,gCAAiC,SAAQ,0BAA0B;IAChF,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AACD,MAAM,WAAW,0BAA2B,SAAQ,eAAe,CAAC,gCAAgC,CAAC;IACjG,IAAI,EAAE,4BAA4B,CAAC;CACtC;AAED,wBAAsB,0BAA0B,CAC5C,OAAO,EAAE,2BAA2B,CAAC,gCAAgC,CAAC;;;;;;;;;;;;;;;GA0FzE"}
@@ -0,0 +1,53 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec, SupportedEmbeddingTypes } from "@vertesia/common";
2
+ import { DocPart } from "../utils/chunks.js";
3
+ export interface GenerateEmbeddingsParams {
4
+ /**
5
+ * The model to use for embedding generation
6
+ * If not set, the default model for the project will be used
7
+ */
8
+ model?: string;
9
+ /**
10
+ * The environment to use for embedding generation
11
+ * If not set, the default environment for the project will be used
12
+ */
13
+ environment?: string;
14
+ /**
15
+ * If true, force embedding generation even if the document already has embeddings
16
+ */
17
+ force?: boolean;
18
+ /**
19
+ * The embedding type to generate
20
+ */
21
+ type: SupportedEmbeddingTypes;
22
+ /**
23
+ * The DocParts to use for long documents
24
+ */
25
+ parts?: DocPart[];
26
+ }
27
+ export interface GenerateEmbeddings extends DSLActivitySpec<GenerateEmbeddingsParams> {
28
+ name: 'generateEmbeddings';
29
+ }
30
+ export declare function generateEmbeddings(payload: DSLActivityExecutionPayload<GenerateEmbeddingsParams>): Promise<{
31
+ status: string;
32
+ message: string;
33
+ id?: undefined;
34
+ type?: undefined;
35
+ len?: undefined;
36
+ } | {
37
+ id: string;
38
+ type: SupportedEmbeddingTypes;
39
+ status: string;
40
+ message: string;
41
+ len?: undefined;
42
+ } | {
43
+ id: string;
44
+ type: SupportedEmbeddingTypes;
45
+ status: string;
46
+ len: number;
47
+ message?: undefined;
48
+ } | {
49
+ id: string;
50
+ status: string;
51
+ message: string;
52
+ } | undefined>;
53
+ //# sourceMappingURL=generateEmbeddings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateEmbeddings.d.ts","sourceRoot":"","sources":["../../../src/activities/generateEmbeddings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,2BAA2B,EAAE,eAAe,EAAkC,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAIxJ,OAAO,EAAE,OAAO,EAAmB,MAAM,oBAAoB,CAAC;AAI9D,MAAM,WAAW,wBAAwB;IAErC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,uBAAuB,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,wBAAwB,CAAC;IACjF,IAAI,EAAE,oBAAoB,CAAC;CAC9B;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,2BAA2B,CAAC,wBAAwB,CAAC;;;;;;;;;;;;;;;;;;;;;;eAuEtG"}
@@ -0,0 +1,15 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ interface GenerateImageRenditionParams {
3
+ max_hw: number;
4
+ format: string;
5
+ }
6
+ export interface GenerateImageRendition extends DSLActivitySpec<GenerateImageRenditionParams> {
7
+ name: "generateImageRendition";
8
+ }
9
+ export declare function generateImageRendition(payload: DSLActivityExecutionPayload<GenerateImageRenditionParams>): Promise<{
10
+ id: string;
11
+ format: any;
12
+ status: string;
13
+ }>;
14
+ export {};
15
+ //# sourceMappingURL=generateImageRendition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateImageRendition.d.ts","sourceRoot":"","sources":["../../../src/activities/generateImageRendition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAuB,MAAM,kBAAkB,CAAC;AAUrG,UAAU,4BAA4B;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAuB,SAAQ,eAAe,CAAC,4BAA4B,CAAC;IACzF,IAAI,EAAE,wBAAwB,CAAC;CAClC;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,2BAA2B,CAAC,4BAA4B,CAAC;;;;GAoL9G"}
@@ -0,0 +1,44 @@
1
+ import { DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ import { TruncateSpec } from "../utils/tokens.js";
3
+ import { InteractionExecutionParams } from "./executeInteraction.js";
4
+ export interface GenerateOrAssignContentTypeParams extends InteractionExecutionParams {
5
+ typesHint?: string[];
6
+ /**
7
+ * truncate the input doc text to the specified max_tokens
8
+ */
9
+ truncate?: TruncateSpec;
10
+ /**
11
+ * The name of the interaction to execute
12
+ * @default SelectDocumentType
13
+ */
14
+ interactionNames?: {
15
+ selectDocumentType?: string;
16
+ generateMetadataModel?: string;
17
+ };
18
+ }
19
+ export interface GenerateOrAssignContentType extends DSLActivitySpec<GenerateOrAssignContentTypeParams> {
20
+ name: "generateOrAssignContentType";
21
+ }
22
+ export declare function generateOrAssignContentType(payload: DSLActivityExecutionPayload<GenerateOrAssignContentTypeParams>): Promise<{
23
+ status: string;
24
+ message: string;
25
+ error?: undefined;
26
+ id?: undefined;
27
+ name?: undefined;
28
+ isNew?: undefined;
29
+ } | {
30
+ status: string;
31
+ error: string;
32
+ message?: undefined;
33
+ id?: undefined;
34
+ name?: undefined;
35
+ isNew?: undefined;
36
+ } | {
37
+ id: string;
38
+ name: string;
39
+ isNew: boolean;
40
+ status?: undefined;
41
+ message?: undefined;
42
+ error?: undefined;
43
+ }>;
44
+ //# sourceMappingURL=generateOrAssignContentType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateOrAssignContentType.d.ts","sourceRoot":"","sources":["../../../src/activities/generateOrAssignContentType.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,2BAA2B,EAC3B,eAAe,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAoB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAkC,MAAM,yBAAyB,CAAC;AAKrG,MAAM,WAAW,iCAAkC,SAAQ,0BAA0B;IACjF,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;;OAGG;IACH,gBAAgB,CAAC,EAAE;QACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAClC,CAAC;CACL;AAED,MAAM,WAAW,2BAA4B,SAAQ,eAAe,CAAC,iCAAiC,CAAC;IACnG,IAAI,EAAE,6BAA6B,CAAC;CACvC;AAED,wBAAsB,2BAA2B,CAC7C,OAAO,EAAE,2BAA2B,CAAC,iCAAiC,CAAC;;;;;;;;;;;;;;;;;;;;;GAmG1E"}
@@ -0,0 +1,14 @@
1
+ import { ContentObject, DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
2
+ export interface GetObjectParams {
3
+ select?: string;
4
+ }
5
+ export interface GetObject extends DSLActivitySpec<GetObjectParams> {
6
+ name: 'getObject';
7
+ }
8
+ /**
9
+ * We are using a union type for the status parameter since typescript enums breaks the workflow code generation
10
+ * @param objectId
11
+ * @param status
12
+ */
13
+ export declare function getObjectFromStore(payload: DSLActivityExecutionPayload<GetObjectParams>): Promise<ContentObject>;
14
+ //# sourceMappingURL=getObjectFromStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getObjectFromStore.d.ts","sourceRoot":"","sources":["../../../src/activities/getObjectFromStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAK/F,MAAM,WAAW,eAAe;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAU,SAAQ,eAAe,CAAC,eAAe,CAAC;IAC/D,IAAI,EAAE,WAAW,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,2BAA2B,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAYtH"}
@@ -0,0 +1,6 @@
1
+ import { DSLActivityExecutionPayload } from "@vertesia/common";
2
+ export interface HandleDslErrorParams {
3
+ errorMessage: string;
4
+ }
5
+ export declare function handleDslError(payload: DSLActivityExecutionPayload<HandleDslErrorParams>): Promise<void>;
6
+ //# sourceMappingURL=handleError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleError.d.ts","sourceRoot":"","sources":["../../../src/activities/handleError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAIpF,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,2BAA2B,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB9G"}
@@ -0,0 +1,18 @@
1
+ export { createDocumentTypeFromInteractionRun } from "./advanced/createDocumentTypeFromInteractionRun.js";
2
+ export { createOrUpdateDocumentFromInteractionRun } from "./advanced/createOrUpdateDocumentFromInteractionRun.js";
3
+ export { updateDocumentFromInteractionRun } from "./advanced/updateDocumentFromInteractionRun.js";
4
+ export { chunkDocument } from "./chunkDocument.js";
5
+ export { createPdfDocumentFromSource } from "./createDocumentFromOther.js";
6
+ export { executeInteraction } from "./executeInteraction.js";
7
+ export { extractDocumentText } from "./extractDocumentText.js";
8
+ export { generateDocumentProperties } from "./generateDocumentProperties.js";
9
+ export { generateEmbeddings } from "./generateEmbeddings.js";
10
+ export { generateImageRendition } from "./generateImageRendition.js";
11
+ export { generateOrAssignContentType } from "./generateOrAssignContentType.js";
12
+ export { getObjectFromStore } from "./getObjectFromStore.js";
13
+ export { handleDslError } from "./handleError.js";
14
+ export { convertPdfToStructuredText } from "./media/processPdfWithTextract.js";
15
+ export { transcribeMedia } from "./media/transcribeMediaWithGladia.js";
16
+ export { notifyWebhook } from "./notifyWebhook.js";
17
+ export { setDocumentStatus } from "./setDocumentStatus.js";
18
+ //# sourceMappingURL=index-dsl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-dsl.d.ts","sourceRoot":"","sources":["../../../src/activities/index-dsl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oCAAoC,EAAE,MAAM,oDAAoD,CAAC;AAC1G,OAAO,EAAE,wCAAwC,EAAE,MAAM,wDAAwD,CAAC;AAClH,OAAO,EAAE,gCAAgC,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Here we export all activities to be registered with the temporal worker
3
+ */
4
+ export * from "./index-dsl.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/activities/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Use textract to convert a pdf into a data structure of the following format:
3
+ * <document>
4
+ * <page number="n">
5
+ * <text/>
6
+ * <table/>
7
+ * <text/>
8
+ * <figure/>
9
+ * ...
10
+ * </page>
11
+ */
12
+ import { AwsConfiguration, DSLActivityExecutionPayload, DSLActivitySpec } from "@vertesia/common";
13
+ import type { AwsCredentialIdentityProvider } from "@smithy/types";
14
+ import { TextExtractionResult } from "../../result-types.js";
15
+ export interface ConvertPdfToStructuredTextParams {
16
+ force?: boolean;
17
+ }
18
+ export interface ConvertPdfToStructuredText extends DSLActivitySpec<ConvertPdfToStructuredTextParams> {
19
+ name: 'ConvertPdfToStructuredText';
20
+ }
21
+ export interface StructuredTextResult extends TextExtractionResult {
22
+ message?: string;
23
+ }
24
+ export declare function convertPdfToStructuredText(payload: DSLActivityExecutionPayload<ConvertPdfToStructuredTextParams>): Promise<StructuredTextResult>;
25
+ export declare function getS3AWSCredentials(awsConfig: AwsConfiguration, composableAuthToken: string, projectId: string): Promise<AwsCredentialIdentityProvider>;
26
+ //# sourceMappingURL=processPdfWithTextract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processPdfWithTextract.d.ts","sourceRoot":"","sources":["../../../../src/activities/media/processPdfWithTextract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAA8B,2BAA2B,EAAE,eAAe,EAAyB,MAAM,kBAAkB,CAAC;AACrJ,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAKnE,OAAO,EAAE,oBAAoB,EAAwB,MAAM,uBAAuB,CAAC;AAMnF,MAAM,WAAW,gCAAgC;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,0BAA2B,SAAQ,eAAe,CAAC,gCAAgC,CAAC;IACjG,IAAI,EAAE,4BAA4B,CAAC;CACtC;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,CAAC,gCAAgC,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgFtJ;AAED,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAmB7J"}