@epilot/sdk 2.1.0-rc.0 → 2.1.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/definitions/app.json +38 -0
  2. package/definitions/automation.json +2 -37
  3. package/definitions/blueprint-manifest-runtime.json +1 -1
  4. package/definitions/blueprint-manifest.json +115 -1
  5. package/definitions/customer-portal-runtime.json +1 -1
  6. package/definitions/customer-portal.json +279 -42
  7. package/definitions/data-management.json +10 -0
  8. package/definitions/email-template.json +25 -3
  9. package/definitions/entity.json +205 -3
  10. package/definitions/erp-integration-runtime.json +1 -1
  11. package/definitions/erp-integration.json +472 -13
  12. package/definitions/journey.json +257 -12
  13. package/definitions/kanban.json +630 -78
  14. package/definitions/organization-runtime.json +1 -1
  15. package/definitions/organization.json +614 -51
  16. package/definitions/workflow.json +40 -0
  17. package/dist/README-VG67PX4R.js +7 -0
  18. package/dist/README-W4B35MRN.cjs +7 -0
  19. package/dist/_index-AMVZBT2K.cjs +99 -0
  20. package/dist/_index-S6LFD3ER.js +99 -0
  21. package/dist/access-token-6BJDZSFE.cjs +7 -0
  22. package/dist/access-token-GSQZLDXR.js +7 -0
  23. package/dist/address-HA4RMRNQ.cjs +7 -0
  24. package/dist/address-QVJUGMOG.js +7 -0
  25. package/dist/address-suggestions-74244BAJ.js +7 -0
  26. package/dist/address-suggestions-IUQMYF27.cjs +7 -0
  27. package/dist/ai-agents-IZWFEUSH.js +7 -0
  28. package/dist/ai-agents-PWHKNRCX.cjs +7 -0
  29. package/dist/apis/access-token.cjs +10 -13
  30. package/dist/apis/access-token.js +7 -10
  31. package/dist/apis/address-suggestions.cjs +10 -13
  32. package/dist/apis/address-suggestions.js +7 -10
  33. package/dist/apis/address.cjs +10 -13
  34. package/dist/apis/address.js +7 -10
  35. package/dist/apis/ai-agents.cjs +10 -13
  36. package/dist/apis/ai-agents.js +7 -10
  37. package/dist/apis/app.cjs +10 -13
  38. package/dist/apis/app.js +7 -10
  39. package/dist/apis/audit-logs.cjs +10 -13
  40. package/dist/apis/audit-logs.js +7 -10
  41. package/dist/apis/automation.cjs +10 -13
  42. package/dist/apis/automation.js +7 -10
  43. package/dist/apis/billing.cjs +10 -13
  44. package/dist/apis/billing.js +7 -10
  45. package/dist/apis/blueprint-manifest.cjs +10 -13
  46. package/dist/apis/blueprint-manifest.js +7 -10
  47. package/dist/apis/consent.cjs +10 -13
  48. package/dist/apis/consent.js +7 -10
  49. package/dist/apis/customer-portal.cjs +10 -13
  50. package/dist/apis/customer-portal.js +7 -10
  51. package/dist/apis/dashboard.cjs +10 -13
  52. package/dist/apis/dashboard.js +7 -10
  53. package/dist/apis/data-management.cjs +10 -13
  54. package/dist/apis/data-management.js +7 -10
  55. package/dist/apis/deduplication.cjs +10 -13
  56. package/dist/apis/deduplication.js +7 -10
  57. package/dist/apis/design.cjs +10 -13
  58. package/dist/apis/design.js +7 -10
  59. package/dist/apis/document.cjs +10 -13
  60. package/dist/apis/document.js +7 -10
  61. package/dist/apis/email-settings.cjs +10 -13
  62. package/dist/apis/email-settings.js +7 -10
  63. package/dist/apis/email-template.cjs +10 -13
  64. package/dist/apis/email-template.js +7 -10
  65. package/dist/apis/entity-mapping.cjs +10 -13
  66. package/dist/apis/entity-mapping.js +7 -10
  67. package/dist/apis/entity.cjs +10 -13
  68. package/dist/apis/entity.js +7 -10
  69. package/dist/apis/environments.cjs +10 -13
  70. package/dist/apis/environments.js +7 -10
  71. package/dist/apis/erp-integration.cjs +10 -13
  72. package/dist/apis/erp-integration.js +7 -10
  73. package/dist/apis/event-catalog.cjs +10 -13
  74. package/dist/apis/event-catalog.js +7 -10
  75. package/dist/apis/file.cjs +10 -13
  76. package/dist/apis/file.js +7 -10
  77. package/dist/apis/iban.cjs +10 -13
  78. package/dist/apis/iban.js +7 -10
  79. package/dist/apis/journey.cjs +10 -13
  80. package/dist/apis/journey.js +7 -10
  81. package/dist/apis/kanban.cjs +10 -13
  82. package/dist/apis/kanban.js +7 -10
  83. package/dist/apis/message.cjs +10 -13
  84. package/dist/apis/message.js +7 -10
  85. package/dist/apis/metering.cjs +10 -13
  86. package/dist/apis/metering.js +7 -10
  87. package/dist/apis/notes.cjs +10 -13
  88. package/dist/apis/notes.js +7 -10
  89. package/dist/apis/notification.cjs +10 -13
  90. package/dist/apis/notification.js +7 -10
  91. package/dist/apis/organization.cjs +10 -13
  92. package/dist/apis/organization.d.cts +2 -2
  93. package/dist/apis/organization.d.ts +2 -2
  94. package/dist/apis/organization.js +7 -10
  95. package/dist/apis/partner-directory.cjs +10 -13
  96. package/dist/apis/partner-directory.js +7 -10
  97. package/dist/apis/permissions.cjs +10 -13
  98. package/dist/apis/permissions.js +7 -10
  99. package/dist/apis/pricing-tier.cjs +10 -13
  100. package/dist/apis/pricing-tier.js +7 -10
  101. package/dist/apis/pricing.cjs +10 -13
  102. package/dist/apis/pricing.js +7 -10
  103. package/dist/apis/purpose.cjs +10 -13
  104. package/dist/apis/purpose.js +7 -10
  105. package/dist/apis/sandbox.cjs +10 -13
  106. package/dist/apis/sandbox.js +7 -10
  107. package/dist/apis/submission.cjs +10 -13
  108. package/dist/apis/submission.js +7 -10
  109. package/dist/apis/targeting.cjs +10 -13
  110. package/dist/apis/targeting.js +7 -10
  111. package/dist/apis/template-variables.cjs +10 -13
  112. package/dist/apis/template-variables.js +7 -10
  113. package/dist/apis/user.cjs +10 -13
  114. package/dist/apis/user.js +7 -10
  115. package/dist/apis/validation-rules.cjs +10 -13
  116. package/dist/apis/validation-rules.js +7 -10
  117. package/dist/apis/webhooks.cjs +10 -13
  118. package/dist/apis/webhooks.js +7 -10
  119. package/dist/apis/workflow-definition.cjs +10 -13
  120. package/dist/apis/workflow-definition.js +7 -10
  121. package/dist/apis/workflow.cjs +10 -13
  122. package/dist/apis/workflow.js +7 -10
  123. package/dist/app-IKHWU222.cjs +7 -0
  124. package/dist/app-VLM3SWKA.js +7 -0
  125. package/dist/audit-logs-5VXHOQ7S.js +7 -0
  126. package/dist/audit-logs-D2LFUA2R.cjs +7 -0
  127. package/dist/automation-3HGCK725.cjs +7 -0
  128. package/dist/automation-72VGEJCY.js +7 -0
  129. package/dist/billing-DUWDISHP.cjs +7 -0
  130. package/dist/billing-IPALEAG2.js +7 -0
  131. package/dist/blueprint-manifest-CXSCRQ5X.js +7 -0
  132. package/dist/blueprint-manifest-SHNZPK5O.cjs +7 -0
  133. package/dist/chunk-2HOJWFQ4.js +14 -0
  134. package/dist/chunk-372VUPHN.js +14 -0
  135. package/dist/chunk-3HJEWWPS.cjs +14 -0
  136. package/dist/chunk-3N67SSL3.js +14 -0
  137. package/dist/chunk-3XEP56SV.cjs +204 -0
  138. package/dist/chunk-3ZZ57K3S.cjs +14 -0
  139. package/dist/chunk-4SWC43JO.cjs +14 -0
  140. package/dist/chunk-4VFQTSJQ.js +14 -0
  141. package/dist/chunk-57QIBYDN.js +14 -0
  142. package/dist/chunk-5SNJAD6F.cjs +14 -0
  143. package/dist/chunk-73H6TVKN.js +14 -0
  144. package/dist/chunk-A6JOROUC.cjs +14 -0
  145. package/dist/chunk-AJKH25H2.cjs +14 -0
  146. package/dist/chunk-ARWMTXJV.cjs +14 -0
  147. package/dist/chunk-B3ZGAG7B.js +14 -0
  148. package/dist/chunk-BH5ZXK4J.cjs +14 -0
  149. package/dist/chunk-BWFXLUK5.cjs +14 -0
  150. package/dist/chunk-C6UTZEHH.js +14 -0
  151. package/dist/chunk-CPKBR34V.js +14 -0
  152. package/dist/chunk-CWSHYFVZ.js +14 -0
  153. package/dist/chunk-DJKSULPK.js +14 -0
  154. package/dist/chunk-DNJ54L2G.js +14 -0
  155. package/dist/chunk-DY2D2IW5.cjs +14 -0
  156. package/dist/chunk-E26ZO7QM.cjs +14 -0
  157. package/dist/chunk-EBCHCYUO.js +14 -0
  158. package/dist/chunk-EPAIOB5U.cjs +14 -0
  159. package/dist/chunk-EQZMT2HF.cjs +14 -0
  160. package/dist/chunk-F376L6PP.cjs +14 -0
  161. package/dist/chunk-F472YLJG.cjs +14 -0
  162. package/dist/chunk-FXOX3X7E.cjs +14 -0
  163. package/dist/chunk-G2REP2VZ.cjs +14 -0
  164. package/dist/chunk-GLO477NZ.js +14 -0
  165. package/dist/chunk-H4VSK4KF.js +14 -0
  166. package/dist/chunk-HPSGM6QP.js +14 -0
  167. package/dist/chunk-HPYHWTTA.cjs +14 -0
  168. package/dist/chunk-IH4CMOML.js +14 -0
  169. package/dist/chunk-IMT3IE5M.cjs +14 -0
  170. package/dist/chunk-IP2WWEOU.js +14 -0
  171. package/dist/chunk-IS2VB342.js +14 -0
  172. package/dist/chunk-ITX53XAZ.js +14 -0
  173. package/dist/chunk-JXBXDTFG.cjs +14 -0
  174. package/dist/chunk-K62XK7KU.js +14 -0
  175. package/dist/chunk-KA3TGFJP.js +14 -0
  176. package/dist/chunk-KBOVBUBM.js +14 -0
  177. package/dist/chunk-KPGC2D6E.js +14 -0
  178. package/dist/chunk-KSXTBGIV.js +14 -0
  179. package/dist/chunk-LCIJ4TJ4.cjs +14 -0
  180. package/dist/chunk-LQOLYXGQ.cjs +14 -0
  181. package/dist/chunk-LSIWCIQV.js +14 -0
  182. package/dist/chunk-MHNSZ4HE.js +14 -0
  183. package/dist/chunk-MKX4CKAB.cjs +14 -0
  184. package/dist/chunk-MRTAFRO7.js +14 -0
  185. package/dist/chunk-MRZ7LGKZ.js +14 -0
  186. package/dist/chunk-MSASBR2Y.js +14 -0
  187. package/dist/chunk-NAWLLC3T.cjs +14 -0
  188. package/dist/chunk-NJK5F5TF.cjs +21 -0
  189. package/dist/chunk-NLSZVGHK.cjs +14 -0
  190. package/dist/chunk-O4LRVGOY.js +14 -0
  191. package/dist/chunk-OG2DMGU6.cjs +14 -0
  192. package/dist/chunk-OGQKJTXF.js +14 -0
  193. package/dist/chunk-PETLAONH.js +14 -0
  194. package/dist/chunk-PVSS2WPM.cjs +14 -0
  195. package/dist/chunk-PXITFTJA.cjs +14 -0
  196. package/dist/chunk-QDVPPRWI.cjs +14 -0
  197. package/dist/chunk-QKERXNJJ.cjs +14 -0
  198. package/dist/chunk-QLML3IP5.cjs +14 -0
  199. package/dist/chunk-QVAJ5JP4.js +14 -0
  200. package/dist/chunk-RD7E4OSJ.cjs +14 -0
  201. package/dist/chunk-RWSA3LXE.cjs +14 -0
  202. package/dist/chunk-RXSS67VI.cjs +14 -0
  203. package/dist/chunk-S3ZNESMC.cjs +14 -0
  204. package/dist/chunk-S7NDMDRX.js +14 -0
  205. package/dist/chunk-SK3VYIZ6.cjs +14 -0
  206. package/dist/chunk-SMGHAG5C.cjs +14 -0
  207. package/dist/chunk-T46LODOF.js +14 -0
  208. package/dist/chunk-TIJWJVKZ.js +14 -0
  209. package/dist/chunk-TLWCYLNA.js +14 -0
  210. package/dist/chunk-TRJLYZHD.js +14 -0
  211. package/dist/chunk-UKKJMCNH.js +14 -0
  212. package/dist/chunk-ULBEEHG4.js +204 -0
  213. package/dist/chunk-VGTUK3QD.cjs +14 -0
  214. package/dist/chunk-VQ7R36AC.js +14 -0
  215. package/dist/chunk-VVQB5W7U.cjs +14 -0
  216. package/dist/chunk-VVVATFGK.cjs +14 -0
  217. package/dist/chunk-WMTYO5OX.cjs +14 -0
  218. package/dist/chunk-WOSSSFXB.js +14 -0
  219. package/dist/chunk-WOXXNKTE.js +14 -0
  220. package/dist/chunk-XKI2OAYV.cjs +14 -0
  221. package/dist/chunk-XR4QF6KQ.cjs +14 -0
  222. package/dist/chunk-XYHTQ523.cjs +14 -0
  223. package/dist/chunk-XZYZLSUO.cjs +14 -0
  224. package/dist/chunk-YPSWSI3M.js +21 -0
  225. package/dist/chunk-YYBIU5BQ.js +14 -0
  226. package/dist/chunk-YZA5WZUS.js +14 -0
  227. package/dist/chunk-Z4LUE424.cjs +14 -0
  228. package/dist/chunk-ZV6XYUXS.js +14 -0
  229. package/dist/consent-CS2ZBZX4.cjs +7 -0
  230. package/dist/consent-NNYHF2N4.js +7 -0
  231. package/dist/customer-portal-D3SLPAHZ.js +7 -0
  232. package/dist/customer-portal-UR3GN4VU.cjs +7 -0
  233. package/dist/dashboard-UHYR5RTY.cjs +7 -0
  234. package/dist/dashboard-UTPGXFW5.js +7 -0
  235. package/dist/data-management-QH2IJ5QV.js +7 -0
  236. package/dist/data-management-TEFRLGSU.cjs +7 -0
  237. package/dist/deduplication-ECVAZVVA.cjs +7 -0
  238. package/dist/deduplication-GYIST22B.js +7 -0
  239. package/dist/design-KUVXMFFK.cjs +7 -0
  240. package/dist/design-YKBXRW5C.js +7 -0
  241. package/dist/document-CY2A2OE7.js +7 -0
  242. package/dist/document-RYQ7MF6U.cjs +7 -0
  243. package/dist/email-settings-TQ5GGDYG.js +7 -0
  244. package/dist/email-settings-TQC34GST.cjs +7 -0
  245. package/dist/email-template-M2VVL4TI.cjs +7 -0
  246. package/dist/email-template-WYROV3UG.js +7 -0
  247. package/dist/entity-FA6PZX6S.js +7 -0
  248. package/dist/entity-IX5NSHPX.cjs +7 -0
  249. package/dist/entity-mapping-7J3IAGKQ.js +7 -0
  250. package/dist/entity-mapping-ZNMFCUKK.cjs +7 -0
  251. package/dist/environments-E3X6NYGX.js +7 -0
  252. package/dist/environments-P2JS4F5N.cjs +7 -0
  253. package/dist/erp-integration-EP2XFEH5.js +7 -0
  254. package/dist/erp-integration-NNV72VFI.cjs +7 -0
  255. package/dist/event-catalog-C45ISVMP.cjs +7 -0
  256. package/dist/event-catalog-D7VJ7WRS.js +7 -0
  257. package/dist/file-UOWBTDIU.cjs +7 -0
  258. package/dist/file-XSN3NAVZ.js +7 -0
  259. package/dist/iban-24GHLFDB.cjs +7 -0
  260. package/dist/iban-LDKYDVQV.js +7 -0
  261. package/dist/index.cjs +199 -58
  262. package/dist/index.d.cts +17 -2
  263. package/dist/index.d.ts +17 -2
  264. package/dist/index.js +197 -56
  265. package/dist/journey-7CKX67M7.js +7 -0
  266. package/dist/journey-EUZ6MVHG.cjs +7 -0
  267. package/dist/kanban-CHTH2ZSY.cjs +7 -0
  268. package/dist/kanban-HI6LL5WY.js +7 -0
  269. package/dist/message-3XZLJR6R.cjs +7 -0
  270. package/dist/message-ZNMCS5YH.js +7 -0
  271. package/dist/metering-DZNZPPY6.cjs +7 -0
  272. package/dist/metering-KOSCPPKB.js +7 -0
  273. package/dist/notes-3AO5GXIT.js +7 -0
  274. package/dist/notes-MPWOQC5J.cjs +7 -0
  275. package/dist/notification-PZOCUYD5.cjs +7 -0
  276. package/dist/notification-VWDZRSFZ.js +7 -0
  277. package/dist/organization-RARYYG2E.cjs +7 -0
  278. package/dist/organization-ZERPH2IH.js +7 -0
  279. package/dist/{organization.d-Bd2Hmk8v.d.cts → organization.d-DqwnNxMg.d.cts} +34 -7
  280. package/dist/{organization.d-Bd2Hmk8v.d.ts → organization.d-DqwnNxMg.d.ts} +34 -7
  281. package/dist/partner-directory-2XMPQWWX.js +7 -0
  282. package/dist/partner-directory-WHNTKQ5E.cjs +7 -0
  283. package/dist/permissions-4T3GFNB4.js +7 -0
  284. package/dist/permissions-FGBIJNN7.cjs +7 -0
  285. package/dist/pricing-4Z4TOETA.cjs +7 -0
  286. package/dist/pricing-C65DTZSX.js +7 -0
  287. package/dist/pricing-tier-NI35WOUP.cjs +7 -0
  288. package/dist/pricing-tier-VUOFK5Q7.js +7 -0
  289. package/dist/purpose-AKOEUHZ4.cjs +7 -0
  290. package/dist/purpose-RBRV3AQZ.js +7 -0
  291. package/dist/sandbox-2KN4X66E.cjs +7 -0
  292. package/dist/sandbox-L2SOOGGR.js +7 -0
  293. package/dist/submission-7BISSPO6.js +7 -0
  294. package/dist/submission-Q24BU4GS.cjs +7 -0
  295. package/dist/targeting-EYGYZD6M.cjs +7 -0
  296. package/dist/targeting-GEJTJN5Z.js +7 -0
  297. package/dist/template-variables-OAYS2E3G.cjs +1148 -0
  298. package/dist/template-variables-VKDJJZUT.js +1148 -0
  299. package/dist/user-EIEOI3OG.js +7 -0
  300. package/dist/user-NJJ7XVKB.cjs +7 -0
  301. package/dist/validation-rules-P6F5P73P.js +7 -0
  302. package/dist/validation-rules-VDU3CIZV.cjs +7 -0
  303. package/dist/webhooks-I7JWU34X.cjs +7 -0
  304. package/dist/webhooks-WPLEHVPX.js +7 -0
  305. package/dist/workflow-3LLURW3H.js +7 -0
  306. package/dist/workflow-RAGQDYXT.cjs +7 -0
  307. package/dist/workflow-definition-B6ELOZUR.cjs +7 -0
  308. package/dist/workflow-definition-D24CRCK2.js +7 -0
  309. package/docs/access-token.md +440 -0
  310. package/docs/address-suggestions.md +256 -0
  311. package/docs/address.md +284 -0
  312. package/docs/ai-agents.md +1891 -0
  313. package/docs/app.md +3388 -0
  314. package/docs/audit-logs.md +242 -0
  315. package/docs/automation.md +4044 -0
  316. package/docs/billing.md +783 -0
  317. package/docs/blueprint-manifest.md +3234 -0
  318. package/docs/consent.md +213 -0
  319. package/docs/customer-portal.md +11399 -0
  320. package/docs/dashboard.md +640 -0
  321. package/docs/data-management.md +883 -0
  322. package/docs/deduplication.md +135 -0
  323. package/docs/design.md +1273 -0
  324. package/docs/document.md +590 -0
  325. package/docs/email-settings.md +1544 -0
  326. package/docs/email-template.md +1197 -0
  327. package/docs/entity-mapping.md +2864 -0
  328. package/docs/entity.md +9595 -0
  329. package/docs/environments.md +259 -0
  330. package/docs/erp-integration.md +4572 -0
  331. package/docs/event-catalog.md +835 -0
  332. package/docs/file.md +1453 -0
  333. package/docs/iban.md +61 -0
  334. package/docs/journey.md +2268 -0
  335. package/docs/kanban.md +882 -0
  336. package/docs/message.md +2122 -0
  337. package/docs/metering.md +1431 -0
  338. package/docs/notes.md +670 -0
  339. package/docs/notification.md +1207 -0
  340. package/docs/organization.md +733 -0
  341. package/docs/partner-directory.md +1197 -0
  342. package/docs/permissions.md +1047 -0
  343. package/docs/pricing-tier.md +81 -0
  344. package/docs/pricing.md +5923 -0
  345. package/docs/purpose.md +283 -0
  346. package/docs/sandbox.md +389 -0
  347. package/docs/submission.md +195 -0
  348. package/docs/targeting.md +959 -0
  349. package/docs/template-variables.md +1141 -0
  350. package/docs/user.md +2555 -0
  351. package/docs/validation-rules.md +1597 -0
  352. package/docs/webhooks.md +996 -0
  353. package/docs/workflow-definition.md +3842 -0
  354. package/docs/workflow.md +4465 -0
  355. package/package.json +3 -2
  356. package/dist/chunk-XE25WERA.js +0 -125
  357. package/dist/chunk-XEQMAKGA.cjs +0 -125
@@ -0,0 +1,4465 @@
1
+ # Workflows Executions
2
+
3
+ - **Base URL:** `https://workflows-execution.sls.epilot.io`
4
+ - **Full API Docs:** [https://docs.epilot.io/api/workflow](https://docs.epilot.io/api/workflow)
5
+
6
+ ## Usage
7
+
8
+ ```ts
9
+ import { epilot } from '@epilot/sdk'
10
+
11
+ epilot.authorize(() => '<token>')
12
+ const { data } = await epilot.workflow.getExecutions(...)
13
+ ```
14
+
15
+ ### Tree-shakeable import
16
+
17
+ ```ts
18
+ import { getClient, authorize } from '@epilot/sdk/workflow'
19
+
20
+ const workflowClient = getClient()
21
+ authorize(workflowClient, () => '<token>')
22
+ const { data } = await workflowClient.getExecutions(...)
23
+ ```
24
+
25
+ ## Operations
26
+
27
+ **Workflow Executions**
28
+ - [`getExecutions`](#getexecutions)
29
+ - [`createExecution`](#createexecution)
30
+ - [`getExecution`](#getexecution)
31
+ - [`updateExecution`](#updateexecution)
32
+ - [`deleteExecution`](#deleteexecution)
33
+
34
+ **Workflow Steps**
35
+ - [`createStep`](#createstep)
36
+ - [`updateStep`](#updatestep)
37
+ - [`deleteStep`](#deletestep)
38
+
39
+ **Closing Reasons**
40
+ - [`getClosingReasonExecution`](#getclosingreasonexecution)
41
+
42
+ **Flows V2**
43
+ - [`startFlowExecution`](#startflowexecution)
44
+ - [`getFlowExecution`](#getflowexecution)
45
+ - [`patchFlowExecution`](#patchflowexecution)
46
+ - [`deleteFlowExecution`](#deleteflowexecution)
47
+ - [`searchFlowExecutions`](#searchflowexecutions)
48
+ - [`patchTask`](#patchtask)
49
+ - [`runTaskAutomation`](#runtaskautomation)
50
+ - [`executeTask`](#executetask)
51
+ - [`patchPhase`](#patchphase)
52
+ - [`addTask`](#addtask)
53
+ - [`cancelTaskSchedule`](#canceltaskschedule)
54
+
55
+ **Schemas**
56
+ - [`WorkflowExecutionCreateReq`](#workflowexecutioncreatereq)
57
+ - [`WorkflowExecutionUpdateReq`](#workflowexecutionupdatereq)
58
+ - [`ClosingReason`](#closingreason)
59
+ - [`WorkflowContext`](#workflowcontext)
60
+ - [`WorkflowExecutionBase`](#workflowexecutionbase)
61
+ - [`WorkflowExecutionSlim`](#workflowexecutionslim)
62
+ - [`FlowSlim`](#flowslim)
63
+ - [`Flow`](#flow)
64
+ - [`WorkflowExecution`](#workflowexecution)
65
+ - [`WorkflowStatus`](#workflowstatus)
66
+ - [`SectionSimplified`](#sectionsimplified)
67
+ - [`Section`](#section)
68
+ - [`StepId`](#stepid)
69
+ - [`StepSimplified`](#stepsimplified)
70
+ - [`Step`](#step)
71
+ - [`StepExtended`](#stepextended)
72
+ - [`StepStatus`](#stepstatus)
73
+ - [`SectionStatus`](#sectionstatus)
74
+ - [`StepType`](#steptype)
75
+ - [`StepJourney`](#stepjourney)
76
+ - [`AutomationConfig`](#automationconfig)
77
+ - [`ECPDetails`](#ecpdetails)
78
+ - [`StepDescription`](#stepdescription)
79
+ - [`ItemType`](#itemtype)
80
+ - [`TriggerType`](#triggertype)
81
+ - [`CreateStepReq`](#createstepreq)
82
+ - [`UpdateStepReq`](#updatestepreq)
83
+ - [`StepPositionAt`](#steppositionat)
84
+ - [`UpdateStepResp`](#updatestepresp)
85
+ - [`SearchStepsResp`](#searchstepsresp)
86
+ - [`SearchExecutionsReq`](#searchexecutionsreq)
87
+ - [`SearchExecutionsResp`](#searchexecutionsresp)
88
+ - [`LastEvaluatedKey`](#lastevaluatedkey)
89
+ - [`SearchStepsReq`](#searchstepsreq)
90
+ - [`SearchSorting`](#searchsorting)
91
+ - [`SearchPagination`](#searchpagination)
92
+ - [`ExecutionPaginationDynamo`](#executionpaginationdynamo)
93
+ - [`ErrorResp`](#errorresp)
94
+ - [`ClosingReasonResp`](#closingreasonresp)
95
+ - [`PhaseInEntity`](#phaseinentity)
96
+ - [`WorkflowInEntity`](#workflowinentity)
97
+ - [`UpdateEntityAttributes`](#updateentityattributes)
98
+ - [`EntitySync`](#entitysync)
99
+ - [`DynamicDueDate`](#dynamicduedate)
100
+ - [`StepRequirement`](#steprequirement)
101
+ - [`StartFlowReq`](#startflowreq)
102
+ - [`SearchFlowsReq`](#searchflowsreq)
103
+ - [`PatchFlowReq`](#patchflowreq)
104
+ - [`FlowExecution`](#flowexecution)
105
+ - [`FlowClosingReason`](#flowclosingreason)
106
+ - [`FlowTrigger`](#flowtrigger)
107
+ - [`FlowContext`](#flowcontext)
108
+ - [`EntityRef`](#entityref)
109
+ - [`PhaseId`](#phaseid)
110
+ - [`TaskId`](#taskid)
111
+ - [`Task`](#task)
112
+ - [`TaskType`](#tasktype)
113
+ - [`ManualTask`](#manualtask)
114
+ - [`AutomationTask`](#automationtask)
115
+ - [`LoopInfo`](#loopinfo)
116
+ - [`LoopConfig`](#loopconfig)
117
+ - [`TriggerMode`](#triggermode)
118
+ - [`ActionSchedule`](#actionschedule)
119
+ - [`ImmediateSchedule`](#immediateschedule)
120
+ - [`DelayedSchedule`](#delayedschedule)
121
+ - [`RelativeSchedule`](#relativeschedule)
122
+ - [`DecisionTask`](#decisiontask)
123
+ - [`AiAgentTask`](#aiagenttask)
124
+ - [`AgentConfig`](#agentconfig)
125
+ - [`AgentExecutionInfo`](#agentexecutioninfo)
126
+ - [`TaskBase`](#taskbase)
127
+ - [`Phase`](#phase)
128
+ - [`Edge`](#edge)
129
+ - [`AutomationInfo`](#automationinfo)
130
+ - [`AnalyticsInfo`](#analyticsinfo)
131
+ - [`ConditionId`](#conditionid)
132
+ - [`Condition`](#condition)
133
+ - [`Statement`](#statement)
134
+ - [`EvaluationSource`](#evaluationsource)
135
+ - [`Operator`](#operator)
136
+ - [`DueDateConfig`](#duedateconfig)
137
+ - [`TimeUnit`](#timeunit)
138
+ - [`EnableRequirement`](#enablerequirement)
139
+ - [`FlowTemplateId`](#flowtemplateid)
140
+ - [`FlowExecutionId`](#flowexecutionid)
141
+ - [`UserId`](#userid)
142
+ - [`VariableAssignment`](#variableassignment)
143
+ - [`Assignees`](#assignees)
144
+ - [`PatchTaskReq`](#patchtaskreq)
145
+ - [`PatchPhaseReq`](#patchphasereq)
146
+ - [`AddTaskReq`](#addtaskreq)
147
+
148
+ ### `getExecutions`
149
+
150
+ Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information.
151
+
152
+ `GET /v1/workflows/executions`
153
+
154
+ ```ts
155
+ const { data } = await client.getExecutions({
156
+ context: 'example',
157
+ schema: 'example',
158
+ })
159
+ ```
160
+
161
+ <details>
162
+ <summary>Response</summary>
163
+
164
+ ```json
165
+ [
166
+ {
167
+ "id": "8gja72h6kas6h",
168
+ "name": "Lead Qualification",
169
+ "trigger": "MANUAL",
170
+ "status": "STARTED",
171
+ "creationTime": "2021-04-27T12:01:13.000Z",
172
+ "lastUpdateTime": "2021-04-27T12:01:13.000Z",
173
+ "dueDate": "2021-04-27T12:01:13.000Z",
174
+ "flow": [
175
+ {
176
+ "id": "sectionId1",
177
+ "definitionId": "section_definition_id_1",
178
+ "name": "Initial Information Gathering",
179
+ "type": "SECTION",
180
+ "steps": [
181
+ {
182
+ "id": "sada5641f3a21",
183
+ "definitionId": "step_definition_id_1",
184
+ "name": "Call client"
185
+ },
186
+ {
187
+ "id": "sada5641f3a22",
188
+ "definitionId": "step_definition_id_2",
189
+ "name": "Check product availability"
190
+ }
191
+ ]
192
+ },
193
+ {
194
+ "id": "firstLevelStepId1",
195
+ "definitionId": "step_definition_id_4",
196
+ "name": "Print and send catalog",
197
+ "type": "STEP"
198
+ }
199
+ ]
200
+ }
201
+ ]
202
+ ```
203
+
204
+ </details>
205
+
206
+ ---
207
+
208
+ ### `createExecution`
209
+
210
+ Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template).
211
+
212
+ `POST /v1/workflows/executions`
213
+
214
+ ```ts
215
+ const { data } = await client.createExecution(
216
+ null,
217
+ {
218
+ workflowId: 'j3f23fh23uif98',
219
+ trigger: 'AUTOMATIC',
220
+ contexts: [
221
+ {
222
+ id: '3fa3fa86-0907-4642-a57e-0fe30a19874d',
223
+ schema: 'contact'
224
+ },
225
+ {
226
+ id: '3a6d42fa-5070-4723-b90f-41ead4303e33',
227
+ schema: 'opportunity'
228
+ }
229
+ ]
230
+ },
231
+ )
232
+ ```
233
+
234
+ <details>
235
+ <summary>Response</summary>
236
+
237
+ ```json
238
+ {
239
+ "id": "8gja72h6kas6h",
240
+ "name": "Lead Qualification",
241
+ "trigger": "MANUAL",
242
+ "status": "STARTED",
243
+ "creationTime": "2021-04-27T12:01:13.000Z",
244
+ "lastUpdateTime": "2021-04-27T12:01:13.000Z",
245
+ "dueDate": "2021-04-27T12:01:13.000Z",
246
+ "assignedTo": ["252", "29052"],
247
+ "flow": [
248
+ {
249
+ "id": "sectionId1",
250
+ "name": "Initial Information Gathering",
251
+ "steps": [
252
+ {
253
+ "id": "sada5641f3a21",
254
+ "name": "Call client and confirm address and product",
255
+ "definitionId": "step_definition_id_1",
256
+ "status": "ASSIGNED",
257
+ "assignedTo": ["11"]
258
+ },
259
+ {
260
+ "id": "sada5641f3a22",
261
+ "name": "Check product availability",
262
+ "status": "UNASSIGNED",
263
+ "definitionId": "step_definition_id_2"
264
+ }
265
+ ]
266
+ },
267
+ {
268
+ "id": "firstLevelStepId1",
269
+ "definitionId": "step_definition_id_4",
270
+ "name": "Print and send catalog",
271
+ "status": "SKIPPED",
272
+ "dueDate": "2023-01-15T20:00:00"
273
+ }
274
+ ]
275
+ }
276
+ ```
277
+
278
+ </details>
279
+
280
+ ---
281
+
282
+ ### `getExecution`
283
+
284
+ Get a full workflow execution, included steps information, by execution id.
285
+
286
+ `GET /v1/workflows/executions/{executionId}`
287
+
288
+ ```ts
289
+ const { data } = await client.getExecution({
290
+ executionId: 'example',
291
+ })
292
+ ```
293
+
294
+ <details>
295
+ <summary>Response</summary>
296
+
297
+ ```json
298
+ {
299
+ "id": "8gja72h6kas6h",
300
+ "name": "Lead Qualification",
301
+ "trigger": "MANUAL",
302
+ "status": "STARTED",
303
+ "creationTime": "2021-04-27T12:01:13.000Z",
304
+ "lastUpdateTime": "2021-04-27T12:01:13.000Z",
305
+ "dueDate": "2021-04-27T12:01:13.000Z",
306
+ "assignedTo": ["252", "29052"],
307
+ "flow": [
308
+ {
309
+ "id": "sectionId1",
310
+ "name": "Initial Information Gathering",
311
+ "steps": [
312
+ {
313
+ "id": "sada5641f3a21",
314
+ "name": "Call client and confirm address and product",
315
+ "definitionId": "step_definition_id_1",
316
+ "status": "ASSIGNED",
317
+ "assignedTo": ["11"]
318
+ },
319
+ {
320
+ "id": "sada5641f3a22",
321
+ "name": "Check product availability",
322
+ "status": "UNASSIGNED",
323
+ "definitionId": "step_definition_id_2"
324
+ }
325
+ ]
326
+ },
327
+ {
328
+ "id": "firstLevelStepId1",
329
+ "definitionId": "step_definition_id_4",
330
+ "name": "Print and send catalog",
331
+ "status": "SKIPPED",
332
+ "dueDate": "2023-01-15T20:00:00"
333
+ }
334
+ ]
335
+ }
336
+ ```
337
+
338
+ </details>
339
+
340
+ ---
341
+
342
+ ### `updateExecution`
343
+
344
+ Patches updates like assignees, status, closingReason for a single Workflow Execution.
345
+
346
+ `PATCH /v1/workflows/executions/{executionId}`
347
+
348
+ ```ts
349
+ const { data } = await client.updateExecution(
350
+ {
351
+ executionId: 'example',
352
+ },
353
+ {
354
+ status: 'STARTED',
355
+ assignedTo: ['string'],
356
+ selectedClosingReasons: [
357
+ {
358
+ id: 'string',
359
+ title: 'string'
360
+ }
361
+ ],
362
+ closingReasonDescription: 'string',
363
+ dueDate: 'string',
364
+ dynamicDueDate: {
365
+ numberOfUnits: 0,
366
+ timePeriod: 'minutes',
367
+ actionTypeCondition: 'WORKFLOW_STARTED',
368
+ stepId: 'string',
369
+ phaseId: 'string'
370
+ },
371
+ closedBy: 'string',
372
+ contexts: [
373
+ {
374
+ id: 'string',
375
+ title: 'string',
376
+ schema: 'string'
377
+ }
378
+ ],
379
+ completedTime: 'string'
380
+ },
381
+ )
382
+ ```
383
+
384
+ ---
385
+
386
+ ### `deleteExecution`
387
+
388
+ Delete workflow execution by id. Workflow contexts will NOT be deleted.
389
+
390
+ `DELETE /v1/workflows/executions/{executionId}`
391
+
392
+ ```ts
393
+ const { data } = await client.deleteExecution({
394
+ executionId: 'example',
395
+ })
396
+ ```
397
+
398
+ ---
399
+
400
+ ### `createStep`
401
+
402
+ Create a new step in current workflow execution.
403
+
404
+ `POST /v1/workflows/executions/{executionId}/steps`
405
+
406
+ ```ts
407
+ const { data } = await client.createStep(
408
+ {
409
+ executionId: 'example',
410
+ },
411
+ {
412
+ insertionIndex: 0,
413
+ name: 'string',
414
+ description: {
415
+ enabled: true,
416
+ value: 'string'
417
+ },
418
+ status: 'UNASSIGNED',
419
+ sectionId: 'string',
420
+ executionType: 'MANUAL',
421
+ automationConfig: {
422
+ flowId: 'string',
423
+ executionId: 'string',
424
+ executionStatus: 'string'
425
+ }
426
+ },
427
+ )
428
+ ```
429
+
430
+ <details>
431
+ <summary>Response</summary>
432
+
433
+ ```json
434
+ {
435
+ "id": "string",
436
+ "definitionId": "string",
437
+ "entityRefId": "string",
438
+ "name": "string",
439
+ "description": {
440
+ "enabled": true,
441
+ "value": "string"
442
+ },
443
+ "type": "STEP",
444
+ "ecp": {
445
+ "enabled": true,
446
+ "label": "string",
447
+ "description": "string",
448
+ "journey": {
449
+ "id": "string",
450
+ "journeyId": "string",
451
+ "name": "string",
452
+ "complete_task_automatically": true
453
+ }
454
+ },
455
+ "installer": {
456
+ "enabled": true,
457
+ "label": "string",
458
+ "description": "string",
459
+ "journey": {
460
+ "id": "string",
461
+ "journeyId": "string",
462
+ "name": "string",
463
+ "complete_task_automatically": true
464
+ }
465
+ },
466
+ "enabled": true,
467
+ "requirements": [
468
+ {
469
+ "definitionId": "string",
470
+ "type": "STEP",
471
+ "condition": "CLOSED"
472
+ }
473
+ ],
474
+ "executionType": "MANUAL",
475
+ "sectionId": "string",
476
+ "executionId": "string",
477
+ "userIds": [0],
478
+ "assignedTo": ["string"],
479
+ "assignedToInProgress": "string",
480
+ "assignedToOnHold": "string",
481
+ "status": "UNASSIGNED",
482
+ "created": "string",
483
+ "lastUpdated": "string",
484
+ "statusLastUpdated": "string",
485
+ "startedTime": "string",
486
+ "completedTime": "string",
487
+ "dueDate": "string",
488
+ "dynamicDueDate": {
489
+ "numberOfUnits": 0,
490
+ "timePeriod": "minutes",
491
+ "actionTypeCondition": "WORKFLOW_STARTED",
492
+ "stepId": "string",
493
+ "phaseId": "string"
494
+ },
495
+ "manuallyCreated": true,
496
+ "automationConfig": {
497
+ "flowId": "string",
498
+ "executionId": "string",
499
+ "executionStatus": "string"
500
+ },
501
+ "journey": {
502
+ "id": "string",
503
+ "journeyId": "string",
504
+ "name": "string",
505
+ "complete_task_automatically": true
506
+ },
507
+ "taxonomies": ["string"]
508
+ }
509
+ ```
510
+
511
+ </details>
512
+
513
+ ---
514
+
515
+ ### `updateStep`
516
+
517
+ Patches various changes to a workflow execution step.
518
+
519
+ `PATCH /v1/workflows/executions/{executionId}/steps/{stepId}`
520
+
521
+ ```ts
522
+ const { data } = await client.updateStep(
523
+ {
524
+ executionId: 'example',
525
+ stepId: 'example',
526
+ },
527
+ {
528
+ stepId: 'string',
529
+ entityRefId: 'string',
530
+ userIds: [0],
531
+ assignedTo: ['string'],
532
+ assignedToInProgress: 'string',
533
+ assignedToOnHold: 'string',
534
+ status: 'UNASSIGNED',
535
+ dueDate: 'string',
536
+ dynamicDueDate: {
537
+ numberOfUnits: 0,
538
+ timePeriod: 'minutes',
539
+ actionTypeCondition: 'WORKFLOW_STARTED',
540
+ stepId: 'string',
541
+ phaseId: 'string'
542
+ },
543
+ name: 'string',
544
+ description: {
545
+ enabled: true,
546
+ value: 'string'
547
+ },
548
+ position: {
549
+ index: 0,
550
+ sectionId: 'string'
551
+ },
552
+ automationConfig: {
553
+ flowId: 'string',
554
+ executionId: 'string',
555
+ executionStatus: 'string'
556
+ },
557
+ startedTime: 'string',
558
+ completedTime: 'string'
559
+ },
560
+ )
561
+ ```
562
+
563
+ <details>
564
+ <summary>Response</summary>
565
+
566
+ ```json
567
+ {
568
+ "id": "string",
569
+ "definitionId": "string",
570
+ "entityRefId": "string",
571
+ "name": "string",
572
+ "description": {
573
+ "enabled": true,
574
+ "value": "string"
575
+ },
576
+ "type": "STEP",
577
+ "ecp": {
578
+ "enabled": true,
579
+ "label": "string",
580
+ "description": "string",
581
+ "journey": {
582
+ "id": "string",
583
+ "journeyId": "string",
584
+ "name": "string",
585
+ "complete_task_automatically": true
586
+ }
587
+ },
588
+ "installer": {
589
+ "enabled": true,
590
+ "label": "string",
591
+ "description": "string",
592
+ "journey": {
593
+ "id": "string",
594
+ "journeyId": "string",
595
+ "name": "string",
596
+ "complete_task_automatically": true
597
+ }
598
+ },
599
+ "enabled": true,
600
+ "requirements": [
601
+ {
602
+ "definitionId": "string",
603
+ "type": "STEP",
604
+ "condition": "CLOSED"
605
+ }
606
+ ],
607
+ "executionType": "MANUAL",
608
+ "sectionId": "string",
609
+ "executionId": "string",
610
+ "userIds": [0],
611
+ "assignedTo": ["string"],
612
+ "assignedToInProgress": "string",
613
+ "assignedToOnHold": "string",
614
+ "status": "UNASSIGNED",
615
+ "created": "string",
616
+ "lastUpdated": "string",
617
+ "statusLastUpdated": "string",
618
+ "startedTime": "string",
619
+ "completedTime": "string",
620
+ "dueDate": "string",
621
+ "dynamicDueDate": {
622
+ "numberOfUnits": 0,
623
+ "timePeriod": "minutes",
624
+ "actionTypeCondition": "WORKFLOW_STARTED",
625
+ "stepId": "string",
626
+ "phaseId": "string"
627
+ },
628
+ "manuallyCreated": true,
629
+ "automationConfig": {
630
+ "flowId": "string",
631
+ "executionId": "string",
632
+ "executionStatus": "string"
633
+ },
634
+ "journey": {
635
+ "id": "string",
636
+ "journeyId": "string",
637
+ "name": "string",
638
+ "complete_task_automatically": true
639
+ },
640
+ "taxonomies": ["string"]
641
+ }
642
+ ```
643
+
644
+ </details>
645
+
646
+ ---
647
+
648
+ ### `deleteStep`
649
+
650
+ Deletes a step from a workflow execution.
651
+
652
+ `DELETE /v1/workflows/executions/{executionId}/steps/{stepId}`
653
+
654
+ ```ts
655
+ const { data } = await client.deleteStep({
656
+ executionId: 'example',
657
+ stepId: 'example',
658
+ })
659
+ ```
660
+
661
+ ---
662
+
663
+ ### `getClosingReasonExecution`
664
+
665
+ Shows all Closing Reasons defined at the moment of starting the Workflow Execution.
666
+ The Closing Reasons shown in the execution are just snapshots
667
+ from the state of the Definition when the instance was
668
+
669
+ `GET /v1/workflows/executions/{executionId}/closing-reasons`
670
+
671
+ ```ts
672
+ const { data } = await client.getClosingReasonExecution({
673
+ executionId: 'example',
674
+ })
675
+ ```
676
+
677
+ <details>
678
+ <summary>Response</summary>
679
+
680
+ ```json
681
+ {
682
+ "reasons": [
683
+ {
684
+ "id": "string",
685
+ "title": "string"
686
+ }
687
+ ]
688
+ }
689
+ ```
690
+
691
+ </details>
692
+
693
+ ---
694
+
695
+ ### `startFlowExecution`
696
+
697
+ Starts a new Flow Execution based on a flow template.
698
+
699
+ `POST /v2/flows/executions`
700
+
701
+ ```ts
702
+ const { data } = await client.startFlowExecution(
703
+ null,
704
+ {
705
+ flow_template_id: 'string',
706
+ trigger: {
707
+ type: 'MANUAL',
708
+ automation_config: {
709
+ flow_id: 'string',
710
+ execution_id: 'string',
711
+ execution_status: 'string',
712
+ error_reason: 'string'
713
+ }
714
+ },
715
+ contexts: [
716
+ {
717
+ entity_id: 'string',
718
+ entity_schema: 'string',
719
+ is_primary: false
720
+ }
721
+ ],
722
+ purposes: ['string']
723
+ },
724
+ )
725
+ ```
726
+
727
+ <details>
728
+ <summary>Response</summary>
729
+
730
+ ```json
731
+ {
732
+ "id": "string",
733
+ "flow_template_id": "string",
734
+ "org_id": "string",
735
+ "name": "string",
736
+ "created_at": "string",
737
+ "updated_at": "string",
738
+ "due_date": "string",
739
+ "due_date_config": {
740
+ "duration": 0,
741
+ "unit": "minutes",
742
+ "type": "WORKFLOW_STARTED",
743
+ "task_id": "string",
744
+ "phase_id": "string"
745
+ },
746
+ "status": "STARTED",
747
+ "assigned_to": ["string"],
748
+ "analytics": {
749
+ "started_at": "string",
750
+ "completed_at": "string",
751
+ "closed_at": "string",
752
+ "started_by": "string",
753
+ "closed_by": "string"
754
+ },
755
+ "contexts": [
756
+ {
757
+ "entity_id": "string",
758
+ "entity_schema": "string",
759
+ "is_primary": false
760
+ }
761
+ ],
762
+ "crt_tasks": [
763
+ {
764
+ "id": "string"
765
+ }
766
+ ],
767
+ "phases": [
768
+ {
769
+ "id": "string",
770
+ "template_id": "string",
771
+ "name": "string",
772
+ "status": "OPEN",
773
+ "updated_at": "string",
774
+ "due_date": "2021-04-27T12:00:00.000Z",
775
+ "due_date_config": {},
776
+ "assigned_to": ["string"],
777
+ "analytics": {},
778
+ "taxonomies": ["string"],
779
+ "loop_config": {}
780
+ }
781
+ ],
782
+ "tasks": [
783
+ {
784
+ "id": "string",
785
+ "template_id": "string",
786
+ "name": "string",
787
+ "description": {},
788
+ "status": "UNASSIGNED",
789
+ "journey": {},
790
+ "due_date": "2021-04-27T12:00:00.000Z",
791
+ "due_date_config": {},
792
+ "requirements": [],
793
+ "assigned_to": ["string"],
794
+ "analytics": {},
795
+ "created_at": "1970-01-01T00:00:00.000Z",
796
+ "updated_at": "1970-01-01T00:00:00.000Z",
797
+ "manually_created": true,
798
+ "enabled": true,
799
+ "ecp": {},
800
+ "installer": {},
801
+ "taxonomies": ["string"],
802
+ "phase_id": "string",
803
+ "task_type": "MANUAL",
804
+ "loop_config": {}
805
+ }
806
+ ],
807
+ "edges": [
808
+ {
809
+ "id": "string",
810
+ "from_id": "string",
811
+ "to_id": "string",
812
+ "condition_id": "abc123",
813
+ "none_met": true
814
+ }
815
+ ],
816
+ "_execution_chain": {
817
+ "parent_execution_id": "string",
818
+ "parent_task_id": "string",
819
+ "depth": 0
820
+ },
821
+ "closing_reason": {
822
+ "selected_reasons": [
823
+ {}
824
+ ],
825
+ "configured_reasons": [
826
+ {}
827
+ ],
828
+ "extra_description": "string"
829
+ },
830
+ "available_in_ecp": true,
831
+ "entity_sync": [
832
+ {
833
+ "trigger": {},
834
+ "target": {},
835
+ "value": {}
836
+ }
837
+ ],
838
+ "taxonomies": ["string"],
839
+ "trigger": {
840
+ "type": "MANUAL",
841
+ "automation_config": {
842
+ "flow_id": "string",
843
+ "execution_id": "string",
844
+ "execution_status": "string",
845
+ "error_reason": "string"
846
+ }
847
+ },
848
+ "singleClosingReasonSelection": true
849
+ }
850
+ ```
851
+
852
+ </details>
853
+
854
+ ---
855
+
856
+ ### `getFlowExecution`
857
+
858
+ Get a full flow execution, included tasks, phases, edges & analytics.
859
+
860
+ `GET /v2/flows/executions/{execution_id}`
861
+
862
+ ```ts
863
+ const { data } = await client.getFlowExecution({
864
+ execution_id: 'example',
865
+ })
866
+ ```
867
+
868
+ <details>
869
+ <summary>Response</summary>
870
+
871
+ ```json
872
+ {
873
+ "id": "string",
874
+ "flow_template_id": "string",
875
+ "org_id": "string",
876
+ "name": "string",
877
+ "created_at": "string",
878
+ "updated_at": "string",
879
+ "due_date": "string",
880
+ "due_date_config": {
881
+ "duration": 0,
882
+ "unit": "minutes",
883
+ "type": "WORKFLOW_STARTED",
884
+ "task_id": "string",
885
+ "phase_id": "string"
886
+ },
887
+ "status": "STARTED",
888
+ "assigned_to": ["string"],
889
+ "analytics": {
890
+ "started_at": "string",
891
+ "completed_at": "string",
892
+ "closed_at": "string",
893
+ "started_by": "string",
894
+ "closed_by": "string"
895
+ },
896
+ "contexts": [
897
+ {
898
+ "entity_id": "string",
899
+ "entity_schema": "string",
900
+ "is_primary": false
901
+ }
902
+ ],
903
+ "crt_tasks": [
904
+ {
905
+ "id": "string"
906
+ }
907
+ ],
908
+ "phases": [
909
+ {
910
+ "id": "string",
911
+ "template_id": "string",
912
+ "name": "string",
913
+ "status": "OPEN",
914
+ "updated_at": "string",
915
+ "due_date": "2021-04-27T12:00:00.000Z",
916
+ "due_date_config": {},
917
+ "assigned_to": ["string"],
918
+ "analytics": {},
919
+ "taxonomies": ["string"],
920
+ "loop_config": {}
921
+ }
922
+ ],
923
+ "tasks": [
924
+ {
925
+ "id": "string",
926
+ "template_id": "string",
927
+ "name": "string",
928
+ "description": {},
929
+ "status": "UNASSIGNED",
930
+ "journey": {},
931
+ "due_date": "2021-04-27T12:00:00.000Z",
932
+ "due_date_config": {},
933
+ "requirements": [],
934
+ "assigned_to": ["string"],
935
+ "analytics": {},
936
+ "created_at": "1970-01-01T00:00:00.000Z",
937
+ "updated_at": "1970-01-01T00:00:00.000Z",
938
+ "manually_created": true,
939
+ "enabled": true,
940
+ "ecp": {},
941
+ "installer": {},
942
+ "taxonomies": ["string"],
943
+ "phase_id": "string",
944
+ "task_type": "MANUAL",
945
+ "loop_config": {}
946
+ }
947
+ ],
948
+ "edges": [
949
+ {
950
+ "id": "string",
951
+ "from_id": "string",
952
+ "to_id": "string",
953
+ "condition_id": "abc123",
954
+ "none_met": true
955
+ }
956
+ ],
957
+ "_execution_chain": {
958
+ "parent_execution_id": "string",
959
+ "parent_task_id": "string",
960
+ "depth": 0
961
+ },
962
+ "closing_reason": {
963
+ "selected_reasons": [
964
+ {}
965
+ ],
966
+ "configured_reasons": [
967
+ {}
968
+ ],
969
+ "extra_description": "string"
970
+ },
971
+ "available_in_ecp": true,
972
+ "entity_sync": [
973
+ {
974
+ "trigger": {},
975
+ "target": {},
976
+ "value": {}
977
+ }
978
+ ],
979
+ "taxonomies": ["string"],
980
+ "trigger": {
981
+ "type": "MANUAL",
982
+ "automation_config": {
983
+ "flow_id": "string",
984
+ "execution_id": "string",
985
+ "execution_status": "string",
986
+ "error_reason": "string"
987
+ }
988
+ },
989
+ "singleClosingReasonSelection": true
990
+ }
991
+ ```
992
+
993
+ </details>
994
+
995
+ ---
996
+
997
+ ### `patchFlowExecution`
998
+
999
+ Patch flow execution with new assignees, status, analytics & other changes.
1000
+
1001
+ `PATCH /v2/flows/executions/{execution_id}`
1002
+
1003
+ ```ts
1004
+ const { data } = await client.patchFlowExecution(
1005
+ {
1006
+ execution_id: 'example',
1007
+ },
1008
+ {
1009
+ status: 'STARTED',
1010
+ assigned_to: ['string'],
1011
+ closing_reason: {
1012
+ selected_reasons: [
1013
+ {
1014
+ id: 'string',
1015
+ title: 'string'
1016
+ }
1017
+ ],
1018
+ configured_reasons: [
1019
+ {
1020
+ id: 'string',
1021
+ title: 'string'
1022
+ }
1023
+ ],
1024
+ extra_description: 'string'
1025
+ },
1026
+ due_date: 'string',
1027
+ due_date_config: {
1028
+ duration: 0,
1029
+ unit: 'minutes',
1030
+ type: 'WORKFLOW_STARTED',
1031
+ task_id: 'string',
1032
+ phase_id: 'string'
1033
+ },
1034
+ contexts: [
1035
+ {
1036
+ entity_id: 'string',
1037
+ entity_schema: 'string',
1038
+ is_primary: false
1039
+ }
1040
+ ]
1041
+ },
1042
+ )
1043
+ ```
1044
+
1045
+ <details>
1046
+ <summary>Response</summary>
1047
+
1048
+ ```json
1049
+ {
1050
+ "id": "string",
1051
+ "flow_template_id": "string",
1052
+ "org_id": "string",
1053
+ "name": "string",
1054
+ "created_at": "string",
1055
+ "updated_at": "string",
1056
+ "due_date": "string",
1057
+ "due_date_config": {
1058
+ "duration": 0,
1059
+ "unit": "minutes",
1060
+ "type": "WORKFLOW_STARTED",
1061
+ "task_id": "string",
1062
+ "phase_id": "string"
1063
+ },
1064
+ "status": "STARTED",
1065
+ "assigned_to": ["string"],
1066
+ "analytics": {
1067
+ "started_at": "string",
1068
+ "completed_at": "string",
1069
+ "closed_at": "string",
1070
+ "started_by": "string",
1071
+ "closed_by": "string"
1072
+ },
1073
+ "contexts": [
1074
+ {
1075
+ "entity_id": "string",
1076
+ "entity_schema": "string",
1077
+ "is_primary": false
1078
+ }
1079
+ ],
1080
+ "crt_tasks": [
1081
+ {
1082
+ "id": "string"
1083
+ }
1084
+ ],
1085
+ "phases": [
1086
+ {
1087
+ "id": "string",
1088
+ "template_id": "string",
1089
+ "name": "string",
1090
+ "status": "OPEN",
1091
+ "updated_at": "string",
1092
+ "due_date": "2021-04-27T12:00:00.000Z",
1093
+ "due_date_config": {},
1094
+ "assigned_to": ["string"],
1095
+ "analytics": {},
1096
+ "taxonomies": ["string"],
1097
+ "loop_config": {}
1098
+ }
1099
+ ],
1100
+ "tasks": [
1101
+ {
1102
+ "id": "string",
1103
+ "template_id": "string",
1104
+ "name": "string",
1105
+ "description": {},
1106
+ "status": "UNASSIGNED",
1107
+ "journey": {},
1108
+ "due_date": "2021-04-27T12:00:00.000Z",
1109
+ "due_date_config": {},
1110
+ "requirements": [],
1111
+ "assigned_to": ["string"],
1112
+ "analytics": {},
1113
+ "created_at": "1970-01-01T00:00:00.000Z",
1114
+ "updated_at": "1970-01-01T00:00:00.000Z",
1115
+ "manually_created": true,
1116
+ "enabled": true,
1117
+ "ecp": {},
1118
+ "installer": {},
1119
+ "taxonomies": ["string"],
1120
+ "phase_id": "string",
1121
+ "task_type": "MANUAL",
1122
+ "loop_config": {}
1123
+ }
1124
+ ],
1125
+ "edges": [
1126
+ {
1127
+ "id": "string",
1128
+ "from_id": "string",
1129
+ "to_id": "string",
1130
+ "condition_id": "abc123",
1131
+ "none_met": true
1132
+ }
1133
+ ],
1134
+ "_execution_chain": {
1135
+ "parent_execution_id": "string",
1136
+ "parent_task_id": "string",
1137
+ "depth": 0
1138
+ },
1139
+ "closing_reason": {
1140
+ "selected_reasons": [
1141
+ {}
1142
+ ],
1143
+ "configured_reasons": [
1144
+ {}
1145
+ ],
1146
+ "extra_description": "string"
1147
+ },
1148
+ "available_in_ecp": true,
1149
+ "entity_sync": [
1150
+ {
1151
+ "trigger": {},
1152
+ "target": {},
1153
+ "value": {}
1154
+ }
1155
+ ],
1156
+ "taxonomies": ["string"],
1157
+ "trigger": {
1158
+ "type": "MANUAL",
1159
+ "automation_config": {
1160
+ "flow_id": "string",
1161
+ "execution_id": "string",
1162
+ "execution_status": "string",
1163
+ "error_reason": "string"
1164
+ }
1165
+ },
1166
+ "singleClosingReasonSelection": true
1167
+ }
1168
+ ```
1169
+
1170
+ </details>
1171
+
1172
+ ---
1173
+
1174
+ ### `deleteFlowExecution`
1175
+
1176
+ Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.
1177
+
1178
+ `DELETE /v2/flows/executions/{execution_id}`
1179
+
1180
+ ```ts
1181
+ const { data } = await client.deleteFlowExecution({
1182
+ execution_id: 'example',
1183
+ soft: true,
1184
+ })
1185
+ ```
1186
+
1187
+ ---
1188
+
1189
+ ### `searchFlowExecutions`
1190
+
1191
+ Search Flow Executions for a specific Entity.
1192
+
1193
+ `POST /v2/flows/executions:search`
1194
+
1195
+ ```ts
1196
+ const { data } = await client.searchFlowExecutions(
1197
+ null,
1198
+ {
1199
+ entity_id: 'string',
1200
+ entity_schema: 'string'
1201
+ },
1202
+ )
1203
+ ```
1204
+
1205
+ <details>
1206
+ <summary>Response</summary>
1207
+
1208
+ ```json
1209
+ {
1210
+ "results": [
1211
+ {
1212
+ "id": "string",
1213
+ "flow_template_id": "string",
1214
+ "org_id": "string",
1215
+ "name": "string",
1216
+ "created_at": "string",
1217
+ "updated_at": "string",
1218
+ "due_date": "string",
1219
+ "due_date_config": {},
1220
+ "status": "STARTED",
1221
+ "assigned_to": ["string"],
1222
+ "analytics": {},
1223
+ "contexts": [],
1224
+ "crt_tasks": [],
1225
+ "phases": [],
1226
+ "tasks": [],
1227
+ "edges": [],
1228
+ "_execution_chain": {},
1229
+ "closing_reason": {},
1230
+ "available_in_ecp": true,
1231
+ "entity_sync": [],
1232
+ "taxonomies": ["string"],
1233
+ "trigger": {},
1234
+ "singleClosingReasonSelection": true
1235
+ }
1236
+ ]
1237
+ }
1238
+ ```
1239
+
1240
+ </details>
1241
+
1242
+ ---
1243
+
1244
+ ### `patchTask`
1245
+
1246
+ Changes various attributes of a flow task, like assignees, status, due date, etc.
1247
+
1248
+ `PATCH /v2/flows/executions/{execution_id}/tasks/{task_id}`
1249
+
1250
+ ```ts
1251
+ const { data } = await client.patchTask(
1252
+ {
1253
+ execution_id: 'example',
1254
+ task_id: 'example',
1255
+ },
1256
+ {
1257
+ name: 'string',
1258
+ status: 'UNASSIGNED',
1259
+ due_date: '2021-04-27T12:00:00.000Z',
1260
+ due_date_config: {
1261
+ duration: 0,
1262
+ unit: 'minutes',
1263
+ type: 'WORKFLOW_STARTED',
1264
+ task_id: 'string',
1265
+ phase_id: 'string'
1266
+ },
1267
+ assigned_to: ['string'],
1268
+ enabled: true,
1269
+ automation_config: {
1270
+ flow_id: 'string',
1271
+ execution_id: 'string',
1272
+ execution_status: 'string',
1273
+ error_reason: 'string'
1274
+ },
1275
+ description: {
1276
+ enabled: true,
1277
+ value: 'string'
1278
+ },
1279
+ ecp: {
1280
+ enabled: true,
1281
+ label: 'string',
1282
+ description: 'string',
1283
+ journey: {
1284
+ id: 'string',
1285
+ journeyId: 'string',
1286
+ name: 'string',
1287
+ complete_task_automatically: true
1288
+ }
1289
+ },
1290
+ installer: {
1291
+ enabled: true,
1292
+ label: 'string',
1293
+ description: 'string',
1294
+ journey: {
1295
+ id: 'string',
1296
+ journeyId: 'string',
1297
+ name: 'string',
1298
+ complete_task_automatically: true
1299
+ }
1300
+ },
1301
+ next_condition_id: 'string',
1302
+ revert_execution: false
1303
+ },
1304
+ )
1305
+ ```
1306
+
1307
+ <details>
1308
+ <summary>Response</summary>
1309
+
1310
+ ```json
1311
+ {
1312
+ "id": "string",
1313
+ "template_id": "string",
1314
+ "name": "string",
1315
+ "description": {
1316
+ "enabled": true,
1317
+ "value": "string"
1318
+ },
1319
+ "status": "UNASSIGNED",
1320
+ "journey": {
1321
+ "id": "string",
1322
+ "journeyId": "string",
1323
+ "name": "string",
1324
+ "complete_task_automatically": true
1325
+ },
1326
+ "due_date": "2021-04-27T12:00:00.000Z",
1327
+ "due_date_config": {
1328
+ "duration": 0,
1329
+ "unit": "minutes",
1330
+ "type": "WORKFLOW_STARTED",
1331
+ "task_id": "string",
1332
+ "phase_id": "string"
1333
+ },
1334
+ "requirements": [
1335
+ {
1336
+ "task_id": "string",
1337
+ "phase_id": "string",
1338
+ "when": "TASK_FINISHED"
1339
+ }
1340
+ ],
1341
+ "assigned_to": ["string"],
1342
+ "analytics": {
1343
+ "started_at": "1970-01-01T00:00:00.000Z",
1344
+ "in_progress_at": "1970-01-01T00:00:00.000Z",
1345
+ "completed_at": "1970-01-01T00:00:00.000Z",
1346
+ "status_updated_at": "1970-01-01T00:00:00.000Z",
1347
+ "in_progress_by": "string",
1348
+ "completed_by": "string",
1349
+ "skipped_by": "string",
1350
+ "on_hold_by": "string"
1351
+ },
1352
+ "created_at": "1970-01-01T00:00:00.000Z",
1353
+ "updated_at": "1970-01-01T00:00:00.000Z",
1354
+ "manually_created": true,
1355
+ "enabled": true,
1356
+ "ecp": {
1357
+ "enabled": true,
1358
+ "label": "string",
1359
+ "description": "string",
1360
+ "journey": {
1361
+ "id": "string",
1362
+ "journeyId": "string",
1363
+ "name": "string",
1364
+ "complete_task_automatically": true
1365
+ }
1366
+ },
1367
+ "installer": {
1368
+ "enabled": true,
1369
+ "label": "string",
1370
+ "description": "string",
1371
+ "journey": {
1372
+ "id": "string",
1373
+ "journeyId": "string",
1374
+ "name": "string",
1375
+ "complete_task_automatically": true
1376
+ }
1377
+ },
1378
+ "taxonomies": ["string"],
1379
+ "phase_id": "string",
1380
+ "task_type": "MANUAL",
1381
+ "loop_config": {
1382
+ "max_iterations": 3,
1383
+ "crt_iterations": 0
1384
+ }
1385
+ }
1386
+ ```
1387
+
1388
+ </details>
1389
+
1390
+ ---
1391
+
1392
+ ### `runTaskAutomation`
1393
+
1394
+ Runs configured automation for a flow task
1395
+
1396
+ `POST /v2/flows/executions/{execution_id}/tasks/{task_id}/automation:run`
1397
+
1398
+ ```ts
1399
+ const { data } = await client.runTaskAutomation({
1400
+ execution_id: 'example',
1401
+ task_id: 'example',
1402
+ })
1403
+ ```
1404
+
1405
+ <details>
1406
+ <summary>Response</summary>
1407
+
1408
+ ```json
1409
+ {
1410
+ "id": "string",
1411
+ "template_id": "string",
1412
+ "name": "string",
1413
+ "description": {
1414
+ "enabled": true,
1415
+ "value": "string"
1416
+ },
1417
+ "status": "UNASSIGNED",
1418
+ "journey": {
1419
+ "id": "string",
1420
+ "journeyId": "string",
1421
+ "name": "string",
1422
+ "complete_task_automatically": true
1423
+ },
1424
+ "due_date": "2021-04-27T12:00:00.000Z",
1425
+ "due_date_config": {
1426
+ "duration": 0,
1427
+ "unit": "minutes",
1428
+ "type": "WORKFLOW_STARTED",
1429
+ "task_id": "string",
1430
+ "phase_id": "string"
1431
+ },
1432
+ "requirements": [
1433
+ {
1434
+ "task_id": "string",
1435
+ "phase_id": "string",
1436
+ "when": "TASK_FINISHED"
1437
+ }
1438
+ ],
1439
+ "assigned_to": ["string"],
1440
+ "analytics": {
1441
+ "started_at": "1970-01-01T00:00:00.000Z",
1442
+ "in_progress_at": "1970-01-01T00:00:00.000Z",
1443
+ "completed_at": "1970-01-01T00:00:00.000Z",
1444
+ "status_updated_at": "1970-01-01T00:00:00.000Z",
1445
+ "in_progress_by": "string",
1446
+ "completed_by": "string",
1447
+ "skipped_by": "string",
1448
+ "on_hold_by": "string"
1449
+ },
1450
+ "created_at": "1970-01-01T00:00:00.000Z",
1451
+ "updated_at": "1970-01-01T00:00:00.000Z",
1452
+ "manually_created": true,
1453
+ "enabled": true,
1454
+ "ecp": {
1455
+ "enabled": true,
1456
+ "label": "string",
1457
+ "description": "string",
1458
+ "journey": {
1459
+ "id": "string",
1460
+ "journeyId": "string",
1461
+ "name": "string",
1462
+ "complete_task_automatically": true
1463
+ }
1464
+ },
1465
+ "installer": {
1466
+ "enabled": true,
1467
+ "label": "string",
1468
+ "description": "string",
1469
+ "journey": {
1470
+ "id": "string",
1471
+ "journeyId": "string",
1472
+ "name": "string",
1473
+ "complete_task_automatically": true
1474
+ }
1475
+ },
1476
+ "taxonomies": ["string"],
1477
+ "phase_id": "string",
1478
+ "task_type": "MANUAL",
1479
+ "automation_config": {
1480
+ "flow_id": "string",
1481
+ "execution_id": "string",
1482
+ "execution_status": "string",
1483
+ "error_reason": "string"
1484
+ },
1485
+ "automation_execution_id": "string",
1486
+ "trigger_mode": "manual",
1487
+ "schedule": {
1488
+ "mode": "immediate"
1489
+ },
1490
+ "loop_config": {
1491
+ "max_iterations": 3,
1492
+ "crt_iterations": 0
1493
+ }
1494
+ }
1495
+ ```
1496
+
1497
+ </details>
1498
+
1499
+ ---
1500
+
1501
+ ### `executeTask`
1502
+
1503
+ Executes any kind of flow task immediately.
1504
+
1505
+ `POST /v2/flows/executions/{execution_id}/tasks/{task_id}/execute`
1506
+
1507
+ ```ts
1508
+ const { data } = await client.executeTask({
1509
+ execution_id: 'example',
1510
+ task_id: 'example',
1511
+ })
1512
+ ```
1513
+
1514
+ <details>
1515
+ <summary>Response</summary>
1516
+
1517
+ ```json
1518
+ {
1519
+ "id": "string",
1520
+ "template_id": "string",
1521
+ "name": "string",
1522
+ "description": {
1523
+ "enabled": true,
1524
+ "value": "string"
1525
+ },
1526
+ "status": "UNASSIGNED",
1527
+ "journey": {
1528
+ "id": "string",
1529
+ "journeyId": "string",
1530
+ "name": "string",
1531
+ "complete_task_automatically": true
1532
+ },
1533
+ "due_date": "2021-04-27T12:00:00.000Z",
1534
+ "due_date_config": {
1535
+ "duration": 0,
1536
+ "unit": "minutes",
1537
+ "type": "WORKFLOW_STARTED",
1538
+ "task_id": "string",
1539
+ "phase_id": "string"
1540
+ },
1541
+ "requirements": [
1542
+ {
1543
+ "task_id": "string",
1544
+ "phase_id": "string",
1545
+ "when": "TASK_FINISHED"
1546
+ }
1547
+ ],
1548
+ "assigned_to": ["string"],
1549
+ "analytics": {
1550
+ "started_at": "1970-01-01T00:00:00.000Z",
1551
+ "in_progress_at": "1970-01-01T00:00:00.000Z",
1552
+ "completed_at": "1970-01-01T00:00:00.000Z",
1553
+ "status_updated_at": "1970-01-01T00:00:00.000Z",
1554
+ "in_progress_by": "string",
1555
+ "completed_by": "string",
1556
+ "skipped_by": "string",
1557
+ "on_hold_by": "string"
1558
+ },
1559
+ "created_at": "1970-01-01T00:00:00.000Z",
1560
+ "updated_at": "1970-01-01T00:00:00.000Z",
1561
+ "manually_created": true,
1562
+ "enabled": true,
1563
+ "ecp": {
1564
+ "enabled": true,
1565
+ "label": "string",
1566
+ "description": "string",
1567
+ "journey": {
1568
+ "id": "string",
1569
+ "journeyId": "string",
1570
+ "name": "string",
1571
+ "complete_task_automatically": true
1572
+ }
1573
+ },
1574
+ "installer": {
1575
+ "enabled": true,
1576
+ "label": "string",
1577
+ "description": "string",
1578
+ "journey": {
1579
+ "id": "string",
1580
+ "journeyId": "string",
1581
+ "name": "string",
1582
+ "complete_task_automatically": true
1583
+ }
1584
+ },
1585
+ "taxonomies": ["string"],
1586
+ "phase_id": "string",
1587
+ "task_type": "MANUAL",
1588
+ "loop_config": {
1589
+ "max_iterations": 3,
1590
+ "crt_iterations": 0
1591
+ }
1592
+ }
1593
+ ```
1594
+
1595
+ </details>
1596
+
1597
+ ---
1598
+
1599
+ ### `patchPhase`
1600
+
1601
+ Apply updates to a phase within flow execution
1602
+
1603
+ `PATCH /v2/flows/executions/{execution_id}/phases/{phase_id}`
1604
+
1605
+ ```ts
1606
+ const { data } = await client.patchPhase(
1607
+ {
1608
+ execution_id: 'example',
1609
+ phase_id: 'example',
1610
+ },
1611
+ {
1612
+ name: 'string',
1613
+ due_date: '2021-04-27T12:00:00.000Z',
1614
+ due_date_config: {
1615
+ duration: 0,
1616
+ unit: 'minutes',
1617
+ type: 'WORKFLOW_STARTED',
1618
+ task_id: 'string',
1619
+ phase_id: 'string'
1620
+ },
1621
+ assigned_to: ['string']
1622
+ },
1623
+ )
1624
+ ```
1625
+
1626
+ <details>
1627
+ <summary>Response</summary>
1628
+
1629
+ ```json
1630
+ {
1631
+ "id": "string",
1632
+ "template_id": "string",
1633
+ "name": "string",
1634
+ "status": "OPEN",
1635
+ "updated_at": "string",
1636
+ "due_date": "2021-04-27T12:00:00.000Z",
1637
+ "due_date_config": {
1638
+ "duration": 0,
1639
+ "unit": "minutes",
1640
+ "type": "WORKFLOW_STARTED",
1641
+ "task_id": "string",
1642
+ "phase_id": "string"
1643
+ },
1644
+ "assigned_to": ["string"],
1645
+ "analytics": {
1646
+ "started_at": "1970-01-01T00:00:00.000Z",
1647
+ "in_progress_at": "1970-01-01T00:00:00.000Z",
1648
+ "completed_at": "1970-01-01T00:00:00.000Z",
1649
+ "status_updated_at": "1970-01-01T00:00:00.000Z",
1650
+ "in_progress_by": "string",
1651
+ "completed_by": "string",
1652
+ "skipped_by": "string",
1653
+ "on_hold_by": "string"
1654
+ },
1655
+ "taxonomies": ["string"],
1656
+ "loop_config": {
1657
+ "max_iterations": 3,
1658
+ "crt_iterations": 0
1659
+ }
1660
+ }
1661
+ ```
1662
+
1663
+ </details>
1664
+
1665
+ ---
1666
+
1667
+ ### `addTask`
1668
+
1669
+ Create a new task in current workflow execution.
1670
+
1671
+ `POST /v2/flows/executions/{execution_id}/tasks`
1672
+
1673
+ ```ts
1674
+ const { data } = await client.addTask(
1675
+ {
1676
+ execution_id: 'example',
1677
+ },
1678
+ {
1679
+ previous_task_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
1680
+ next_task_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
1681
+ task: {
1682
+ id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
1683
+ name: 'string',
1684
+ status: 'UNASSIGNED',
1685
+ due_date: '2021-04-27T12:00:00.000Z',
1686
+ due_date_config: {
1687
+ duration: 0,
1688
+ unit: 'minutes',
1689
+ type: 'WORKFLOW_STARTED',
1690
+ task_id: 'string',
1691
+ phase_id: 'string'
1692
+ },
1693
+ assigned_to: ['string'],
1694
+ enabled: true,
1695
+ automation_config: {
1696
+ flow_id: 'string',
1697
+ execution_id: 'string',
1698
+ execution_status: 'string',
1699
+ error_reason: 'string'
1700
+ },
1701
+ phase_id: 'string',
1702
+ task_type: 'MANUAL'
1703
+ }
1704
+ },
1705
+ )
1706
+ ```
1707
+
1708
+ <details>
1709
+ <summary>Response</summary>
1710
+
1711
+ ```json
1712
+ {
1713
+ "id": "string",
1714
+ "template_id": "string",
1715
+ "name": "string",
1716
+ "description": {
1717
+ "enabled": true,
1718
+ "value": "string"
1719
+ },
1720
+ "status": "UNASSIGNED",
1721
+ "journey": {
1722
+ "id": "string",
1723
+ "journeyId": "string",
1724
+ "name": "string",
1725
+ "complete_task_automatically": true
1726
+ },
1727
+ "due_date": "2021-04-27T12:00:00.000Z",
1728
+ "due_date_config": {
1729
+ "duration": 0,
1730
+ "unit": "minutes",
1731
+ "type": "WORKFLOW_STARTED",
1732
+ "task_id": "string",
1733
+ "phase_id": "string"
1734
+ },
1735
+ "requirements": [
1736
+ {
1737
+ "task_id": "string",
1738
+ "phase_id": "string",
1739
+ "when": "TASK_FINISHED"
1740
+ }
1741
+ ],
1742
+ "assigned_to": ["string"],
1743
+ "analytics": {
1744
+ "started_at": "1970-01-01T00:00:00.000Z",
1745
+ "in_progress_at": "1970-01-01T00:00:00.000Z",
1746
+ "completed_at": "1970-01-01T00:00:00.000Z",
1747
+ "status_updated_at": "1970-01-01T00:00:00.000Z",
1748
+ "in_progress_by": "string",
1749
+ "completed_by": "string",
1750
+ "skipped_by": "string",
1751
+ "on_hold_by": "string"
1752
+ },
1753
+ "created_at": "1970-01-01T00:00:00.000Z",
1754
+ "updated_at": "1970-01-01T00:00:00.000Z",
1755
+ "manually_created": true,
1756
+ "enabled": true,
1757
+ "ecp": {
1758
+ "enabled": true,
1759
+ "label": "string",
1760
+ "description": "string",
1761
+ "journey": {
1762
+ "id": "string",
1763
+ "journeyId": "string",
1764
+ "name": "string",
1765
+ "complete_task_automatically": true
1766
+ }
1767
+ },
1768
+ "installer": {
1769
+ "enabled": true,
1770
+ "label": "string",
1771
+ "description": "string",
1772
+ "journey": {
1773
+ "id": "string",
1774
+ "journeyId": "string",
1775
+ "name": "string",
1776
+ "complete_task_automatically": true
1777
+ }
1778
+ },
1779
+ "taxonomies": ["string"],
1780
+ "phase_id": "string",
1781
+ "task_type": "MANUAL",
1782
+ "loop_config": {
1783
+ "max_iterations": 3,
1784
+ "crt_iterations": 0
1785
+ }
1786
+ }
1787
+ ```
1788
+
1789
+ </details>
1790
+
1791
+ ---
1792
+
1793
+ ### `cancelTaskSchedule`
1794
+
1795
+ Cancels a scheduled task, deleting the schedule and marking the task as skipped.
1796
+
1797
+ `DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule`
1798
+
1799
+ ```ts
1800
+ const { data } = await client.cancelTaskSchedule({
1801
+ execution_id: 'example',
1802
+ task_id: 'example',
1803
+ })
1804
+ ```
1805
+
1806
+ ---
1807
+
1808
+ ## Schemas
1809
+
1810
+ ### `WorkflowExecutionCreateReq`
1811
+
1812
+ ```ts
1813
+ type WorkflowExecutionCreateReq = {
1814
+ workflowId: string
1815
+ trigger?: "MANUAL" | "AUTOMATIC"
1816
+ assignedTo?: string[]
1817
+ contexts?: Array<{
1818
+ id: string
1819
+ title: string
1820
+ schema: string
1821
+ }>
1822
+ purposes?: string[]
1823
+ }
1824
+ ```
1825
+
1826
+ ### `WorkflowExecutionUpdateReq`
1827
+
1828
+ ```ts
1829
+ type WorkflowExecutionUpdateReq = {
1830
+ status?: "STARTED" | "DONE" | "CLOSED"
1831
+ assignedTo?: string[]
1832
+ selectedClosingReasons?: Array<{
1833
+ id: string
1834
+ title: string
1835
+ }>
1836
+ closingReasonDescription?: string
1837
+ dueDate?: string
1838
+ dynamicDueDate?: {
1839
+ numberOfUnits: number
1840
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
1841
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
1842
+ stepId?: string
1843
+ phaseId?: string
1844
+ }
1845
+ closedBy?: string
1846
+ contexts?: Array<{
1847
+ id: string
1848
+ title: string
1849
+ schema: string
1850
+ }>
1851
+ completedTime?: string
1852
+ }
1853
+ ```
1854
+
1855
+ ### `ClosingReason`
1856
+
1857
+ ```ts
1858
+ type ClosingReason = {
1859
+ id: string
1860
+ title: string
1861
+ }
1862
+ ```
1863
+
1864
+ ### `WorkflowContext`
1865
+
1866
+ ```ts
1867
+ type WorkflowContext = {
1868
+ id: string
1869
+ title: string
1870
+ schema: string
1871
+ }
1872
+ ```
1873
+
1874
+ ### `WorkflowExecutionBase`
1875
+
1876
+ ```ts
1877
+ type WorkflowExecutionBase = {
1878
+ id?: string
1879
+ definitionId?: string
1880
+ orgId?: string
1881
+ name?: string
1882
+ creationTime?: string
1883
+ lastUpdateTime?: string
1884
+ dueDate?: string
1885
+ completedTime?: string
1886
+ dynamicDueDate?: {
1887
+ numberOfUnits: number
1888
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
1889
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
1890
+ stepId?: string
1891
+ phaseId?: string
1892
+ }
1893
+ status?: "STARTED" | "DONE" | "CLOSED"
1894
+ trigger?: "MANUAL" | "AUTOMATIC"
1895
+ assignedTo?: string[]
1896
+ lastModifiedBy?: string
1897
+ contexts?: Array<{
1898
+ id: string
1899
+ title: string
1900
+ schema: string
1901
+ }>
1902
+ nextOpenStep?: {
1903
+ id?: string
1904
+ entityRefId?: string
1905
+ }
1906
+ configuredClosingReasonSnapshot?: Array<{
1907
+ id: string
1908
+ title: string
1909
+ }>
1910
+ selectedClosingReasons?: Array<{
1911
+ id: string
1912
+ title: string
1913
+ }>
1914
+ closingReasonDescription?: string
1915
+ enableECPWorkflow?: boolean
1916
+ updateEntityAttributes?: Array<{
1917
+ source: "workflow_status" | "current_section" | "current_step"
1918
+ target: {
1919
+ entitySchema: { ... }
1920
+ entityAttribute: { ... }
1921
+ }
1922
+ }>
1923
+ version?: number
1924
+ taxonomies?: string[]
1925
+ singleClosingReasonSelection?: boolean
1926
+ }
1927
+ ```
1928
+
1929
+ ### `WorkflowExecutionSlim`
1930
+
1931
+ ```ts
1932
+ type WorkflowExecutionSlim = {
1933
+ id?: string
1934
+ definitionId?: string
1935
+ orgId?: string
1936
+ name?: string
1937
+ creationTime?: string
1938
+ lastUpdateTime?: string
1939
+ dueDate?: string
1940
+ completedTime?: string
1941
+ dynamicDueDate?: {
1942
+ numberOfUnits: number
1943
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
1944
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
1945
+ stepId?: string
1946
+ phaseId?: string
1947
+ }
1948
+ status?: "STARTED" | "DONE" | "CLOSED"
1949
+ trigger?: "MANUAL" | "AUTOMATIC"
1950
+ assignedTo?: string[]
1951
+ lastModifiedBy?: string
1952
+ contexts?: Array<{
1953
+ id: string
1954
+ title: string
1955
+ schema: string
1956
+ }>
1957
+ nextOpenStep?: {
1958
+ id?: string
1959
+ entityRefId?: string
1960
+ }
1961
+ configuredClosingReasonSnapshot?: Array<{
1962
+ id: string
1963
+ title: string
1964
+ }>
1965
+ selectedClosingReasons?: Array<{
1966
+ id: string
1967
+ title: string
1968
+ }>
1969
+ closingReasonDescription?: string
1970
+ enableECPWorkflow?: boolean
1971
+ updateEntityAttributes?: Array<{
1972
+ source: "workflow_status" | "current_section" | "current_step"
1973
+ target: {
1974
+ entitySchema: { ... }
1975
+ entityAttribute: { ... }
1976
+ }
1977
+ }>
1978
+ version?: number
1979
+ taxonomies?: string[]
1980
+ singleClosingReasonSelection?: boolean
1981
+ flow: Array<{
1982
+ id: string
1983
+ definitionId?: string
1984
+ name: string
1985
+ userIds?: number[]
1986
+ assignedTo?: string[]
1987
+ dueDate?: string
1988
+ dynamicDueDate?: {
1989
+ numberOfUnits: { ... }
1990
+ timePeriod: { ... }
1991
+ actionTypeCondition?: { ... }
1992
+ stepId?: { ... }
1993
+ phaseId?: { ... }
1994
+ }
1995
+ startedTime?: string
1996
+ completedTime?: string
1997
+ status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"
1998
+ type: "STEP" | "SECTION"
1999
+ steps: Array<{
2000
+ id: { ... }
2001
+ definitionId?: { ... }
2002
+ entityRefId?: { ... }
2003
+ name: { ... }
2004
+ description?: { ... }
2005
+ type: { ... }
2006
+ ecp?: { ... }
2007
+ installer?: { ... }
2008
+ enabled?: { ... }
2009
+ requirements?: { ... }
2010
+ executionType?: { ... }
2011
+ sectionId?: { ... }
2012
+ executionId?: { ... }
2013
+ userIds?: { ... }
2014
+ assignedTo?: { ... }
2015
+ assignedToInProgress?: { ... }
2016
+ assignedToOnHold?: { ... }
2017
+ status?: { ... }
2018
+ created?: { ... }
2019
+ lastUpdated?: { ... }
2020
+ statusLastUpdated?: { ... }
2021
+ startedTime?: { ... }
2022
+ completedTime?: { ... }
2023
+ dueDate?: { ... }
2024
+ dynamicDueDate?: { ... }
2025
+ manuallyCreated?: { ... }
2026
+ automationConfig?: { ... }
2027
+ journey?: { ... }
2028
+ taxonomies?: { ... }
2029
+ }>
2030
+ taxonomies?: string[]
2031
+ } | {
2032
+ // ...
2033
+ }
2034
+ ```
2035
+
2036
+ ### `FlowSlim`
2037
+
2038
+ ```ts
2039
+ type FlowSlim = {
2040
+ flow: Array<{
2041
+ id: string
2042
+ definitionId?: string
2043
+ name: string
2044
+ userIds?: number[]
2045
+ assignedTo?: string[]
2046
+ dueDate?: string
2047
+ dynamicDueDate?: {
2048
+ numberOfUnits: { ... }
2049
+ timePeriod: { ... }
2050
+ actionTypeCondition?: { ... }
2051
+ stepId?: { ... }
2052
+ phaseId?: { ... }
2053
+ }
2054
+ startedTime?: string
2055
+ completedTime?: string
2056
+ status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"
2057
+ type: "STEP" | "SECTION"
2058
+ steps: Array<{
2059
+ id: { ... }
2060
+ definitionId?: { ... }
2061
+ entityRefId?: { ... }
2062
+ name: { ... }
2063
+ description?: { ... }
2064
+ type: { ... }
2065
+ ecp?: { ... }
2066
+ installer?: { ... }
2067
+ enabled?: { ... }
2068
+ requirements?: { ... }
2069
+ executionType?: { ... }
2070
+ sectionId?: { ... }
2071
+ executionId?: { ... }
2072
+ userIds?: { ... }
2073
+ assignedTo?: { ... }
2074
+ assignedToInProgress?: { ... }
2075
+ assignedToOnHold?: { ... }
2076
+ status?: { ... }
2077
+ created?: { ... }
2078
+ lastUpdated?: { ... }
2079
+ statusLastUpdated?: { ... }
2080
+ startedTime?: { ... }
2081
+ completedTime?: { ... }
2082
+ dueDate?: { ... }
2083
+ dynamicDueDate?: { ... }
2084
+ manuallyCreated?: { ... }
2085
+ automationConfig?: { ... }
2086
+ journey?: { ... }
2087
+ taxonomies?: { ... }
2088
+ }>
2089
+ taxonomies?: string[]
2090
+ } | {
2091
+ id: string
2092
+ definitionId?: string
2093
+ entityRefId?: string
2094
+ name: string
2095
+ description?: {
2096
+ enabled?: { ... }
2097
+ value?: { ... }
2098
+ }
2099
+ type: "STEP" | "SECTION"
2100
+ ecp?: {
2101
+ enabled?: { ... }
2102
+ label?: { ... }
2103
+ description?: { ... }
2104
+ journey?: { ... }
2105
+ }
2106
+ installer?: {
2107
+ enabled?: { ... }
2108
+ label?: { ... }
2109
+ description?: { ... }
2110
+ journey?: { ... }
2111
+ }
2112
+ enabled?: boolean
2113
+ requirements?: Array<{
2114
+ definitionId: { ... }
2115
+ type: { ... }
2116
+ condition: { ... }
2117
+ }>
2118
+ executionType?: "MANUAL" | "AUTOMATION"
2119
+ sectionId?: string
2120
+ executionId?: string
2121
+ userIds?: number[]
2122
+ assignedTo?: string[]
2123
+ assignedToInProgress?: string
2124
+ assignedToOnHold?: string
2125
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2126
+ created?: string
2127
+ lastUpdated?: string
2128
+ statusLastUpdated?: string
2129
+ startedTime?: string
2130
+ completedTime?: string
2131
+ dueDate?: string
2132
+ dynamicDueDate?: {
2133
+ numberOfUnits: { ... }
2134
+ timePeriod: { ... }
2135
+ actionTypeCondition?: { ... }
2136
+ stepId?: { ... }
2137
+ phaseId?: { ... }
2138
+ }
2139
+ // ...
2140
+ }
2141
+ ```
2142
+
2143
+ ### `Flow`
2144
+
2145
+ ```ts
2146
+ type Flow = {
2147
+ flow: Array<{
2148
+ id: string
2149
+ definitionId?: string
2150
+ name: string
2151
+ userIds?: number[]
2152
+ assignedTo?: string[]
2153
+ dueDate?: string
2154
+ dynamicDueDate?: {
2155
+ numberOfUnits: { ... }
2156
+ timePeriod: { ... }
2157
+ actionTypeCondition?: { ... }
2158
+ stepId?: { ... }
2159
+ phaseId?: { ... }
2160
+ }
2161
+ startedTime?: string
2162
+ completedTime?: string
2163
+ status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"
2164
+ type: "STEP" | "SECTION"
2165
+ steps: Array<{
2166
+ id: { ... }
2167
+ definitionId?: { ... }
2168
+ entityRefId?: { ... }
2169
+ name: { ... }
2170
+ description?: { ... }
2171
+ type: { ... }
2172
+ ecp?: { ... }
2173
+ installer?: { ... }
2174
+ enabled?: { ... }
2175
+ requirements?: { ... }
2176
+ executionType?: { ... }
2177
+ sectionId?: { ... }
2178
+ executionId?: { ... }
2179
+ userIds?: { ... }
2180
+ assignedTo?: { ... }
2181
+ assignedToInProgress?: { ... }
2182
+ assignedToOnHold?: { ... }
2183
+ status?: { ... }
2184
+ created?: { ... }
2185
+ lastUpdated?: { ... }
2186
+ statusLastUpdated?: { ... }
2187
+ startedTime?: { ... }
2188
+ completedTime?: { ... }
2189
+ dueDate?: { ... }
2190
+ dynamicDueDate?: { ... }
2191
+ manuallyCreated?: { ... }
2192
+ automationConfig?: { ... }
2193
+ journey?: { ... }
2194
+ taxonomies?: { ... }
2195
+ }>
2196
+ taxonomies?: string[]
2197
+ } | {
2198
+ id: string
2199
+ definitionId?: string
2200
+ entityRefId?: string
2201
+ name: string
2202
+ description?: {
2203
+ enabled?: { ... }
2204
+ value?: { ... }
2205
+ }
2206
+ type: "STEP" | "SECTION"
2207
+ ecp?: {
2208
+ enabled?: { ... }
2209
+ label?: { ... }
2210
+ description?: { ... }
2211
+ journey?: { ... }
2212
+ }
2213
+ installer?: {
2214
+ enabled?: { ... }
2215
+ label?: { ... }
2216
+ description?: { ... }
2217
+ journey?: { ... }
2218
+ }
2219
+ enabled?: boolean
2220
+ requirements?: Array<{
2221
+ definitionId: { ... }
2222
+ type: { ... }
2223
+ condition: { ... }
2224
+ }>
2225
+ executionType?: "MANUAL" | "AUTOMATION"
2226
+ sectionId?: string
2227
+ executionId?: string
2228
+ userIds?: number[]
2229
+ assignedTo?: string[]
2230
+ assignedToInProgress?: string
2231
+ assignedToOnHold?: string
2232
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2233
+ created?: string
2234
+ lastUpdated?: string
2235
+ statusLastUpdated?: string
2236
+ startedTime?: string
2237
+ completedTime?: string
2238
+ dueDate?: string
2239
+ dynamicDueDate?: {
2240
+ numberOfUnits: { ... }
2241
+ timePeriod: { ... }
2242
+ actionTypeCondition?: { ... }
2243
+ stepId?: { ... }
2244
+ phaseId?: { ... }
2245
+ }
2246
+ // ...
2247
+ }
2248
+ ```
2249
+
2250
+ ### `WorkflowExecution`
2251
+
2252
+ ```ts
2253
+ type WorkflowExecution = {
2254
+ id?: string
2255
+ definitionId?: string
2256
+ orgId?: string
2257
+ name?: string
2258
+ creationTime?: string
2259
+ lastUpdateTime?: string
2260
+ dueDate?: string
2261
+ completedTime?: string
2262
+ dynamicDueDate?: {
2263
+ numberOfUnits: number
2264
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
2265
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
2266
+ stepId?: string
2267
+ phaseId?: string
2268
+ }
2269
+ status?: "STARTED" | "DONE" | "CLOSED"
2270
+ trigger?: "MANUAL" | "AUTOMATIC"
2271
+ assignedTo?: string[]
2272
+ lastModifiedBy?: string
2273
+ contexts?: Array<{
2274
+ id: string
2275
+ title: string
2276
+ schema: string
2277
+ }>
2278
+ nextOpenStep?: {
2279
+ id?: string
2280
+ entityRefId?: string
2281
+ }
2282
+ configuredClosingReasonSnapshot?: Array<{
2283
+ id: string
2284
+ title: string
2285
+ }>
2286
+ selectedClosingReasons?: Array<{
2287
+ id: string
2288
+ title: string
2289
+ }>
2290
+ closingReasonDescription?: string
2291
+ enableECPWorkflow?: boolean
2292
+ updateEntityAttributes?: Array<{
2293
+ source: "workflow_status" | "current_section" | "current_step"
2294
+ target: {
2295
+ entitySchema: { ... }
2296
+ entityAttribute: { ... }
2297
+ }
2298
+ }>
2299
+ version?: number
2300
+ taxonomies?: string[]
2301
+ singleClosingReasonSelection?: boolean
2302
+ flow: Array<{
2303
+ id: string
2304
+ definitionId?: string
2305
+ name: string
2306
+ userIds?: number[]
2307
+ assignedTo?: string[]
2308
+ dueDate?: string
2309
+ dynamicDueDate?: {
2310
+ numberOfUnits: { ... }
2311
+ timePeriod: { ... }
2312
+ actionTypeCondition?: { ... }
2313
+ stepId?: { ... }
2314
+ phaseId?: { ... }
2315
+ }
2316
+ startedTime?: string
2317
+ completedTime?: string
2318
+ status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"
2319
+ type: "STEP" | "SECTION"
2320
+ steps: Array<{
2321
+ id: { ... }
2322
+ definitionId?: { ... }
2323
+ entityRefId?: { ... }
2324
+ name: { ... }
2325
+ description?: { ... }
2326
+ type: { ... }
2327
+ ecp?: { ... }
2328
+ installer?: { ... }
2329
+ enabled?: { ... }
2330
+ requirements?: { ... }
2331
+ executionType?: { ... }
2332
+ sectionId?: { ... }
2333
+ executionId?: { ... }
2334
+ userIds?: { ... }
2335
+ assignedTo?: { ... }
2336
+ assignedToInProgress?: { ... }
2337
+ assignedToOnHold?: { ... }
2338
+ status?: { ... }
2339
+ created?: { ... }
2340
+ lastUpdated?: { ... }
2341
+ statusLastUpdated?: { ... }
2342
+ startedTime?: { ... }
2343
+ completedTime?: { ... }
2344
+ dueDate?: { ... }
2345
+ dynamicDueDate?: { ... }
2346
+ manuallyCreated?: { ... }
2347
+ automationConfig?: { ... }
2348
+ journey?: { ... }
2349
+ taxonomies?: { ... }
2350
+ }>
2351
+ taxonomies?: string[]
2352
+ } | {
2353
+ // ...
2354
+ }
2355
+ ```
2356
+
2357
+ ### `WorkflowStatus`
2358
+
2359
+ ```ts
2360
+ type WorkflowStatus = "STARTED" | "DONE" | "CLOSED"
2361
+ ```
2362
+
2363
+ ### `SectionSimplified`
2364
+
2365
+ A group of Steps that define the progress of the Workflow
2366
+
2367
+ ```ts
2368
+ type SectionSimplified = {
2369
+ id: string
2370
+ definitionId?: string
2371
+ name: string
2372
+ type: "STEP" | "SECTION"
2373
+ steps: Array<{
2374
+ id: string
2375
+ definitionId?: string
2376
+ entityRefId?: string
2377
+ name: string
2378
+ description?: {
2379
+ enabled?: { ... }
2380
+ value?: { ... }
2381
+ }
2382
+ type: "STEP" | "SECTION"
2383
+ ecp?: {
2384
+ enabled?: { ... }
2385
+ label?: { ... }
2386
+ description?: { ... }
2387
+ journey?: { ... }
2388
+ }
2389
+ installer?: {
2390
+ enabled?: { ... }
2391
+ label?: { ... }
2392
+ description?: { ... }
2393
+ journey?: { ... }
2394
+ }
2395
+ enabled?: boolean
2396
+ requirements?: Array<{
2397
+ definitionId: { ... }
2398
+ type: { ... }
2399
+ condition: { ... }
2400
+ }>
2401
+ executionType?: "MANUAL" | "AUTOMATION"
2402
+ }>
2403
+ assignedTo?: string[]
2404
+ }
2405
+ ```
2406
+
2407
+ ### `Section`
2408
+
2409
+ A group of Steps that define the progress of the Workflow
2410
+
2411
+ ```ts
2412
+ type Section = {
2413
+ id: string
2414
+ definitionId?: string
2415
+ name: string
2416
+ userIds?: number[]
2417
+ assignedTo?: string[]
2418
+ dueDate?: string
2419
+ dynamicDueDate?: {
2420
+ numberOfUnits: number
2421
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
2422
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
2423
+ stepId?: string
2424
+ phaseId?: string
2425
+ }
2426
+ startedTime?: string
2427
+ completedTime?: string
2428
+ status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"
2429
+ type: "STEP" | "SECTION"
2430
+ steps: Array<{
2431
+ id: string
2432
+ definitionId?: string
2433
+ entityRefId?: string
2434
+ name: string
2435
+ description?: {
2436
+ enabled?: { ... }
2437
+ value?: { ... }
2438
+ }
2439
+ type: "STEP" | "SECTION"
2440
+ ecp?: {
2441
+ enabled?: { ... }
2442
+ label?: { ... }
2443
+ description?: { ... }
2444
+ journey?: { ... }
2445
+ }
2446
+ installer?: {
2447
+ enabled?: { ... }
2448
+ label?: { ... }
2449
+ description?: { ... }
2450
+ journey?: { ... }
2451
+ }
2452
+ enabled?: boolean
2453
+ requirements?: Array<{
2454
+ definitionId: { ... }
2455
+ type: { ... }
2456
+ condition: { ... }
2457
+ }>
2458
+ executionType?: "MANUAL" | "AUTOMATION"
2459
+ sectionId?: string
2460
+ executionId?: string
2461
+ userIds?: number[]
2462
+ assignedTo?: string[]
2463
+ assignedToInProgress?: string
2464
+ assignedToOnHold?: string
2465
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2466
+ created?: string
2467
+ lastUpdated?: string
2468
+ statusLastUpdated?: string
2469
+ startedTime?: string
2470
+ completedTime?: string
2471
+ dueDate?: string
2472
+ dynamicDueDate?: {
2473
+ numberOfUnits: { ... }
2474
+ timePeriod: { ... }
2475
+ actionTypeCondition?: { ... }
2476
+ stepId?: { ... }
2477
+ phaseId?: { ... }
2478
+ }
2479
+ manuallyCreated?: boolean
2480
+ automationConfig?: {
2481
+ flowId: { ... }
2482
+ executionId?: { ... }
2483
+ executionStatus?: { ... }
2484
+ }
2485
+ journey?: {
2486
+ id?: { ... }
2487
+ journeyId?: { ... }
2488
+ name?: { ... }
2489
+ complete_task_automatically?: { ... }
2490
+ }
2491
+ taxonomies?: string[]
2492
+ }>
2493
+ taxonomies?: string[]
2494
+ }
2495
+ ```
2496
+
2497
+ ### `StepId`
2498
+
2499
+ ```ts
2500
+ type StepId = {
2501
+ id?: string
2502
+ entityRefId?: string
2503
+ }
2504
+ ```
2505
+
2506
+ ### `StepSimplified`
2507
+
2508
+ ```ts
2509
+ type StepSimplified = {
2510
+ id: string
2511
+ definitionId?: string
2512
+ entityRefId?: string
2513
+ name: string
2514
+ description?: {
2515
+ enabled?: boolean
2516
+ value?: string
2517
+ }
2518
+ type: "STEP" | "SECTION"
2519
+ ecp?: {
2520
+ enabled?: boolean
2521
+ label?: string
2522
+ description?: string
2523
+ journey?: {
2524
+ id?: { ... }
2525
+ journeyId?: { ... }
2526
+ name?: { ... }
2527
+ complete_task_automatically?: { ... }
2528
+ }
2529
+ }
2530
+ installer?: {
2531
+ enabled?: boolean
2532
+ label?: string
2533
+ description?: string
2534
+ journey?: {
2535
+ id?: { ... }
2536
+ journeyId?: { ... }
2537
+ name?: { ... }
2538
+ complete_task_automatically?: { ... }
2539
+ }
2540
+ }
2541
+ enabled?: boolean
2542
+ requirements?: Array<{
2543
+ definitionId: string
2544
+ type: "STEP" | "SECTION"
2545
+ condition: "CLOSED"
2546
+ }>
2547
+ executionType?: "MANUAL" | "AUTOMATION"
2548
+ }
2549
+ ```
2550
+
2551
+ ### `Step`
2552
+
2553
+ ```ts
2554
+ type Step = {
2555
+ id: string
2556
+ definitionId?: string
2557
+ entityRefId?: string
2558
+ name: string
2559
+ description?: {
2560
+ enabled?: boolean
2561
+ value?: string
2562
+ }
2563
+ type: "STEP" | "SECTION"
2564
+ ecp?: {
2565
+ enabled?: boolean
2566
+ label?: string
2567
+ description?: string
2568
+ journey?: {
2569
+ id?: { ... }
2570
+ journeyId?: { ... }
2571
+ name?: { ... }
2572
+ complete_task_automatically?: { ... }
2573
+ }
2574
+ }
2575
+ installer?: {
2576
+ enabled?: boolean
2577
+ label?: string
2578
+ description?: string
2579
+ journey?: {
2580
+ id?: { ... }
2581
+ journeyId?: { ... }
2582
+ name?: { ... }
2583
+ complete_task_automatically?: { ... }
2584
+ }
2585
+ }
2586
+ enabled?: boolean
2587
+ requirements?: Array<{
2588
+ definitionId: string
2589
+ type: "STEP" | "SECTION"
2590
+ condition: "CLOSED"
2591
+ }>
2592
+ executionType?: "MANUAL" | "AUTOMATION"
2593
+ sectionId?: string
2594
+ executionId?: string
2595
+ userIds?: number[]
2596
+ assignedTo?: string[]
2597
+ assignedToInProgress?: string
2598
+ assignedToOnHold?: string
2599
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2600
+ created?: string
2601
+ lastUpdated?: string
2602
+ statusLastUpdated?: string
2603
+ startedTime?: string
2604
+ completedTime?: string
2605
+ dueDate?: string
2606
+ dynamicDueDate?: {
2607
+ numberOfUnits: number
2608
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
2609
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
2610
+ stepId?: string
2611
+ phaseId?: string
2612
+ }
2613
+ manuallyCreated?: boolean
2614
+ automationConfig?: {
2615
+ flowId: string
2616
+ executionId?: string
2617
+ executionStatus?: string
2618
+ }
2619
+ journey?: {
2620
+ id?: string
2621
+ journeyId?: string
2622
+ name?: string
2623
+ complete_task_automatically?: boolean
2624
+ }
2625
+ taxonomies?: string[]
2626
+ }
2627
+ ```
2628
+
2629
+ ### `StepExtended`
2630
+
2631
+ ```ts
2632
+ type StepExtended = {
2633
+ executionId: string
2634
+ executionName: string
2635
+ executionStatus: "STARTED" | "DONE" | "CLOSED"
2636
+ contexts?: Array<{
2637
+ id: string
2638
+ title: string
2639
+ schema: string
2640
+ }>
2641
+ }
2642
+ ```
2643
+
2644
+ ### `StepStatus`
2645
+
2646
+ **Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:
2647
+ - **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)
2648
+ - **ASSIGNED**: Step has been assi
2649
+
2650
+ ```ts
2651
+ type StepStatus = "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2652
+ ```
2653
+
2654
+ ### `SectionStatus`
2655
+
2656
+ ```ts
2657
+ type SectionStatus = "OPEN" | "IN_PROGRESS" | "COMPLETED"
2658
+ ```
2659
+
2660
+ ### `StepType`
2661
+
2662
+ ```ts
2663
+ type StepType = "MANUAL" | "AUTOMATION"
2664
+ ```
2665
+
2666
+ ### `StepJourney`
2667
+
2668
+ ```ts
2669
+ type StepJourney = {
2670
+ id?: string
2671
+ journeyId?: string
2672
+ name?: string
2673
+ complete_task_automatically?: boolean
2674
+ }
2675
+ ```
2676
+
2677
+ ### `AutomationConfig`
2678
+
2679
+ Configuration for automation execution to run
2680
+
2681
+ ```ts
2682
+ type AutomationConfig = {
2683
+ flowId: string
2684
+ executionId?: string
2685
+ executionStatus?: string
2686
+ }
2687
+ ```
2688
+
2689
+ ### `ECPDetails`
2690
+
2691
+ Details regarding ECP for the workflow step
2692
+
2693
+ ```ts
2694
+ type ECPDetails = {
2695
+ enabled?: boolean
2696
+ label?: string
2697
+ description?: string
2698
+ journey?: {
2699
+ id?: string
2700
+ journeyId?: string
2701
+ name?: string
2702
+ complete_task_automatically?: boolean
2703
+ }
2704
+ }
2705
+ ```
2706
+
2707
+ ### `StepDescription`
2708
+
2709
+ Longer information regarding Task
2710
+
2711
+ ```ts
2712
+ type StepDescription = {
2713
+ enabled?: boolean
2714
+ value?: string
2715
+ }
2716
+ ```
2717
+
2718
+ ### `ItemType`
2719
+
2720
+ ```ts
2721
+ type ItemType = "STEP" | "SECTION"
2722
+ ```
2723
+
2724
+ ### `TriggerType`
2725
+
2726
+ ```ts
2727
+ type TriggerType = "MANUAL" | "AUTOMATIC"
2728
+ ```
2729
+
2730
+ ### `CreateStepReq`
2731
+
2732
+ ```ts
2733
+ type CreateStepReq = {
2734
+ insertionIndex: number
2735
+ name: string
2736
+ description?: {
2737
+ enabled: boolean
2738
+ value: string
2739
+ }
2740
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2741
+ sectionId?: string
2742
+ executionType?: "MANUAL" | "AUTOMATION"
2743
+ automationConfig?: {
2744
+ flowId: string
2745
+ executionId?: string
2746
+ executionStatus?: string
2747
+ }
2748
+ }
2749
+ ```
2750
+
2751
+ ### `UpdateStepReq`
2752
+
2753
+ ```ts
2754
+ type UpdateStepReq = {
2755
+ stepId?: string
2756
+ entityRefId?: string
2757
+ userIds?: number[]
2758
+ assignedTo?: string[]
2759
+ assignedToInProgress?: string
2760
+ assignedToOnHold?: string
2761
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2762
+ dueDate?: string
2763
+ dynamicDueDate?: {
2764
+ numberOfUnits: number
2765
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
2766
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
2767
+ stepId?: string
2768
+ phaseId?: string
2769
+ }
2770
+ name?: string
2771
+ description?: {
2772
+ enabled: boolean
2773
+ value: string
2774
+ }
2775
+ position?: {
2776
+ index: number
2777
+ sectionId?: string
2778
+ }
2779
+ automationConfig?: {
2780
+ flowId: string
2781
+ executionId?: string
2782
+ executionStatus?: string
2783
+ }
2784
+ startedTime?: string
2785
+ completedTime?: string
2786
+ }
2787
+ ```
2788
+
2789
+ ### `StepPositionAt`
2790
+
2791
+ ```ts
2792
+ type StepPositionAt = {
2793
+ index: number
2794
+ sectionId?: string
2795
+ }
2796
+ ```
2797
+
2798
+ ### `UpdateStepResp`
2799
+
2800
+ ```ts
2801
+ type UpdateStepResp = {
2802
+ id: string
2803
+ definitionId?: string
2804
+ entityRefId?: string
2805
+ name: string
2806
+ description?: {
2807
+ enabled?: boolean
2808
+ value?: string
2809
+ }
2810
+ type: "STEP" | "SECTION"
2811
+ ecp?: {
2812
+ enabled?: boolean
2813
+ label?: string
2814
+ description?: string
2815
+ journey?: {
2816
+ id?: { ... }
2817
+ journeyId?: { ... }
2818
+ name?: { ... }
2819
+ complete_task_automatically?: { ... }
2820
+ }
2821
+ }
2822
+ installer?: {
2823
+ enabled?: boolean
2824
+ label?: string
2825
+ description?: string
2826
+ journey?: {
2827
+ id?: { ... }
2828
+ journeyId?: { ... }
2829
+ name?: { ... }
2830
+ complete_task_automatically?: { ... }
2831
+ }
2832
+ }
2833
+ enabled?: boolean
2834
+ requirements?: Array<{
2835
+ definitionId: string
2836
+ type: "STEP" | "SECTION"
2837
+ condition: "CLOSED"
2838
+ }>
2839
+ executionType?: "MANUAL" | "AUTOMATION"
2840
+ sectionId?: string
2841
+ executionId?: string
2842
+ userIds?: number[]
2843
+ assignedTo?: string[]
2844
+ assignedToInProgress?: string
2845
+ assignedToOnHold?: string
2846
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
2847
+ created?: string
2848
+ lastUpdated?: string
2849
+ statusLastUpdated?: string
2850
+ startedTime?: string
2851
+ completedTime?: string
2852
+ dueDate?: string
2853
+ dynamicDueDate?: {
2854
+ numberOfUnits: number
2855
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
2856
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
2857
+ stepId?: string
2858
+ phaseId?: string
2859
+ }
2860
+ manuallyCreated?: boolean
2861
+ automationConfig?: {
2862
+ flowId: string
2863
+ executionId?: string
2864
+ executionStatus?: string
2865
+ }
2866
+ journey?: {
2867
+ id?: string
2868
+ journeyId?: string
2869
+ name?: string
2870
+ complete_task_automatically?: boolean
2871
+ }
2872
+ taxonomies?: string[]
2873
+ }
2874
+ ```
2875
+
2876
+ ### `SearchStepsResp`
2877
+
2878
+ ```ts
2879
+ type SearchStepsResp = {
2880
+ hits?: number
2881
+ results?: Array<{
2882
+ executionId: string
2883
+ executionName: string
2884
+ executionStatus: "STARTED" | "DONE" | "CLOSED"
2885
+ contexts?: Array<{
2886
+ id: { ... }
2887
+ title: { ... }
2888
+ schema: { ... }
2889
+ }>
2890
+ }>
2891
+ }
2892
+ ```
2893
+
2894
+ ### `SearchExecutionsReq`
2895
+
2896
+ ```ts
2897
+ type SearchExecutionsReq = {
2898
+ name?: string
2899
+ status?: "STARTED" | "DONE" | "CLOSED"
2900
+ includeDoneWorkflows?: boolean
2901
+ assignedTo?: string
2902
+ sorting?: "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"
2903
+ pagination?: {
2904
+ orgId?: string
2905
+ creationTime?: string
2906
+ }
2907
+ }
2908
+ ```
2909
+
2910
+ ### `SearchExecutionsResp`
2911
+
2912
+ ```ts
2913
+ type SearchExecutionsResp = {
2914
+ executions: Array<{
2915
+ id?: string
2916
+ definitionId?: string
2917
+ orgId?: string
2918
+ name?: string
2919
+ creationTime?: string
2920
+ lastUpdateTime?: string
2921
+ dueDate?: string
2922
+ completedTime?: string
2923
+ dynamicDueDate?: {
2924
+ numberOfUnits: { ... }
2925
+ timePeriod: { ... }
2926
+ actionTypeCondition?: { ... }
2927
+ stepId?: { ... }
2928
+ phaseId?: { ... }
2929
+ }
2930
+ status?: "STARTED" | "DONE" | "CLOSED"
2931
+ trigger?: "MANUAL" | "AUTOMATIC"
2932
+ assignedTo?: string[]
2933
+ lastModifiedBy?: string
2934
+ contexts?: Array<{
2935
+ id: { ... }
2936
+ title: { ... }
2937
+ schema: { ... }
2938
+ }>
2939
+ nextOpenStep?: {
2940
+ id?: { ... }
2941
+ entityRefId?: { ... }
2942
+ }
2943
+ configuredClosingReasonSnapshot?: Array<{
2944
+ id: { ... }
2945
+ title: { ... }
2946
+ }>
2947
+ selectedClosingReasons?: Array<{
2948
+ id: { ... }
2949
+ title: { ... }
2950
+ }>
2951
+ closingReasonDescription?: string
2952
+ enableECPWorkflow?: boolean
2953
+ updateEntityAttributes?: Array<{
2954
+ source: { ... }
2955
+ target: { ... }
2956
+ }>
2957
+ version?: number
2958
+ taxonomies?: string[]
2959
+ singleClosingReasonSelection?: boolean
2960
+ flow: Array<{
2961
+ id: { ... }
2962
+ definitionId?: { ... }
2963
+ name: { ... }
2964
+ userIds?: { ... }
2965
+ assignedTo?: { ... }
2966
+ dueDate?: { ... }
2967
+ dynamicDueDate?: { ... }
2968
+ startedTime?: { ... }
2969
+ completedTime?: { ... }
2970
+ status?: { ... }
2971
+ type: { ... }
2972
+ steps: { ... }
2973
+ taxonomies?: { ... }
2974
+ } | {
2975
+ id: { ... }
2976
+ definitionId?: { ... }
2977
+ entityRefId?: { ... }
2978
+ name: { ... }
2979
+ description?: { ... }
2980
+ type: { ... }
2981
+ ecp?: { ... }
2982
+ installer?: { ... }
2983
+ enabled?: { ... }
2984
+ requirements?: { ... }
2985
+ executionType?: { ... }
2986
+ sectionId?: { ... }
2987
+ executionId?: { ... }
2988
+ userIds?: { ... }
2989
+ assignedTo?: { ... }
2990
+ assignedToInProgress?: { ... }
2991
+ assignedToOnHold?: { ... }
2992
+ status?: { ... }
2993
+ created?: { ... }
2994
+ lastUpdated?: { ... }
2995
+ statusLastUpdated?: { ... }
2996
+ startedTime?: { ... }
2997
+ completedTime?: { ... }
2998
+ dueDate?: { ... }
2999
+ dynamicDueDate?: { ... }
3000
+ manuallyCreated?: { ... }
3001
+ automationConfig?: { ... }
3002
+ journey?: { ... }
3003
+ taxonomies?: { ... }
3004
+ }>
3005
+ }>
3006
+ lastEvaluatedKey?: {
3007
+ orgId?: string
3008
+ creationTime?: string
3009
+ }
3010
+ }
3011
+ ```
3012
+
3013
+ ### `LastEvaluatedKey`
3014
+
3015
+ ```ts
3016
+ type LastEvaluatedKey = {
3017
+ orgId?: string
3018
+ creationTime?: string
3019
+ }
3020
+ ```
3021
+
3022
+ ### `SearchStepsReq`
3023
+
3024
+ ```ts
3025
+ type SearchStepsReq = {
3026
+ executionName?: string
3027
+ stepName?: string
3028
+ assignedTo?: number
3029
+ includeDoneWorkflows?: boolean
3030
+ manuallyCreated?: boolean
3031
+ status?: "OPEN" | "COMPLETE" | "NEXT_OPEN_ITEM_IN_WORKFLOW"
3032
+ sorting?: "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"
3033
+ pagination?: {
3034
+ from?: number
3035
+ size?: number
3036
+ }
3037
+ }
3038
+ ```
3039
+
3040
+ ### `SearchSorting`
3041
+
3042
+ ```ts
3043
+ type SearchSorting = "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"
3044
+ ```
3045
+
3046
+ ### `SearchPagination`
3047
+
3048
+ ```ts
3049
+ type SearchPagination = {
3050
+ from?: number
3051
+ size?: number
3052
+ }
3053
+ ```
3054
+
3055
+ ### `ExecutionPaginationDynamo`
3056
+
3057
+ ```ts
3058
+ type ExecutionPaginationDynamo = {
3059
+ orgId?: string
3060
+ creationTime?: string
3061
+ }
3062
+ ```
3063
+
3064
+ ### `ErrorResp`
3065
+
3066
+ ```ts
3067
+ type ErrorResp = {
3068
+ message?: string
3069
+ }
3070
+ ```
3071
+
3072
+ ### `ClosingReasonResp`
3073
+
3074
+ ```ts
3075
+ type ClosingReasonResp = {
3076
+ reasons?: Array<{
3077
+ id: string
3078
+ title: string
3079
+ }>
3080
+ }
3081
+ ```
3082
+
3083
+ ### `PhaseInEntity`
3084
+
3085
+ ```ts
3086
+ type PhaseInEntity = {
3087
+ phase_id?: string
3088
+ phase_name?: string
3089
+ phase_progress?: number
3090
+ phase_assignees?: string[]
3091
+ }
3092
+ ```
3093
+
3094
+ ### `WorkflowInEntity`
3095
+
3096
+ ```ts
3097
+ type WorkflowInEntity = {
3098
+ id?: string
3099
+ definition_id?: string
3100
+ name?: string
3101
+ status?: "STARTED" | "DONE" | "CLOSED"
3102
+ assignees?: string[]
3103
+ duedate?: string // date-time
3104
+ last_update_time?: string // date-time
3105
+ progress?: number
3106
+ upcoming_tasks_assignees?: string[]
3107
+ task_id?: string
3108
+ task_name?: string
3109
+ task_assignees?: string[]
3110
+ task_duedate?: string // date-time
3111
+ task_execution_type?: "MANUAL" | "AUTOMATION"
3112
+ task_status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3113
+ phase_id?: string
3114
+ phase_name?: string
3115
+ phase_assignees?: string[]
3116
+ phase_progress?: number
3117
+ phases_in_progress?: Array<{
3118
+ phase_id?: string
3119
+ phase_name?: string
3120
+ phase_progress?: number
3121
+ phase_assignees?: string[]
3122
+ }>
3123
+ selected_closing_reasons?: Array<{
3124
+ id: string
3125
+ title: string
3126
+ }>
3127
+ closing_reason_description?: string
3128
+ }
3129
+ ```
3130
+
3131
+ ### `UpdateEntityAttributes`
3132
+
3133
+ ```ts
3134
+ type UpdateEntityAttributes = {
3135
+ source: "workflow_status" | "current_section" | "current_step"
3136
+ target: {
3137
+ entitySchema: string
3138
+ entityAttribute: string
3139
+ }
3140
+ }
3141
+ ```
3142
+
3143
+ ### `EntitySync`
3144
+
3145
+ ```ts
3146
+ type EntitySync = {
3147
+ trigger: {
3148
+ event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress"
3149
+ filter?: {
3150
+ task_template_id?: { ... }
3151
+ phase_template_id?: { ... }
3152
+ }
3153
+ }
3154
+ value: {
3155
+ source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value"
3156
+ value?: string
3157
+ }
3158
+ target: {
3159
+ entitySchema: string
3160
+ entityAttribute: string
3161
+ }
3162
+ }
3163
+ ```
3164
+
3165
+ ### `DynamicDueDate`
3166
+
3167
+ set a Duedate for a step then a specific
3168
+
3169
+ ```ts
3170
+ type DynamicDueDate = {
3171
+ numberOfUnits: number
3172
+ timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"
3173
+ actionTypeCondition?: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"
3174
+ stepId?: string
3175
+ phaseId?: string
3176
+ }
3177
+ ```
3178
+
3179
+ ### `StepRequirement`
3180
+
3181
+ describe the requirement for step enablement
3182
+
3183
+ ```ts
3184
+ type StepRequirement = {
3185
+ definitionId: string
3186
+ type: "STEP" | "SECTION"
3187
+ condition: "CLOSED"
3188
+ }
3189
+ ```
3190
+
3191
+ ### `StartFlowReq`
3192
+
3193
+ ```ts
3194
+ type StartFlowReq = {
3195
+ flow_template_id: string
3196
+ trigger?: {
3197
+ type?: "MANUAL" | "AUTOMATIC"
3198
+ automation_config?: {
3199
+ flow_id: { ... }
3200
+ execution_id?: { ... }
3201
+ execution_status?: { ... }
3202
+ error_reason?: { ... }
3203
+ }
3204
+ }
3205
+ contexts: Array<{
3206
+ entity_id?: string
3207
+ entity_schema?: string
3208
+ is_primary?: boolean
3209
+ }>
3210
+ purposes?: string[]
3211
+ }
3212
+ ```
3213
+
3214
+ ### `SearchFlowsReq`
3215
+
3216
+ ```ts
3217
+ type SearchFlowsReq = {
3218
+ entity_id: string
3219
+ entity_schema: string
3220
+ }
3221
+ ```
3222
+
3223
+ ### `PatchFlowReq`
3224
+
3225
+ ```ts
3226
+ type PatchFlowReq = {
3227
+ status?: "STARTED" | "DONE" | "CLOSED"
3228
+ assigned_to?: Array<string | {
3229
+ variable: string
3230
+ value?: string[]
3231
+ }>
3232
+ closing_reason?: {
3233
+ selected_reasons?: Array<{
3234
+ id: { ... }
3235
+ title: { ... }
3236
+ }>
3237
+ configured_reasons?: Array<{
3238
+ id: { ... }
3239
+ title: { ... }
3240
+ }>
3241
+ extra_description?: string
3242
+ }
3243
+ due_date?: string
3244
+ due_date_config?: {
3245
+ duration: number
3246
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3247
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3248
+ task_id?: string
3249
+ phase_id?: string
3250
+ }
3251
+ contexts?: Array<{
3252
+ entity_id?: string
3253
+ entity_schema?: string
3254
+ is_primary?: boolean
3255
+ }>
3256
+ }
3257
+ ```
3258
+
3259
+ ### `FlowExecution`
3260
+
3261
+ ```ts
3262
+ type FlowExecution = {
3263
+ id: string
3264
+ flow_template_id: string
3265
+ org_id: string
3266
+ name: string
3267
+ created_at: string
3268
+ updated_at: string
3269
+ due_date?: string
3270
+ due_date_config?: {
3271
+ duration: number
3272
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3273
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3274
+ task_id?: string
3275
+ phase_id?: string
3276
+ }
3277
+ status: "STARTED" | "DONE" | "CLOSED"
3278
+ assigned_to?: Array<string | {
3279
+ variable: string
3280
+ value?: string[]
3281
+ }>
3282
+ analytics: {
3283
+ started_at?: string
3284
+ completed_at?: string
3285
+ closed_at?: string
3286
+ started_by?: string
3287
+ closed_by?: string
3288
+ }
3289
+ contexts: Array<{
3290
+ entity_id?: string
3291
+ entity_schema?: string
3292
+ is_primary?: boolean
3293
+ }>
3294
+ crt_tasks: Array<{
3295
+ id?: string
3296
+ }>
3297
+ phases?: Array<{
3298
+ id: string
3299
+ template_id: string
3300
+ name: string
3301
+ status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"
3302
+ updated_at?: string
3303
+ due_date?: string
3304
+ due_date_config?: {
3305
+ duration: { ... }
3306
+ unit: { ... }
3307
+ type: { ... }
3308
+ task_id?: { ... }
3309
+ phase_id?: { ... }
3310
+ }
3311
+ assigned_to?: Array<string | {
3312
+ variable: { ... }
3313
+ value?: { ... }
3314
+ }>
3315
+ analytics?: {
3316
+ started_at?: { ... }
3317
+ in_progress_at?: { ... }
3318
+ completed_at?: { ... }
3319
+ status_updated_at?: { ... }
3320
+ in_progress_by?: { ... }
3321
+ completed_by?: { ... }
3322
+ skipped_by?: { ... }
3323
+ on_hold_by?: { ... }
3324
+ }
3325
+ taxonomies?: string[]
3326
+ loop_config?: {
3327
+ max_iterations: { ... }
3328
+ crt_iterations?: { ... }
3329
+ }
3330
+ }>
3331
+ tasks: Array<{
3332
+ id: string
3333
+ template_id: string
3334
+ name: string
3335
+ description?: {
3336
+ enabled?: { ... }
3337
+ value?: { ... }
3338
+ }
3339
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3340
+ journey?: {
3341
+ id?: { ... }
3342
+ journeyId?: { ... }
3343
+ name?: { ... }
3344
+ complete_task_automatically?: { ... }
3345
+ }
3346
+ due_date?: string
3347
+ due_date_config?: {
3348
+ duration: { ... }
3349
+ unit: { ... }
3350
+ type: { ... }
3351
+ task_id?: { ... }
3352
+ phase_id?: { ... }
3353
+ }
3354
+ requirements?: Array<{
3355
+ task_id?: { ... }
3356
+ phase_id?: { ... }
3357
+ when: { ... }
3358
+ }>
3359
+ assigned_to?: Array<string | {
3360
+ variable: { ... }
3361
+ value?: { ... }
3362
+ // ...
3363
+ }
3364
+ ```
3365
+
3366
+ ### `FlowClosingReason`
3367
+
3368
+ ```ts
3369
+ type FlowClosingReason = {
3370
+ selected_reasons?: Array<{
3371
+ id: string
3372
+ title: string
3373
+ }>
3374
+ configured_reasons?: Array<{
3375
+ id: string
3376
+ title: string
3377
+ }>
3378
+ extra_description?: string
3379
+ }
3380
+ ```
3381
+
3382
+ ### `FlowTrigger`
3383
+
3384
+ ```ts
3385
+ type FlowTrigger = {
3386
+ type?: "MANUAL" | "AUTOMATIC"
3387
+ automation_config?: {
3388
+ flow_id: string
3389
+ execution_id?: string
3390
+ execution_status?: string
3391
+ error_reason?: string
3392
+ }
3393
+ }
3394
+ ```
3395
+
3396
+ ### `FlowContext`
3397
+
3398
+ ```ts
3399
+ type FlowContext = {
3400
+ entity_id?: string
3401
+ entity_schema?: string
3402
+ is_primary?: boolean
3403
+ }
3404
+ ```
3405
+
3406
+ ### `EntityRef`
3407
+
3408
+ ```ts
3409
+ type EntityRef = {
3410
+ entity_id?: string
3411
+ entity_schema?: string
3412
+ is_primary?: boolean
3413
+ }
3414
+ ```
3415
+
3416
+ ### `PhaseId`
3417
+
3418
+ ```ts
3419
+ type PhaseId = string
3420
+ ```
3421
+
3422
+ ### `TaskId`
3423
+
3424
+ ```ts
3425
+ type TaskId = string
3426
+ ```
3427
+
3428
+ ### `Task`
3429
+
3430
+ ```ts
3431
+ type Task = {
3432
+ id: string
3433
+ template_id: string
3434
+ name: string
3435
+ description?: {
3436
+ enabled?: boolean
3437
+ value?: string
3438
+ }
3439
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3440
+ journey?: {
3441
+ id?: string
3442
+ journeyId?: string
3443
+ name?: string
3444
+ complete_task_automatically?: boolean
3445
+ }
3446
+ due_date?: string
3447
+ due_date_config?: {
3448
+ duration: number
3449
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3450
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3451
+ task_id?: string
3452
+ phase_id?: string
3453
+ }
3454
+ requirements?: Array<{
3455
+ task_id?: string
3456
+ phase_id?: string
3457
+ when: "TASK_FINISHED" | "PHASE_FINISHED"
3458
+ }>
3459
+ assigned_to?: Array<string | {
3460
+ variable: string
3461
+ value?: string[]
3462
+ }>
3463
+ analytics: {
3464
+ started_at?: string // date-time
3465
+ in_progress_at?: string // date-time
3466
+ completed_at?: string // date-time
3467
+ status_updated_at?: string // date-time
3468
+ in_progress_by?: string
3469
+ completed_by?: string
3470
+ skipped_by?: string
3471
+ on_hold_by?: string
3472
+ }
3473
+ created_at?: string // date-time
3474
+ updated_at?: string // date-time
3475
+ manually_created?: boolean
3476
+ enabled: boolean
3477
+ ecp?: {
3478
+ enabled?: boolean
3479
+ label?: string
3480
+ description?: string
3481
+ journey?: {
3482
+ id?: { ... }
3483
+ journeyId?: { ... }
3484
+ name?: { ... }
3485
+ complete_task_automatically?: { ... }
3486
+ }
3487
+ }
3488
+ installer?: {
3489
+ enabled?: boolean
3490
+ label?: string
3491
+ description?: string
3492
+ journey?: {
3493
+ id?: { ... }
3494
+ journeyId?: { ... }
3495
+ name?: { ... }
3496
+ complete_task_automatically?: { ... }
3497
+ }
3498
+ }
3499
+ taxonomies?: string[]
3500
+ phase_id?: string
3501
+ task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
3502
+ loop_config?: {
3503
+ max_iterations: number
3504
+ crt_iterations?: number
3505
+ }
3506
+ } | {
3507
+ id: string
3508
+ template_id: string
3509
+ name: string
3510
+ description?: {
3511
+ enabled?: boolean
3512
+ value?: string
3513
+ }
3514
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3515
+ journey?: {
3516
+ id?: string
3517
+ journeyId?: string
3518
+ name?: string
3519
+ complete_task_automatically?: boolean
3520
+ }
3521
+ due_date?: string
3522
+ due_date_config?: {
3523
+ duration: number
3524
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3525
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3526
+ task_id?: string
3527
+ phase_id?: string
3528
+ }
3529
+ requirements?: Array<{
3530
+ task_id?: string
3531
+ // ...
3532
+ }
3533
+ ```
3534
+
3535
+ ### `TaskType`
3536
+
3537
+ ```ts
3538
+ type TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
3539
+ ```
3540
+
3541
+ ### `ManualTask`
3542
+
3543
+ ```ts
3544
+ type ManualTask = {
3545
+ id: string
3546
+ template_id: string
3547
+ name: string
3548
+ description?: {
3549
+ enabled?: boolean
3550
+ value?: string
3551
+ }
3552
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3553
+ journey?: {
3554
+ id?: string
3555
+ journeyId?: string
3556
+ name?: string
3557
+ complete_task_automatically?: boolean
3558
+ }
3559
+ due_date?: string
3560
+ due_date_config?: {
3561
+ duration: number
3562
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3563
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3564
+ task_id?: string
3565
+ phase_id?: string
3566
+ }
3567
+ requirements?: Array<{
3568
+ task_id?: string
3569
+ phase_id?: string
3570
+ when: "TASK_FINISHED" | "PHASE_FINISHED"
3571
+ }>
3572
+ assigned_to?: Array<string | {
3573
+ variable: string
3574
+ value?: string[]
3575
+ }>
3576
+ analytics: {
3577
+ started_at?: string // date-time
3578
+ in_progress_at?: string // date-time
3579
+ completed_at?: string // date-time
3580
+ status_updated_at?: string // date-time
3581
+ in_progress_by?: string
3582
+ completed_by?: string
3583
+ skipped_by?: string
3584
+ on_hold_by?: string
3585
+ }
3586
+ created_at?: string // date-time
3587
+ updated_at?: string // date-time
3588
+ manually_created?: boolean
3589
+ enabled: boolean
3590
+ ecp?: {
3591
+ enabled?: boolean
3592
+ label?: string
3593
+ description?: string
3594
+ journey?: {
3595
+ id?: { ... }
3596
+ journeyId?: { ... }
3597
+ name?: { ... }
3598
+ complete_task_automatically?: { ... }
3599
+ }
3600
+ }
3601
+ installer?: {
3602
+ enabled?: boolean
3603
+ label?: string
3604
+ description?: string
3605
+ journey?: {
3606
+ id?: { ... }
3607
+ journeyId?: { ... }
3608
+ name?: { ... }
3609
+ complete_task_automatically?: { ... }
3610
+ }
3611
+ }
3612
+ taxonomies?: string[]
3613
+ phase_id?: string
3614
+ task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
3615
+ loop_config?: {
3616
+ max_iterations: number
3617
+ crt_iterations?: number
3618
+ }
3619
+ }
3620
+ ```
3621
+
3622
+ ### `AutomationTask`
3623
+
3624
+ ```ts
3625
+ type AutomationTask = {
3626
+ id: string
3627
+ template_id: string
3628
+ name: string
3629
+ description?: {
3630
+ enabled?: boolean
3631
+ value?: string
3632
+ }
3633
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3634
+ journey?: {
3635
+ id?: string
3636
+ journeyId?: string
3637
+ name?: string
3638
+ complete_task_automatically?: boolean
3639
+ }
3640
+ due_date?: string
3641
+ due_date_config?: {
3642
+ duration: number
3643
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3644
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3645
+ task_id?: string
3646
+ phase_id?: string
3647
+ }
3648
+ requirements?: Array<{
3649
+ task_id?: string
3650
+ phase_id?: string
3651
+ when: "TASK_FINISHED" | "PHASE_FINISHED"
3652
+ }>
3653
+ assigned_to?: Array<string | {
3654
+ variable: string
3655
+ value?: string[]
3656
+ }>
3657
+ analytics: {
3658
+ started_at?: string // date-time
3659
+ in_progress_at?: string // date-time
3660
+ completed_at?: string // date-time
3661
+ status_updated_at?: string // date-time
3662
+ in_progress_by?: string
3663
+ completed_by?: string
3664
+ skipped_by?: string
3665
+ on_hold_by?: string
3666
+ }
3667
+ created_at?: string // date-time
3668
+ updated_at?: string // date-time
3669
+ manually_created?: boolean
3670
+ enabled: boolean
3671
+ ecp?: {
3672
+ enabled?: boolean
3673
+ label?: string
3674
+ description?: string
3675
+ journey?: {
3676
+ id?: { ... }
3677
+ journeyId?: { ... }
3678
+ name?: { ... }
3679
+ complete_task_automatically?: { ... }
3680
+ }
3681
+ }
3682
+ installer?: {
3683
+ enabled?: boolean
3684
+ label?: string
3685
+ description?: string
3686
+ journey?: {
3687
+ id?: { ... }
3688
+ journeyId?: { ... }
3689
+ name?: { ... }
3690
+ complete_task_automatically?: { ... }
3691
+ }
3692
+ }
3693
+ taxonomies?: string[]
3694
+ phase_id?: string
3695
+ task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
3696
+ automation_config: {
3697
+ flow_id: string
3698
+ execution_id?: string
3699
+ execution_status?: string
3700
+ error_reason?: string
3701
+ }
3702
+ automation_execution_id?: string
3703
+ trigger_mode?: "manual" | "automatic"
3704
+ schedule?: {
3705
+ mode: "immediate"
3706
+ } | {
3707
+ mode: "delayed"
3708
+ duration: number
3709
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3710
+ schedule_id?: string
3711
+ } | {
3712
+ mode: "relative"
3713
+ direction: "before" | "after"
3714
+ duration: number
3715
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3716
+ reference: {
3717
+ id: { ... }
3718
+ origin: { ... }
3719
+ schema?: { ... }
3720
+ attribute?: { ... }
3721
+ }
3722
+ schedule_id?: string
3723
+ }
3724
+ loop_config?: {
3725
+ // ...
3726
+ }
3727
+ ```
3728
+
3729
+ ### `LoopInfo`
3730
+
3731
+ Information about loop iterations, when task is part of a loop branch
3732
+
3733
+ ```ts
3734
+ type LoopInfo = {
3735
+ max_iterations: number
3736
+ crt_iterations?: number
3737
+ }
3738
+ ```
3739
+
3740
+ ### `LoopConfig`
3741
+
3742
+ ```ts
3743
+ type LoopConfig = {
3744
+ loop_branch_id: string
3745
+ exit_branch_id: string
3746
+ max_iterations: number
3747
+ crt_iterations?: number
3748
+ }
3749
+ ```
3750
+
3751
+ ### `TriggerMode`
3752
+
3753
+ ```ts
3754
+ type TriggerMode = "manual" | "automatic"
3755
+ ```
3756
+
3757
+ ### `ActionSchedule`
3758
+
3759
+ ```ts
3760
+ type ActionSchedule = {
3761
+ mode: "immediate"
3762
+ } | {
3763
+ mode: "delayed"
3764
+ duration: number
3765
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3766
+ schedule_id?: string
3767
+ } | {
3768
+ mode: "relative"
3769
+ direction: "before" | "after"
3770
+ duration: number
3771
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3772
+ reference: {
3773
+ id: string
3774
+ origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"
3775
+ schema?: string
3776
+ attribute?: string
3777
+ }
3778
+ schedule_id?: string
3779
+ }
3780
+ ```
3781
+
3782
+ ### `ImmediateSchedule`
3783
+
3784
+ ```ts
3785
+ type ImmediateSchedule = {
3786
+ mode: "immediate"
3787
+ }
3788
+ ```
3789
+
3790
+ ### `DelayedSchedule`
3791
+
3792
+ ```ts
3793
+ type DelayedSchedule = {
3794
+ mode: "delayed"
3795
+ duration: number
3796
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3797
+ schedule_id?: string
3798
+ }
3799
+ ```
3800
+
3801
+ ### `RelativeSchedule`
3802
+
3803
+ ```ts
3804
+ type RelativeSchedule = {
3805
+ mode: "relative"
3806
+ direction: "before" | "after"
3807
+ duration: number
3808
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3809
+ reference: {
3810
+ id: string
3811
+ origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"
3812
+ schema?: string
3813
+ attribute?: string
3814
+ }
3815
+ schedule_id?: string
3816
+ }
3817
+ ```
3818
+
3819
+ ### `DecisionTask`
3820
+
3821
+ ```ts
3822
+ type DecisionTask = {
3823
+ id: string
3824
+ template_id: string
3825
+ name: string
3826
+ description?: {
3827
+ enabled?: boolean
3828
+ value?: string
3829
+ }
3830
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3831
+ journey?: {
3832
+ id?: string
3833
+ journeyId?: string
3834
+ name?: string
3835
+ complete_task_automatically?: boolean
3836
+ }
3837
+ due_date?: string
3838
+ due_date_config?: {
3839
+ duration: number
3840
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3841
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3842
+ task_id?: string
3843
+ phase_id?: string
3844
+ }
3845
+ requirements?: Array<{
3846
+ task_id?: string
3847
+ phase_id?: string
3848
+ when: "TASK_FINISHED" | "PHASE_FINISHED"
3849
+ }>
3850
+ assigned_to?: Array<string | {
3851
+ variable: string
3852
+ value?: string[]
3853
+ }>
3854
+ analytics: {
3855
+ started_at?: string // date-time
3856
+ in_progress_at?: string // date-time
3857
+ completed_at?: string // date-time
3858
+ status_updated_at?: string // date-time
3859
+ in_progress_by?: string
3860
+ completed_by?: string
3861
+ skipped_by?: string
3862
+ on_hold_by?: string
3863
+ }
3864
+ created_at?: string // date-time
3865
+ updated_at?: string // date-time
3866
+ manually_created?: boolean
3867
+ enabled: boolean
3868
+ ecp?: {
3869
+ enabled?: boolean
3870
+ label?: string
3871
+ description?: string
3872
+ journey?: {
3873
+ id?: { ... }
3874
+ journeyId?: { ... }
3875
+ name?: { ... }
3876
+ complete_task_automatically?: { ... }
3877
+ }
3878
+ }
3879
+ installer?: {
3880
+ enabled?: boolean
3881
+ label?: string
3882
+ description?: string
3883
+ journey?: {
3884
+ id?: { ... }
3885
+ journeyId?: { ... }
3886
+ name?: { ... }
3887
+ complete_task_automatically?: { ... }
3888
+ }
3889
+ }
3890
+ taxonomies?: string[]
3891
+ phase_id?: string
3892
+ task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
3893
+ trigger_mode: "manual" | "automatic"
3894
+ conditions: Array<{
3895
+ id: string
3896
+ branch_name: string
3897
+ logical_operator: "AND" | "OR"
3898
+ statements: Array<{
3899
+ id: { ... }
3900
+ source: { ... }
3901
+ operator: { ... }
3902
+ values: { ... }
3903
+ value_type?: { ... }
3904
+ }>
3905
+ evaluated_at?: string // date-time
3906
+ is_met?: boolean
3907
+ }>
3908
+ schedule?: {
3909
+ mode: "delayed"
3910
+ duration: number
3911
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3912
+ schedule_id?: string
3913
+ } | {
3914
+ mode: "relative"
3915
+ direction: "before" | "after"
3916
+ duration: number
3917
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3918
+ reference: {
3919
+ id: { ... }
3920
+ origin: { ... }
3921
+ schema?: { ... }
3922
+ // ...
3923
+ }
3924
+ ```
3925
+
3926
+ ### `AiAgentTask`
3927
+
3928
+ ```ts
3929
+ type AiAgentTask = {
3930
+ id: string
3931
+ template_id: string
3932
+ name: string
3933
+ description?: {
3934
+ enabled?: boolean
3935
+ value?: string
3936
+ }
3937
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
3938
+ journey?: {
3939
+ id?: string
3940
+ journeyId?: string
3941
+ name?: string
3942
+ complete_task_automatically?: boolean
3943
+ }
3944
+ due_date?: string
3945
+ due_date_config?: {
3946
+ duration: number
3947
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
3948
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
3949
+ task_id?: string
3950
+ phase_id?: string
3951
+ }
3952
+ requirements?: Array<{
3953
+ task_id?: string
3954
+ phase_id?: string
3955
+ when: "TASK_FINISHED" | "PHASE_FINISHED"
3956
+ }>
3957
+ assigned_to?: Array<string | {
3958
+ variable: string
3959
+ value?: string[]
3960
+ }>
3961
+ analytics: {
3962
+ started_at?: string // date-time
3963
+ in_progress_at?: string // date-time
3964
+ completed_at?: string // date-time
3965
+ status_updated_at?: string // date-time
3966
+ in_progress_by?: string
3967
+ completed_by?: string
3968
+ skipped_by?: string
3969
+ on_hold_by?: string
3970
+ }
3971
+ created_at?: string // date-time
3972
+ updated_at?: string // date-time
3973
+ manually_created?: boolean
3974
+ enabled: boolean
3975
+ ecp?: {
3976
+ enabled?: boolean
3977
+ label?: string
3978
+ description?: string
3979
+ journey?: {
3980
+ id?: { ... }
3981
+ journeyId?: { ... }
3982
+ name?: { ... }
3983
+ complete_task_automatically?: { ... }
3984
+ }
3985
+ }
3986
+ installer?: {
3987
+ enabled?: boolean
3988
+ label?: string
3989
+ description?: string
3990
+ journey?: {
3991
+ id?: { ... }
3992
+ journeyId?: { ... }
3993
+ name?: { ... }
3994
+ complete_task_automatically?: { ... }
3995
+ }
3996
+ }
3997
+ taxonomies?: string[]
3998
+ phase_id?: string
3999
+ task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
4000
+ agent_config?: {
4001
+ agent_id: string
4002
+ parameters?: object
4003
+ }
4004
+ loop_config?: {
4005
+ max_iterations: number
4006
+ crt_iterations?: number
4007
+ }
4008
+ agent_execution?: {
4009
+ execution_id?: string
4010
+ execution_status?: string
4011
+ error_reason?: string
4012
+ }
4013
+ agent_execution_id?: string
4014
+ }
4015
+ ```
4016
+
4017
+ ### `AgentConfig`
4018
+
4019
+ Configuration for AI Agent to run
4020
+
4021
+ ```ts
4022
+ type AgentConfig = {
4023
+ agent_id: string
4024
+ parameters?: object
4025
+ }
4026
+ ```
4027
+
4028
+ ### `AgentExecutionInfo`
4029
+
4030
+ ```ts
4031
+ type AgentExecutionInfo = {
4032
+ execution_id?: string
4033
+ execution_status?: string
4034
+ error_reason?: string
4035
+ }
4036
+ ```
4037
+
4038
+ ### `TaskBase`
4039
+
4040
+ ```ts
4041
+ type TaskBase = {
4042
+ id: string
4043
+ template_id: string
4044
+ name: string
4045
+ description?: {
4046
+ enabled?: boolean
4047
+ value?: string
4048
+ }
4049
+ status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
4050
+ journey?: {
4051
+ id?: string
4052
+ journeyId?: string
4053
+ name?: string
4054
+ complete_task_automatically?: boolean
4055
+ }
4056
+ due_date?: string
4057
+ due_date_config?: {
4058
+ duration: number
4059
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
4060
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
4061
+ task_id?: string
4062
+ phase_id?: string
4063
+ }
4064
+ requirements?: Array<{
4065
+ task_id?: string
4066
+ phase_id?: string
4067
+ when: "TASK_FINISHED" | "PHASE_FINISHED"
4068
+ }>
4069
+ assigned_to?: Array<string | {
4070
+ variable: string
4071
+ value?: string[]
4072
+ }>
4073
+ analytics: {
4074
+ started_at?: string // date-time
4075
+ in_progress_at?: string // date-time
4076
+ completed_at?: string // date-time
4077
+ status_updated_at?: string // date-time
4078
+ in_progress_by?: string
4079
+ completed_by?: string
4080
+ skipped_by?: string
4081
+ on_hold_by?: string
4082
+ }
4083
+ created_at?: string // date-time
4084
+ updated_at?: string // date-time
4085
+ manually_created?: boolean
4086
+ enabled: boolean
4087
+ ecp?: {
4088
+ enabled?: boolean
4089
+ label?: string
4090
+ description?: string
4091
+ journey?: {
4092
+ id?: { ... }
4093
+ journeyId?: { ... }
4094
+ name?: { ... }
4095
+ complete_task_automatically?: { ... }
4096
+ }
4097
+ }
4098
+ installer?: {
4099
+ enabled?: boolean
4100
+ label?: string
4101
+ description?: string
4102
+ journey?: {
4103
+ id?: { ... }
4104
+ journeyId?: { ... }
4105
+ name?: { ... }
4106
+ complete_task_automatically?: { ... }
4107
+ }
4108
+ }
4109
+ taxonomies?: string[]
4110
+ phase_id?: string
4111
+ task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
4112
+ }
4113
+ ```
4114
+
4115
+ ### `Phase`
4116
+
4117
+ ```ts
4118
+ type Phase = {
4119
+ id: string
4120
+ template_id: string
4121
+ name: string
4122
+ status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"
4123
+ updated_at?: string
4124
+ due_date?: string
4125
+ due_date_config?: {
4126
+ duration: number
4127
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
4128
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
4129
+ task_id?: string
4130
+ phase_id?: string
4131
+ }
4132
+ assigned_to?: Array<string | {
4133
+ variable: string
4134
+ value?: string[]
4135
+ }>
4136
+ analytics?: {
4137
+ started_at?: string // date-time
4138
+ in_progress_at?: string // date-time
4139
+ completed_at?: string // date-time
4140
+ status_updated_at?: string // date-time
4141
+ in_progress_by?: string
4142
+ completed_by?: string
4143
+ skipped_by?: string
4144
+ on_hold_by?: string
4145
+ }
4146
+ taxonomies?: string[]
4147
+ loop_config?: {
4148
+ max_iterations: number
4149
+ crt_iterations?: number
4150
+ }
4151
+ }
4152
+ ```
4153
+
4154
+ ### `Edge`
4155
+
4156
+ ```ts
4157
+ type Edge = {
4158
+ id: string
4159
+ from_id: string
4160
+ to_id: string
4161
+ condition_id?: string
4162
+ none_met?: boolean
4163
+ }
4164
+ ```
4165
+
4166
+ ### `AutomationInfo`
4167
+
4168
+ ```ts
4169
+ type AutomationInfo = {
4170
+ flow_id: string
4171
+ execution_id?: string
4172
+ execution_status?: string
4173
+ error_reason?: string
4174
+ }
4175
+ ```
4176
+
4177
+ ### `AnalyticsInfo`
4178
+
4179
+ ```ts
4180
+ type AnalyticsInfo = {
4181
+ started_at?: string // date-time
4182
+ in_progress_at?: string // date-time
4183
+ completed_at?: string // date-time
4184
+ status_updated_at?: string // date-time
4185
+ in_progress_by?: string
4186
+ completed_by?: string
4187
+ skipped_by?: string
4188
+ on_hold_by?: string
4189
+ }
4190
+ ```
4191
+
4192
+ ### `ConditionId`
4193
+
4194
+ A locally unique identifier for the condition
4195
+
4196
+ ```ts
4197
+ type ConditionId = string
4198
+ ```
4199
+
4200
+ ### `Condition`
4201
+
4202
+ ```ts
4203
+ type Condition = {
4204
+ id: string
4205
+ branch_name: string
4206
+ logical_operator: "AND" | "OR"
4207
+ statements: Array<{
4208
+ id: string
4209
+ source: {
4210
+ id?: { ... }
4211
+ origin?: { ... }
4212
+ origin_type?: { ... }
4213
+ schema?: { ... }
4214
+ attribute?: { ... }
4215
+ attribute_type?: { ... }
4216
+ attribute_repeatable?: { ... }
4217
+ attribute_operation?: { ... }
4218
+ attribute_sub_field?: { ... }
4219
+ date_offset?: { ... }
4220
+ }
4221
+ operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"
4222
+ values: string[]
4223
+ value_type?: "static" | "relative_date"
4224
+ }>
4225
+ evaluated_at?: string // date-time
4226
+ is_met?: boolean
4227
+ }
4228
+ ```
4229
+
4230
+ ### `Statement`
4231
+
4232
+ ```ts
4233
+ type Statement = {
4234
+ id: string
4235
+ source: {
4236
+ id?: string
4237
+ origin?: "trigger" | "action"
4238
+ origin_type?: "entity" | "workflow" | "journey_block"
4239
+ schema?: string
4240
+ attribute?: string
4241
+ attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"
4242
+ attribute_repeatable?: boolean
4243
+ attribute_operation?: "all" | "updated" | "added" | "deleted"
4244
+ attribute_sub_field?: string
4245
+ date_offset?: {
4246
+ amount?: { ... }
4247
+ unit?: { ... }
4248
+ }
4249
+ }
4250
+ operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"
4251
+ values: string[]
4252
+ value_type?: "static" | "relative_date"
4253
+ }
4254
+ ```
4255
+
4256
+ ### `EvaluationSource`
4257
+
4258
+ ```ts
4259
+ type EvaluationSource = {
4260
+ id?: string
4261
+ origin?: "trigger" | "action"
4262
+ origin_type?: "entity" | "workflow" | "journey_block"
4263
+ schema?: string
4264
+ attribute?: string
4265
+ attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"
4266
+ attribute_repeatable?: boolean
4267
+ attribute_operation?: "all" | "updated" | "added" | "deleted"
4268
+ attribute_sub_field?: string
4269
+ date_offset?: {
4270
+ amount?: number
4271
+ unit?: "days" | "months" | "years"
4272
+ }
4273
+ }
4274
+ ```
4275
+
4276
+ ### `Operator`
4277
+
4278
+ ```ts
4279
+ type Operator = "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"
4280
+ ```
4281
+
4282
+ ### `DueDateConfig`
4283
+
4284
+ Set due date for the task based on a dynamic condition
4285
+
4286
+ ```ts
4287
+ type DueDateConfig = {
4288
+ duration: number
4289
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
4290
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
4291
+ task_id?: string
4292
+ phase_id?: string
4293
+ }
4294
+ ```
4295
+
4296
+ ### `TimeUnit`
4297
+
4298
+ ```ts
4299
+ type TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months"
4300
+ ```
4301
+
4302
+ ### `EnableRequirement`
4303
+
4304
+ describe the requirement for a task to be enabled
4305
+
4306
+ ```ts
4307
+ type EnableRequirement = {
4308
+ task_id?: string
4309
+ phase_id?: string
4310
+ when: "TASK_FINISHED" | "PHASE_FINISHED"
4311
+ }
4312
+ ```
4313
+
4314
+ ### `FlowTemplateId`
4315
+
4316
+ ```ts
4317
+ type FlowTemplateId = string
4318
+ ```
4319
+
4320
+ ### `FlowExecutionId`
4321
+
4322
+ ```ts
4323
+ type FlowExecutionId = string
4324
+ ```
4325
+
4326
+ ### `UserId`
4327
+
4328
+ The user id
4329
+
4330
+ ```ts
4331
+ type UserId = string
4332
+ ```
4333
+
4334
+ ### `VariableAssignment`
4335
+
4336
+ Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.
4337
+
4338
+ ```ts
4339
+ type VariableAssignment = {
4340
+ variable: string
4341
+ value?: string[]
4342
+ }
4343
+ ```
4344
+
4345
+ ### `Assignees`
4346
+
4347
+ The user ids or variable assignments
4348
+
4349
+ ```ts
4350
+ type Assignees = Array<string | {
4351
+ variable: string
4352
+ value?: string[]
4353
+ }>
4354
+ ```
4355
+
4356
+ ### `PatchTaskReq`
4357
+
4358
+ ```ts
4359
+ type PatchTaskReq = {
4360
+ name?: string
4361
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
4362
+ due_date?: string
4363
+ due_date_config?: {
4364
+ duration: number
4365
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
4366
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
4367
+ task_id?: string
4368
+ phase_id?: string
4369
+ }
4370
+ assigned_to?: Array<string | {
4371
+ variable: string
4372
+ value?: string[]
4373
+ }>
4374
+ enabled?: boolean
4375
+ automation_config?: {
4376
+ flow_id: string
4377
+ execution_id?: string
4378
+ execution_status?: string
4379
+ error_reason?: string
4380
+ }
4381
+ description?: {
4382
+ enabled?: boolean
4383
+ value?: string
4384
+ }
4385
+ ecp?: {
4386
+ enabled?: boolean
4387
+ label?: string
4388
+ description?: string
4389
+ journey?: {
4390
+ id?: { ... }
4391
+ journeyId?: { ... }
4392
+ name?: { ... }
4393
+ complete_task_automatically?: { ... }
4394
+ }
4395
+ }
4396
+ installer?: {
4397
+ enabled?: boolean
4398
+ label?: string
4399
+ description?: string
4400
+ journey?: {
4401
+ id?: { ... }
4402
+ journeyId?: { ... }
4403
+ name?: { ... }
4404
+ complete_task_automatically?: { ... }
4405
+ }
4406
+ }
4407
+ next_condition_id?: string
4408
+ revert_execution?: boolean
4409
+ }
4410
+ ```
4411
+
4412
+ ### `PatchPhaseReq`
4413
+
4414
+ ```ts
4415
+ type PatchPhaseReq = {
4416
+ name?: string
4417
+ due_date?: string
4418
+ due_date_config?: {
4419
+ duration: number
4420
+ unit: "minutes" | "hours" | "days" | "weeks" | "months"
4421
+ type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"
4422
+ task_id?: string
4423
+ phase_id?: string
4424
+ }
4425
+ assigned_to?: Array<string | {
4426
+ variable: string
4427
+ value?: string[]
4428
+ }>
4429
+ }
4430
+ ```
4431
+
4432
+ ### `AddTaskReq`
4433
+
4434
+ ```ts
4435
+ type AddTaskReq = {
4436
+ previous_task_id: string // uuid
4437
+ next_task_id: string // uuid
4438
+ task: {
4439
+ id?: string // uuid
4440
+ name: string
4441
+ status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"
4442
+ due_date?: string
4443
+ due_date_config?: {
4444
+ duration: { ... }
4445
+ unit: { ... }
4446
+ type: { ... }
4447
+ task_id?: { ... }
4448
+ phase_id?: { ... }
4449
+ }
4450
+ assigned_to?: Array<string | {
4451
+ variable: { ... }
4452
+ value?: { ... }
4453
+ }>
4454
+ enabled?: boolean
4455
+ automation_config?: {
4456
+ flow_id: { ... }
4457
+ execution_id?: { ... }
4458
+ execution_status?: { ... }
4459
+ error_reason?: { ... }
4460
+ }
4461
+ phase_id?: string
4462
+ task_type?: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"
4463
+ }
4464
+ }
4465
+ ```