@epilot/sdk 2.3.8 → 2.3.10

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 (146) hide show
  1. package/definitions/configuration-hub-runtime.json +1 -1
  2. package/definitions/configuration-hub.json +220 -8
  3. package/definitions/workflow-definition.json +52 -0
  4. package/definitions/workflow.json +24 -0
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/configuration-hub.cjs +8 -8
  24. package/dist/apis/configuration-hub.d.cts +2 -2
  25. package/dist/apis/configuration-hub.d.ts +2 -2
  26. package/dist/apis/configuration-hub.js +2 -2
  27. package/dist/apis/consent.cjs +6 -6
  28. package/dist/apis/consent.js +1 -1
  29. package/dist/apis/customer-portal.cjs +6 -6
  30. package/dist/apis/customer-portal.js +1 -1
  31. package/dist/apis/dashboard.cjs +6 -6
  32. package/dist/apis/dashboard.js +1 -1
  33. package/dist/apis/data-governance.cjs +6 -6
  34. package/dist/apis/data-governance.js +1 -1
  35. package/dist/apis/deduplication.cjs +6 -6
  36. package/dist/apis/deduplication.js +1 -1
  37. package/dist/apis/design.cjs +6 -6
  38. package/dist/apis/design.js +1 -1
  39. package/dist/apis/document.cjs +6 -6
  40. package/dist/apis/document.js +1 -1
  41. package/dist/apis/email-settings.cjs +6 -6
  42. package/dist/apis/email-settings.js +1 -1
  43. package/dist/apis/email-template.cjs +6 -6
  44. package/dist/apis/email-template.js +1 -1
  45. package/dist/apis/entity-mapping.cjs +6 -6
  46. package/dist/apis/entity-mapping.js +1 -1
  47. package/dist/apis/entity.cjs +6 -6
  48. package/dist/apis/entity.js +1 -1
  49. package/dist/apis/environments.cjs +6 -6
  50. package/dist/apis/environments.js +1 -1
  51. package/dist/apis/event-catalog.cjs +6 -6
  52. package/dist/apis/event-catalog.js +1 -1
  53. package/dist/apis/file.cjs +6 -6
  54. package/dist/apis/file.js +1 -1
  55. package/dist/apis/iban.cjs +6 -6
  56. package/dist/apis/iban.js +1 -1
  57. package/dist/apis/integration-toolkit.cjs +6 -6
  58. package/dist/apis/integration-toolkit.js +1 -1
  59. package/dist/apis/journey.cjs +6 -6
  60. package/dist/apis/journey.js +1 -1
  61. package/dist/apis/kanban.cjs +6 -6
  62. package/dist/apis/kanban.js +1 -1
  63. package/dist/apis/message.cjs +6 -6
  64. package/dist/apis/message.js +1 -1
  65. package/dist/apis/metering.cjs +6 -6
  66. package/dist/apis/metering.js +1 -1
  67. package/dist/apis/notes.cjs +6 -6
  68. package/dist/apis/notes.js +1 -1
  69. package/dist/apis/notification.cjs +6 -6
  70. package/dist/apis/notification.js +1 -1
  71. package/dist/apis/organization.cjs +6 -6
  72. package/dist/apis/organization.js +1 -1
  73. package/dist/apis/partner-directory.cjs +6 -6
  74. package/dist/apis/partner-directory.js +1 -1
  75. package/dist/apis/permissions.cjs +6 -6
  76. package/dist/apis/permissions.js +1 -1
  77. package/dist/apis/pricing-tier.cjs +6 -6
  78. package/dist/apis/pricing-tier.js +1 -1
  79. package/dist/apis/pricing.cjs +6 -6
  80. package/dist/apis/pricing.js +1 -1
  81. package/dist/apis/purpose.cjs +6 -6
  82. package/dist/apis/purpose.js +1 -1
  83. package/dist/apis/query.cjs +6 -6
  84. package/dist/apis/query.js +1 -1
  85. package/dist/apis/sandbox.cjs +6 -6
  86. package/dist/apis/sandbox.js +1 -1
  87. package/dist/apis/sharing.cjs +6 -6
  88. package/dist/apis/sharing.js +1 -1
  89. package/dist/apis/submission.cjs +6 -6
  90. package/dist/apis/submission.js +1 -1
  91. package/dist/apis/target.cjs +6 -6
  92. package/dist/apis/target.js +1 -1
  93. package/dist/apis/targeting.cjs +6 -6
  94. package/dist/apis/targeting.js +1 -1
  95. package/dist/apis/template-variables.cjs +6 -6
  96. package/dist/apis/template-variables.js +1 -1
  97. package/dist/apis/user.cjs +6 -6
  98. package/dist/apis/user.js +1 -1
  99. package/dist/apis/validation-rules.cjs +6 -6
  100. package/dist/apis/validation-rules.js +1 -1
  101. package/dist/apis/webhooks.cjs +6 -6
  102. package/dist/apis/webhooks.js +1 -1
  103. package/dist/apis/workflow-definition.cjs +6 -6
  104. package/dist/apis/workflow-definition.d.cts +2 -2
  105. package/dist/apis/workflow-definition.d.ts +2 -2
  106. package/dist/apis/workflow-definition.js +1 -1
  107. package/dist/apis/workflow.cjs +6 -6
  108. package/dist/apis/workflow.d.cts +2 -2
  109. package/dist/apis/workflow.d.ts +2 -2
  110. package/dist/apis/workflow.js +1 -1
  111. package/dist/{chunk-6DZXWV2A.cjs → chunk-MDLNRFJV.cjs} +4 -4
  112. package/dist/chunk-ONOGGR6Q.js +14 -0
  113. package/dist/{chunk-7TFVO6SP.js → chunk-W7YCS4FU.js} +4 -4
  114. package/dist/chunk-ZSONBZIF.cjs +14 -0
  115. package/dist/configuration-hub-A3S6ND6R.cjs +7 -0
  116. package/dist/configuration-hub-PMAW44U5.js +7 -0
  117. package/dist/{configuration-hub-runtime-B7KKIHHY.cjs → configuration-hub-runtime-I5Y67CXD.cjs} +2 -2
  118. package/dist/{configuration-hub-runtime-TEDEKI7E.js → configuration-hub-runtime-L6IOERSP.js} +1 -1
  119. package/dist/configuration-hub.d-Cqaq2F-W.d.cts +478 -0
  120. package/dist/configuration-hub.d-Cqaq2F-W.d.ts +478 -0
  121. package/dist/index.cjs +10 -10
  122. package/dist/index.d.cts +3 -3
  123. package/dist/index.d.ts +3 -3
  124. package/dist/index.js +2 -2
  125. package/dist/workflow-3WBD74WR.js +7 -0
  126. package/dist/workflow-WIUZ5TOX.cjs +7 -0
  127. package/dist/workflow-definition-2VF7S23G.js +7 -0
  128. package/dist/workflow-definition-U6YXD42W.cjs +7 -0
  129. package/dist/{workflow-definition.d-ByCJK9_x.d.ts → workflow-definition.d-DOeb0KVV.d.cts} +37 -1
  130. package/dist/{workflow-definition.d-ByCJK9_x.d.cts → workflow-definition.d-DOeb0KVV.d.ts} +37 -1
  131. package/dist/{workflow.d-pD8ISOg-.d.ts → workflow.d-CMSKt8oN.d.cts} +22 -1
  132. package/dist/{workflow.d-pD8ISOg-.d.cts → workflow.d-CMSKt8oN.d.ts} +22 -1
  133. package/docs/configuration-hub.md +159 -11
  134. package/docs/workflow-definition.md +40 -8
  135. package/docs/workflow.md +57 -11
  136. package/package.json +1 -1
  137. package/dist/chunk-4JAOFRYX.js +0 -14
  138. package/dist/chunk-Q7OKRNUG.cjs +0 -14
  139. package/dist/configuration-hub-LKSRCGYT.cjs +0 -7
  140. package/dist/configuration-hub-TZ2ULWV4.js +0 -7
  141. package/dist/configuration-hub.d-CqvhcMOn.d.cts +0 -166
  142. package/dist/configuration-hub.d-CqvhcMOn.d.ts +0 -166
  143. package/dist/workflow-CQOBZ25C.cjs +0 -7
  144. package/dist/workflow-G7VFCXY7.js +0 -7
  145. package/dist/workflow-definition-CVBYKAUY.cjs +0 -7
  146. package/dist/workflow-definition-GNAKDNG7.js +0 -7
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
+
3
+ // src/docs/workflow-definition.json
4
+ var workflow_definition_default = '# Workflows Definitions\n\n- **Base URL:** `https://workflows-definition.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/workflow-definition](https://docs.epilot.io/api/workflow-definition)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.workflowDefinition.getMaxAllowedLimit(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/workflow-definition\'\n\nconst workflowDefinitionClient = getClient()\nauthorize(workflowDefinitionClient, () => \'<token>\')\nconst { data } = await workflowDefinitionClient.getMaxAllowedLimit(...)\n```\n\n## Operations\n\n**Workflows**\n- [`getMaxAllowedLimit`](#getmaxallowedlimit)\n- [`getDefinitions`](#getdefinitions)\n- [`createDefinition`](#createdefinition)\n- [`getDefinition`](#getdefinition)\n- [`updateDefinition`](#updatedefinition)\n- [`deleteDefinition`](#deletedefinition)\n- [`getWorkflowClosingReasons`](#getworkflowclosingreasons)\n- [`setWorkflowClosingReasons`](#setworkflowclosingreasons)\n\n**Flows V2**\n- [`listFlowTemplates`](#listflowtemplates)\n- [`createFlowTemplate`](#createflowtemplate)\n- [`searchFlowTemplates`](#searchflowtemplates)\n- [`getFlowTemplate`](#getflowtemplate)\n- [`updateFlowTemplate`](#updateflowtemplate)\n- [`deleteFlowTemplate`](#deleteflowtemplate)\n- [`duplicateFlowTemplate`](#duplicateflowtemplate)\n\n**Closing Reason**\n- [`getAllClosingReasons`](#getallclosingreasons)\n- [`createClosingReason`](#createclosingreason)\n- [`getClosingReason`](#getclosingreason)\n- [`updateClosingReason`](#updateclosingreason)\n- [`deleteClosingReason`](#deleteclosingreason)\n- [`changeReasonStatus`](#changereasonstatus)\n\n**Schemas**\n- [`FlowTemplateBase`](#flowtemplatebase)\n- [`FlowTemplate`](#flowtemplate)\n- [`Version`](#version)\n- [`Trigger`](#trigger)\n- [`ManualTrigger`](#manualtrigger)\n- [`AutomationTrigger`](#automationtrigger)\n- [`JourneyAutomationTrigger`](#journeyautomationtrigger)\n- [`JourneySubmissionTrigger`](#journeysubmissiontrigger)\n- [`CreateFlowTemplate`](#createflowtemplate)\n- [`SearchFlowTemplates`](#searchflowtemplates)\n- [`FlowTemplatesList`](#flowtemplateslist)\n- [`FlowTemplateId`](#flowtemplateid)\n- [`Task`](#task)\n- [`ManualTask`](#manualtask)\n- [`AutomationTask`](#automationtask)\n- [`AutomationConfig`](#automationconfig)\n- [`AutomationInputContext`](#automationinputcontext)\n- [`AiAgentTask`](#aiagenttask)\n- [`AgentConfig`](#agentconfig)\n- [`TriggerMode`](#triggermode)\n- [`ActionSchedule`](#actionschedule)\n- [`ImmediateSchedule`](#immediateschedule)\n- [`DelayedSchedule`](#delayedschedule)\n- [`RelativeSchedule`](#relativeschedule)\n- [`DecisionTask`](#decisiontask)\n- [`TaskBase`](#taskbase)\n- [`Phase`](#phase)\n- [`VariableAssignment`](#variableassignment)\n- [`TaskType`](#tasktype)\n- [`Edge`](#edge)\n- [`Condition`](#condition)\n- [`Statement`](#statement)\n- [`EvaluationSource`](#evaluationsource)\n- [`Operator`](#operator)\n- [`DueDateConfig`](#duedateconfig)\n- [`TimeUnit`](#timeunit)\n- [`EnableRequirement`](#enablerequirement)\n- [`WorkflowDefinition`](#workflowdefinition)\n- [`Step`](#step)\n- [`Section`](#section)\n- [`TriggerType`](#triggertype)\n- [`ItemType`](#itemtype)\n- [`StepType`](#steptype)\n- [`StepJourney`](#stepjourney)\n- [`ECPDetails`](#ecpdetails)\n- [`PartnerDetails`](#partnerdetails)\n- [`StepDescription`](#stepdescription)\n- [`MaxAllowedLimit`](#maxallowedlimit)\n- [`DefinitionNotFoundResp`](#definitionnotfoundresp)\n- [`ClosingReasonNotFoundResp`](#closingreasonnotfoundresp)\n- [`ChangeReasonStatusReq`](#changereasonstatusreq)\n- [`ClosingReasons`](#closingreasons)\n- [`ClosingReason`](#closingreason)\n- [`ClosingReasonsStatus`](#closingreasonsstatus)\n- [`ClosingReasonsIds`](#closingreasonsids)\n- [`ClosingReasonId`](#closingreasonid)\n- [`ErrorResp`](#errorresp)\n- [`UpdateEntityAttributes`](#updateentityattributes)\n- [`EntitySync`](#entitysync)\n- [`DynamicDueDate`](#dynamicduedate)\n- [`StepRequirement`](#steprequirement)\n\n### `getMaxAllowedLimit`\n\nGet limits and number of created executions for an Organization.\n\n`GET /v1/workflows/limits/max-allowed`\n\n```ts\nconst { data } = await client.getMaxAllowedLimit()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "currentNoOfWorkflows": 0,\n "maxAllowed": 0\n}\n```\n\n</details>\n\n---\n\n### `getDefinitions`\n\nRetrieve all Workflow Definitions from an Organization\n\n`GET /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.getDefinitions()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {},\n {}\n ],\n "closingReasons": [\n {}\n ],\n "updateEntityAttributes": [\n {}\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n }\n]\n```\n\n</details>\n\n---\n\n### `createDefinition`\n\nCreate a Workflow Definition.\n\n`POST /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.createDefinition(\n null,\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `listFlowTemplates`\n\nList all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values.\n\n`GET /v2/flows/templates`\n\n```ts\nconst { data } = await client.listFlowTemplates({\n trigger_type: \'example\',\n trigger_source_id: \'example\',\n trigger_schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {},\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [],\n "phases": [],\n "tasks": [],\n "edges": [],\n "closing_reasons": [],\n "entity_sync": [],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createFlowTemplate`\n\nCreate a new Flow Template.\n\n`POST /v2/flows/templates`\n\n```ts\nconst { data } = await client.createFlowTemplate(\n null,\n {\n id: \'string\',\n org_id: \'string\',\n name: \'string\',\n description: \'string\',\n trigger: {\n type: \'automation\',\n automation_id: \'g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg\'\n },\n enabled: true,\n version: 2,\n created_at: \'2021-04-27T12:01:13.000Z\',\n updated_at: \'2021-04-27T12:01:13.000Z\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n available_in_ecp: true,\n additional_triggers: [\n {\n id: \'string\',\n type: \'manual\',\n entity_schema: \'string\'\n },\n {\n id: \'string\',\n type: \'automation\',\n automation_id: \'string\',\n input_entity: \'thread\',\n trigger_config: [ /* ... */ ]\n },\n /* ... 2 more */\n ],\n phases: [\n {\n id: \'string\',\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n assigned_to: [\'string\'],\n taxonomies: [\'string\']\n }\n ],\n tasks: [\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `searchFlowTemplates`\n\nSearch for flow templates by name, trigger type, enabled status, and more.\n\n`POST /v2/flows/templates:search`\n\n```ts\nconst { data } = await client.searchFlowTemplates(\n null,\n {\n name: \'string\',\n definition_id: \'string\',\n trigger_type: \'journey_submission\',\n enabled: true,\n from: 0,\n size: 0,\n sort_by: \'updated_at\',\n sort_order: \'desc\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {},\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [],\n "phases": [],\n "tasks": [],\n "edges": [],\n "closing_reasons": [],\n "entity_sync": [],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getFlowTemplate`\n\nGet specific FLow template for a customer\n\n`GET /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.getFlowTemplate({\n flowId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `updateFlowTemplate`\n\nUpdate Flow Template.\n\n`PUT /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.updateFlowTemplate(\n {\n flowId: \'example\',\n },\n {\n id: \'string\',\n org_id: \'string\',\n name: \'string\',\n description: \'string\',\n trigger: {\n type: \'automation\',\n automation_id: \'g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg\'\n },\n enabled: true,\n version: 2,\n created_at: \'2021-04-27T12:01:13.000Z\',\n updated_at: \'2021-04-27T12:01:13.000Z\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n available_in_ecp: true,\n additional_triggers: [\n {\n id: \'string\',\n type: \'manual\',\n entity_schema: \'string\'\n },\n {\n id: \'string\',\n type: \'automation\',\n automation_id: \'string\',\n input_entity: \'thread\',\n trigger_config: [ /* ... */ ]\n },\n /* ... 2 more */\n ],\n phases: [\n {\n id: \'string\',\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n assigned_to: [\'string\'],\n taxonomies: [\'string\']\n }\n ],\n tasks: [\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `deleteFlowTemplate`\n\nDelete Flow Template.\n\n`DELETE /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.deleteFlowTemplate({\n flowId: \'example\',\n})\n```\n\n---\n\n### `duplicateFlowTemplate`\n\nDuplicate a Flow Template from an existing workflow.\n\n`POST /v2/flows/templates/{flowId}/duplicate`\n\n```ts\nconst { data } = await client.duplicateFlowTemplate({\n flowId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `getDefinition`\n\nGet specific Definition by id from the Organization.\n\n`GET /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.getDefinition({\n definitionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `updateDefinition`\n\nUpdate Workflow Definition.\n\n`PUT /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.updateDefinition(\n {\n definitionId: \'example\',\n },\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `deleteDefinition`\n\nDelete Workflow Definition.\n\n`DELETE /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.deleteDefinition({\n definitionId: \'example\',\n})\n```\n\n---\n\n### `getAllClosingReasons`\n\nGet all Closing Reasons defined in the organization by default all Active.\n\n`GET /v1/workflows/closing-reasons`\n\n```ts\nconst { data } = await client.getAllClosingReasons({\n includeInactive: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createClosingReason`\n\nA created Closing Reason is stored for the organization and will be displayed in the library of reasons.\n\n`POST /v1/workflows/closing-reasons`\n\n```ts\nconst { data } = await client.createClosingReason(\n null,\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `getClosingReason`\n\nGet specific closing reason by id from the organisation.\n\n`GET /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.getClosingReason({\n reasonId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateClosingReason`\n\nUpdate an existing closing reason\n\n`PATCH /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.updateClosingReason(\n {\n reasonId: \'example\',\n },\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteClosingReason`\n\nPermanently delete a closing reason (Using INACTIVE status is recommended instead)\n\n`DELETE /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.deleteClosingReason({\n reasonId: \'example\',\n})\n```\n\n---\n\n### `changeReasonStatus`\n\nChange the status of a Closing Reason (eg. ACTIVE to INACTIVE).\n\n`PATCH /v1/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.changeReasonStatus(\n {\n reasonId: \'example\',\n },\n {\n status: \'ACTIVE\'\n },\n)\n```\n\n---\n\n### `getWorkflowClosingReasons`\n\nReturns all closing reasons defined for the workflow.\n\n`GET /v1/workflows/definitions/{definitionId}/closing-reasons`\n\n```ts\nconst { data } = await client.getWorkflowClosingReasons({\n definitionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "x739cew"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `setWorkflowClosingReasons`\n\nSets which closing reasons are defined for this workflow, based on the entire closing reasons catalog.\n\n`PATCH /v1/workflows/definitions/{definitionId}/closing-reasons`\n\n```ts\nconst { data } = await client.setWorkflowClosingReasons(\n {\n definitionId: \'example\',\n },\n {\n reasons: [\n {\n id: \'x739cew\'\n }\n ]\n },\n)\n```\n\n---\n\n## Schemas\n\n### `FlowTemplateBase`\n\n```ts\ntype FlowTemplateBase = {\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n tasks: Array<{\n id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n // ...\n}\n```\n\n### `FlowTemplate`\n\n```ts\ntype FlowTemplate = {\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n tasks: Array<{\n id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n // ...\n}\n```\n\n### `Version`\n\nVersion of the workflow schema.\n\n- `v1` \u2013 *Deprecated*. The initial version of workflows with limited structure and automation capabilities.\n- `v2` \u2013 Linear workflows. Supports sequential task execution with basic automation triggers.\n- `v3` \u2013 Advanced workflows. Adds support for branching logic (co\n\n```ts\ntype Version = "v1" | "v2" | "v3"\n```\n\n### `Trigger`\n\n```ts\ntype Trigger = {\n id?: string\n type: "manual"\n entity_schema?: string\n} | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: string\n configuration?: Record<string, unknown>\n }>\n} | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n} | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n}\n```\n\n### `ManualTrigger`\n\n```ts\ntype ManualTrigger = {\n id?: string\n type: "manual"\n entity_schema?: string\n}\n```\n\n### `AutomationTrigger`\n\n```ts\ntype AutomationTrigger = {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: string\n configuration?: Record<string, unknown>\n }>\n}\n```\n\n### `JourneyAutomationTrigger`\n\n```ts\ntype JourneyAutomationTrigger = {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n}\n```\n\n### `JourneySubmissionTrigger`\n\n```ts\ntype JourneySubmissionTrigger = {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n}\n```\n\n### `CreateFlowTemplate`\n\n```ts\ntype CreateFlowTemplate = {\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n tasks: Array<{\n id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n // ...\n}\n```\n\n### `SearchFlowTemplates`\n\n```ts\ntype SearchFlowTemplates = {\n name?: string\n definition_id?: string\n trigger_type?: "journey_submission" | "manual" | "automation"\n enabled?: boolean\n from?: number\n size?: number\n sort_by?: "created_at" | "updated_at"\n sort_order?: "asc" | "desc"\n}\n```\n\n### `FlowTemplatesList`\n\n```ts\ntype FlowTemplatesList = {\n results: Array<{\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n input_entity?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n input_entity?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }>\n phases?: Array<{\n id: { ... }\n name: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n assigned_to?: { ... }\n taxonomies?: { ... }\n }>\n tasks: Array<{\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n taxonomies?: { ... }\n phase_id?: { ... }\n task_type: { ... }\n } | {\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n // ...\n}\n```\n\n### `FlowTemplateId`\n\nShort unique id (length 8) to identify the Flow Template.\n\n```ts\ntype FlowTemplateId = string\n```\n\n### `Task`\n\n```ts\ntype Task = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n} | {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n // ...\n}\n```\n\n### `ManualTask`\n\n```ts\ntype ManualTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `AutomationTask`\n\n```ts\ntype AutomationTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n automation_config: {\n flow_id?: string\n action_config?: {\n type: { ... }\n config?: { ... }\n }\n duplicated_flow_id?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n }\n }\n trigger_mode?: "manual" | "automatic"\n schedule?: {\n mode?: "immediate"\n } | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n } | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n }\n created_automatically?: boolean\n}\n```\n\n### `AutomationConfig`\n\nConfiguration for automation execution to run\n\n```ts\ntype AutomationConfig = {\n flow_id?: string\n action_config?: {\n type: string\n config?: Record<string, unknown>\n }\n duplicated_flow_id?: string\n input_context?: {\n source: "trigger" | "task"\n task_id?: string\n }\n}\n```\n\n### `AutomationInputContext`\n\nOptional. Source of the entity fed into this automation task. If omitted, the workflow\'s primary entity is used.\n\n\n```ts\ntype AutomationInputContext = {\n source: "trigger" | "task"\n task_id?: string\n}\n```\n\n### `AiAgentTask`\n\n```ts\ntype AiAgentTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n agent_config?: {\n agent_id: string\n }\n}\n```\n\n### `AgentConfig`\n\nConfiguration for AI Agent to run\n\n```ts\ntype AgentConfig = {\n agent_id: string\n}\n```\n\n### `TriggerMode`\n\n```ts\ntype TriggerMode = "manual" | "automatic"\n```\n\n### `ActionSchedule`\n\n```ts\ntype ActionSchedule = {\n mode?: "immediate"\n} | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n} | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `ImmediateSchedule`\n\n```ts\ntype ImmediateSchedule = {\n mode?: "immediate"\n}\n```\n\n### `DelayedSchedule`\n\n```ts\ntype DelayedSchedule = {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n}\n```\n\n### `RelativeSchedule`\n\n```ts\ntype RelativeSchedule = {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `DecisionTask`\n\n```ts\ntype DecisionTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n trigger_mode: "manual" | "automatic"\n conditions: Array<{\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: { ... }\n source: { ... }\n operator: { ... }\n values: { ... }\n value_type?: { ... }\n }>\n }>\n allow_parallel_execution?: boolean\n schedule?: {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n } | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n }\n loop_config?: {\n loop_branch_id: string\n exit_branch_id: string\n max_iterations: number\n }\n}\n```\n\n### `TaskBase`\n\n```ts\ntype TaskBase = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `Phase`\n\n```ts\ntype Phase = {\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `VariableAssignment`\n\nRepresents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.\n\n```ts\ntype VariableAssignment = {\n variable: string\n value?: string[]\n}\n```\n\n### `TaskType`\n\n```ts\ntype TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n```\n\n### `Edge`\n\n```ts\ntype Edge = {\n id: string\n from_id: string\n to_id?: string\n condition_id?: string\n none_met?: boolean\n}\n```\n\n### `Condition`\n\n```ts\ntype Condition = {\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: string\n source: {\n id?: { ... }\n origin?: { ... }\n origin_type?: { ... }\n schema?: { ... }\n attribute?: { ... }\n attribute_type?: { ... }\n attribute_repeatable?: { ... }\n attribute_operation?: { ... }\n attribute_sub_field?: { ... }\n date_offset?: { ... }\n }\n 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"\n values: string[]\n value_type?: "static" | "relative_date"\n }>\n}\n```\n\n### `Statement`\n\n```ts\ntype Statement = {\n id: string\n source: {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n 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"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n date_offset?: {\n amount?: { ... }\n unit?: { ... }\n }\n }\n 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"\n values: string[]\n value_type?: "static" | "relative_date"\n}\n```\n\n### `EvaluationSource`\n\n```ts\ntype EvaluationSource = {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n 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"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n date_offset?: {\n amount?: number\n unit?: "days" | "months" | "years"\n }\n}\n```\n\n### `Operator`\n\n```ts\ntype 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"\n```\n\n### `DueDateConfig`\n\nSet due date for the task based on a dynamic condition\n\n```ts\ntype DueDateConfig = {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n}\n```\n\n### `TimeUnit`\n\n```ts\ntype TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months"\n```\n\n### `EnableRequirement`\n\ndescribe the requirement for a task to be enabled\n\n```ts\ntype EnableRequirement = {\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n}\n```\n\n### `WorkflowDefinition`\n\n```ts\ntype WorkflowDefinition = {\n id?: string\n name: string\n description?: string\n creationTime?: string\n enabled?: boolean\n lastUpdateTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n assignedTo?: string[]\n enableECPWorkflow?: boolean\n flow: Array<{\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n assignedTo?: string[]\n steps: Array<{\n id?: { ... }\n name: { ... }\n description?: { ... }\n executionType?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n order: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n userIds?: { ... }\n requirements?: { ... }\n assignedTo?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n // ...\n}\n```\n\n### `Step`\n\nAction that needs to be done in a Workflow\n\n```ts\ntype Step = {\n id?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n}\n```\n\n### `Section`\n\nA group of Steps that define the progress of the Workflow\n\n```ts\ntype Section = {\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n assignedTo?: string[]\n steps: Array<{\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n }\n taxonomies?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `TriggerType`\n\n```ts\ntype TriggerType = "MANUAL" | "AUTOMATIC"\n```\n\n### `ItemType`\n\n```ts\ntype ItemType = "STEP" | "SECTION"\n```\n\n### `StepType`\n\n```ts\ntype StepType = "MANUAL" | "AUTOMATION"\n```\n\n### `StepJourney`\n\n```ts\ntype StepJourney = {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n}\n```\n\n### `ECPDetails`\n\nDetails regarding ECP for the workflow step\n\n```ts\ntype ECPDetails = {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n}\n```\n\n### `PartnerDetails`\n\nDetails regarding partner for the workflow step\n\n```ts\ntype PartnerDetails = {\n enabled?: boolean\n label?: string\n description?: string\n}\n```\n\n### `StepDescription`\n\nLonger information regarding Task\n\n```ts\ntype StepDescription = {\n enabled?: boolean\n value?: string\n}\n```\n\n### `MaxAllowedLimit`\n\n```ts\ntype MaxAllowedLimit = {\n currentNoOfWorkflows?: number\n maxAllowed?: number\n}\n```\n\n### `DefinitionNotFoundResp`\n\nDefinition could be not found\n\n```ts\ntype DefinitionNotFoundResp = {\n message?: string\n}\n```\n\n### `ClosingReasonNotFoundResp`\n\nClosing reason could be not found\n\n```ts\ntype ClosingReasonNotFoundResp = {\n message?: string\n}\n```\n\n### `ChangeReasonStatusReq`\n\n```ts\ntype ChangeReasonStatusReq = {\n status: "ACTIVE" | "INACTIVE"\n}\n```\n\n### `ClosingReasons`\n\n```ts\ntype ClosingReasons = {\n reasons: Array<{\n id?: string\n title?: string\n status?: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n }>\n}\n```\n\n### `ClosingReason`\n\nOne Closing reason for a workflow\n\n```ts\ntype ClosingReason = {\n id?: string\n title?: string\n status?: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n}\n```\n\n### `ClosingReasonsStatus`\n\n```ts\ntype ClosingReasonsStatus = "ACTIVE" | "INACTIVE"\n```\n\n### `ClosingReasonsIds`\n\n```ts\ntype ClosingReasonsIds = {\n reasons: Array<{\n id: string\n }>\n}\n```\n\n### `ClosingReasonId`\n\n```ts\ntype ClosingReasonId = {\n id: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `UpdateEntityAttributes`\n\n```ts\ntype UpdateEntityAttributes = {\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `EntitySync`\n\n```ts\ntype EntitySync = {\n trigger: {\n event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress"\n filter?: {\n task_template_id?: { ... }\n phase_template_id?: { ... }\n }\n }\n value: {\n source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value"\n value?: string\n }\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `DynamicDueDate`\n\nset a Duedate for a step then a specific\n\n```ts\ntype DynamicDueDate = {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n}\n```\n\n### `StepRequirement`\n\ndescribe the requirement for step enablement\n\n```ts\ntype StepRequirement = {\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n}\n```\n';
5
+
6
+
7
+ exports.default = workflow_definition_default;
@@ -68,6 +68,31 @@ declare namespace Components {
68
68
  [name: string]: any;
69
69
  };
70
70
  };
71
+ /**
72
+ * Transient field. When present, the backend clones the automation flow referenced by this ID and assigns the new flow_id to the task. Used when duplicating an automation task to give it an independent automation. Stripped before storage.
73
+ *
74
+ */
75
+ duplicated_flow_id?: string;
76
+ input_context?: /**
77
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
78
+ *
79
+ */
80
+ AutomationInputContext;
81
+ }
82
+ /**
83
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
84
+ *
85
+ */
86
+ export interface AutomationInputContext {
87
+ /**
88
+ * `trigger` = workflow's primary (trigger) entity. `task` = entity produced by an upstream task in the graph.
89
+ *
90
+ */
91
+ source: "trigger" | "task";
92
+ /**
93
+ * Required when source is `task`. The id of the upstream task whose output entity should feed this task.
94
+ */
95
+ task_id?: string;
71
96
  }
72
97
  export interface AutomationTask {
73
98
  id: string;
@@ -109,6 +134,11 @@ declare namespace Components {
109
134
  * Id of the automation config that triggers this workflow
110
135
  */
111
136
  automation_id?: string;
137
+ /**
138
+ * For email thread triggers, specifies which entity from the triggered email thread to use as the primary input for automation and decision tasks. Defaults to `thread` when not specified.
139
+ *
140
+ */
141
+ input_entity?: "thread" | "first_email" | "last_email";
112
142
  /**
113
143
  * Transient field. Trigger configurations for creating or updating the trigger automation flow. Each item follows the automation API trigger schema. Processed by the backend during create/update and stripped before storage.
114
144
  *
@@ -293,6 +323,10 @@ declare namespace Components {
293
323
  task_type: TaskType;
294
324
  trigger_mode: TriggerMode;
295
325
  conditions: Condition[];
326
+ /**
327
+ * When true, all branches with met conditions execute in parallel. When false, only the first branch with a met condition is executed. Defaults to true for backwards compatibility.
328
+ */
329
+ allow_parallel_execution?: boolean;
296
330
  schedule?: DelayedSchedule | RelativeSchedule;
297
331
  loop_config?: {
298
332
  /**
@@ -1345,6 +1379,7 @@ declare namespace Paths {
1345
1379
  export type $200 = Components.Schemas.FlowTemplate;
1346
1380
  export type $400 = Components.Schemas.ErrorResp;
1347
1381
  export type $401 = Components.Schemas.ErrorResp;
1382
+ export type $409 = Components.Schemas.ErrorResp;
1348
1383
  export type $500 = Components.Schemas.ErrorResp;
1349
1384
  }
1350
1385
  }
@@ -1826,6 +1861,7 @@ type ActionSchedule = Components.Schemas.ActionSchedule;
1826
1861
  type AgentConfig = Components.Schemas.AgentConfig;
1827
1862
  type AiAgentTask = Components.Schemas.AiAgentTask;
1828
1863
  type AutomationConfig = Components.Schemas.AutomationConfig;
1864
+ type AutomationInputContext = Components.Schemas.AutomationInputContext;
1829
1865
  type AutomationTask = Components.Schemas.AutomationTask;
1830
1866
  type AutomationTrigger = Components.Schemas.AutomationTrigger;
1831
1867
  type ChangeReasonStatusReq = Components.Schemas.ChangeReasonStatusReq;
@@ -1883,4 +1919,4 @@ type VariableAssignment = Components.Schemas.VariableAssignment;
1883
1919
  type Version = Components.Schemas.Version;
1884
1920
  type WorkflowDefinition = Components.Schemas.WorkflowDefinition;
1885
1921
 
1886
- export { type StepType as $, type ActionSchedule as A, type FlowTemplateId as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type FlowTemplate as F, type FlowTemplatesList as G, type ItemType as H, type ImmediateSchedule as I, type JourneyAutomationTrigger as J, type JourneySubmissionTrigger as K, type ManualTrigger as L, type ManualTask as M, type MaxAllowedLimit as N, type OperationMethods as O, Paths as P, type Operator as Q, type PartnerDetails as R, type Phase as S, type RelativeSchedule as T, SearchFlowTemplates as U, type Section as V, type Statement as W, type Step as X, type StepDescription as Y, type StepJourney as Z, type StepRequirement as _, Components as a, type Task as a0, type TaskBase as a1, type TaskType as a2, type TimeUnit as a3, type Trigger as a4, type TriggerMode as a5, type TriggerType as a6, type UpdateEntityAttributes as a7, type VariableAssignment as a8, type Version as a9, type WorkflowDefinition as aa, type PathsDictionary as b, type AgentConfig as c, type AiAgentTask as d, type AutomationConfig as e, type AutomationTask as f, type AutomationTrigger as g, type ChangeReasonStatusReq as h, type ClosingReason as i, type ClosingReasonId as j, type ClosingReasonNotFoundResp as k, type ClosingReasons as l, type ClosingReasonsIds as m, type ClosingReasonsStatus as n, type Condition as o, CreateFlowTemplate as p, type DefinitionNotFoundResp as q, type DelayedSchedule as r, type DueDateConfig as s, type DynamicDueDate as t, type Edge as u, type EnableRequirement as v, type EntitySync as w, type ErrorResp as x, type EvaluationSource as y, type FlowTemplateBase as z };
1922
+ export { type StepRequirement as $, type ActionSchedule as A, type FlowTemplateBase as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type FlowTemplate as F, type FlowTemplateId as G, type FlowTemplatesList as H, type ImmediateSchedule as I, type ItemType as J, type JourneyAutomationTrigger as K, type JourneySubmissionTrigger as L, type ManualTask as M, type ManualTrigger as N, type OperationMethods as O, Paths as P, type MaxAllowedLimit as Q, type Operator as R, type PartnerDetails as S, type Phase as T, type RelativeSchedule as U, SearchFlowTemplates as V, type Section as W, type Statement as X, type Step as Y, type StepDescription as Z, type StepJourney as _, Components as a, type StepType as a0, type Task as a1, type TaskBase as a2, type TaskType as a3, type TimeUnit as a4, type Trigger as a5, type TriggerMode as a6, type TriggerType as a7, type UpdateEntityAttributes as a8, type VariableAssignment as a9, type Version as aa, type WorkflowDefinition as ab, type PathsDictionary as b, type AgentConfig as c, type AiAgentTask as d, type AutomationConfig as e, type AutomationInputContext as f, type AutomationTask as g, type AutomationTrigger as h, type ChangeReasonStatusReq as i, type ClosingReason as j, type ClosingReasonId as k, type ClosingReasonNotFoundResp as l, type ClosingReasons as m, type ClosingReasonsIds as n, type ClosingReasonsStatus as o, type Condition as p, CreateFlowTemplate as q, type DefinitionNotFoundResp as r, type DelayedSchedule as s, type DueDateConfig as t, type DynamicDueDate as u, type Edge as v, type EnableRequirement as w, type EntitySync as x, type ErrorResp as y, type EvaluationSource as z };
@@ -68,6 +68,31 @@ declare namespace Components {
68
68
  [name: string]: any;
69
69
  };
70
70
  };
71
+ /**
72
+ * Transient field. When present, the backend clones the automation flow referenced by this ID and assigns the new flow_id to the task. Used when duplicating an automation task to give it an independent automation. Stripped before storage.
73
+ *
74
+ */
75
+ duplicated_flow_id?: string;
76
+ input_context?: /**
77
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
78
+ *
79
+ */
80
+ AutomationInputContext;
81
+ }
82
+ /**
83
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
84
+ *
85
+ */
86
+ export interface AutomationInputContext {
87
+ /**
88
+ * `trigger` = workflow's primary (trigger) entity. `task` = entity produced by an upstream task in the graph.
89
+ *
90
+ */
91
+ source: "trigger" | "task";
92
+ /**
93
+ * Required when source is `task`. The id of the upstream task whose output entity should feed this task.
94
+ */
95
+ task_id?: string;
71
96
  }
72
97
  export interface AutomationTask {
73
98
  id: string;
@@ -109,6 +134,11 @@ declare namespace Components {
109
134
  * Id of the automation config that triggers this workflow
110
135
  */
111
136
  automation_id?: string;
137
+ /**
138
+ * For email thread triggers, specifies which entity from the triggered email thread to use as the primary input for automation and decision tasks. Defaults to `thread` when not specified.
139
+ *
140
+ */
141
+ input_entity?: "thread" | "first_email" | "last_email";
112
142
  /**
113
143
  * Transient field. Trigger configurations for creating or updating the trigger automation flow. Each item follows the automation API trigger schema. Processed by the backend during create/update and stripped before storage.
114
144
  *
@@ -293,6 +323,10 @@ declare namespace Components {
293
323
  task_type: TaskType;
294
324
  trigger_mode: TriggerMode;
295
325
  conditions: Condition[];
326
+ /**
327
+ * When true, all branches with met conditions execute in parallel. When false, only the first branch with a met condition is executed. Defaults to true for backwards compatibility.
328
+ */
329
+ allow_parallel_execution?: boolean;
296
330
  schedule?: DelayedSchedule | RelativeSchedule;
297
331
  loop_config?: {
298
332
  /**
@@ -1345,6 +1379,7 @@ declare namespace Paths {
1345
1379
  export type $200 = Components.Schemas.FlowTemplate;
1346
1380
  export type $400 = Components.Schemas.ErrorResp;
1347
1381
  export type $401 = Components.Schemas.ErrorResp;
1382
+ export type $409 = Components.Schemas.ErrorResp;
1348
1383
  export type $500 = Components.Schemas.ErrorResp;
1349
1384
  }
1350
1385
  }
@@ -1826,6 +1861,7 @@ type ActionSchedule = Components.Schemas.ActionSchedule;
1826
1861
  type AgentConfig = Components.Schemas.AgentConfig;
1827
1862
  type AiAgentTask = Components.Schemas.AiAgentTask;
1828
1863
  type AutomationConfig = Components.Schemas.AutomationConfig;
1864
+ type AutomationInputContext = Components.Schemas.AutomationInputContext;
1829
1865
  type AutomationTask = Components.Schemas.AutomationTask;
1830
1866
  type AutomationTrigger = Components.Schemas.AutomationTrigger;
1831
1867
  type ChangeReasonStatusReq = Components.Schemas.ChangeReasonStatusReq;
@@ -1883,4 +1919,4 @@ type VariableAssignment = Components.Schemas.VariableAssignment;
1883
1919
  type Version = Components.Schemas.Version;
1884
1920
  type WorkflowDefinition = Components.Schemas.WorkflowDefinition;
1885
1921
 
1886
- export { type StepType as $, type ActionSchedule as A, type FlowTemplateId as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type FlowTemplate as F, type FlowTemplatesList as G, type ItemType as H, type ImmediateSchedule as I, type JourneyAutomationTrigger as J, type JourneySubmissionTrigger as K, type ManualTrigger as L, type ManualTask as M, type MaxAllowedLimit as N, type OperationMethods as O, Paths as P, type Operator as Q, type PartnerDetails as R, type Phase as S, type RelativeSchedule as T, SearchFlowTemplates as U, type Section as V, type Statement as W, type Step as X, type StepDescription as Y, type StepJourney as Z, type StepRequirement as _, Components as a, type Task as a0, type TaskBase as a1, type TaskType as a2, type TimeUnit as a3, type Trigger as a4, type TriggerMode as a5, type TriggerType as a6, type UpdateEntityAttributes as a7, type VariableAssignment as a8, type Version as a9, type WorkflowDefinition as aa, type PathsDictionary as b, type AgentConfig as c, type AiAgentTask as d, type AutomationConfig as e, type AutomationTask as f, type AutomationTrigger as g, type ChangeReasonStatusReq as h, type ClosingReason as i, type ClosingReasonId as j, type ClosingReasonNotFoundResp as k, type ClosingReasons as l, type ClosingReasonsIds as m, type ClosingReasonsStatus as n, type Condition as o, CreateFlowTemplate as p, type DefinitionNotFoundResp as q, type DelayedSchedule as r, type DueDateConfig as s, type DynamicDueDate as t, type Edge as u, type EnableRequirement as v, type EntitySync as w, type ErrorResp as x, type EvaluationSource as y, type FlowTemplateBase as z };
1922
+ export { type StepRequirement as $, type ActionSchedule as A, type FlowTemplateBase as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type FlowTemplate as F, type FlowTemplateId as G, type FlowTemplatesList as H, type ImmediateSchedule as I, type ItemType as J, type JourneyAutomationTrigger as K, type JourneySubmissionTrigger as L, type ManualTask as M, type ManualTrigger as N, type OperationMethods as O, Paths as P, type MaxAllowedLimit as Q, type Operator as R, type PartnerDetails as S, type Phase as T, type RelativeSchedule as U, SearchFlowTemplates as V, type Section as W, type Statement as X, type Step as Y, type StepDescription as Z, type StepJourney as _, Components as a, type StepType as a0, type Task as a1, type TaskBase as a2, type TaskType as a3, type TimeUnit as a4, type Trigger as a5, type TriggerMode as a6, type TriggerType as a7, type UpdateEntityAttributes as a8, type VariableAssignment as a9, type Version as aa, type WorkflowDefinition as ab, type PathsDictionary as b, type AgentConfig as c, type AiAgentTask as d, type AutomationConfig as e, type AutomationInputContext as f, type AutomationTask as g, type AutomationTrigger as h, type ChangeReasonStatusReq as i, type ClosingReason as j, type ClosingReasonId as k, type ClosingReasonNotFoundResp as l, type ClosingReasons as m, type ClosingReasonsIds as n, type ClosingReasonsStatus as o, type Condition as p, CreateFlowTemplate as q, type DefinitionNotFoundResp as r, type DelayedSchedule as s, type DueDateConfig as t, type DynamicDueDate as u, type Edge as v, type EnableRequirement as w, type EntitySync as x, type ErrorResp as y, type EvaluationSource as z };
@@ -223,6 +223,26 @@ declare namespace Components {
223
223
  */
224
224
  execution_status?: string;
225
225
  error_reason?: string;
226
+ input_context?: /**
227
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
228
+ *
229
+ */
230
+ AutomationInputContext;
231
+ }
232
+ /**
233
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
234
+ *
235
+ */
236
+ export interface AutomationInputContext {
237
+ /**
238
+ * `trigger` = workflow's primary (trigger) entity. `task` = entity produced by an upstream task in the graph.
239
+ *
240
+ */
241
+ source: "trigger" | "task";
242
+ /**
243
+ * Required when source is `task`. The id of the upstream task whose output entity should feed this task.
244
+ */
245
+ task_id?: string;
226
246
  }
227
247
  export interface AutomationTask {
228
248
  id: TaskId;
@@ -3043,6 +3063,7 @@ type AnalyticsInfo = Components.Schemas.AnalyticsInfo;
3043
3063
  type Assignees = Components.Schemas.Assignees;
3044
3064
  type AutomationConfig = Components.Schemas.AutomationConfig;
3045
3065
  type AutomationInfo = Components.Schemas.AutomationInfo;
3066
+ type AutomationInputContext = Components.Schemas.AutomationInputContext;
3046
3067
  type AutomationTask = Components.Schemas.AutomationTask;
3047
3068
  type ClosingReason = Components.Schemas.ClosingReason;
3048
3069
  type ClosingReasonResp = Components.Schemas.ClosingReasonResp;
@@ -3127,4 +3148,4 @@ type WorkflowExecutionUpdateReq = Components.Schemas.WorkflowExecutionUpdateReq;
3127
3148
  type WorkflowInEntity = Components.Schemas.WorkflowInEntity;
3128
3149
  type WorkflowStatus = Components.Schemas.WorkflowStatus;
3129
3150
 
3130
- export { type PhaseInEntity as $, type ActionSchedule as A, type FlowClosingReason as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type Flow as F, type FlowContext as G, type FlowExecution as H, type FlowExecutionId as I, type FlowSlim as J, type FlowTemplateId as K, type FlowTrigger as L, type ImmediateSchedule as M, type ItemType as N, type OperationMethods as O, Paths as P, type LastEvaluatedKey as Q, type LoopConfig as R, type LoopInfo as S, type ManualTask as T, type Operator as U, type PartnerDetails as V, type PatchFlowReq as W, type PatchPhaseReq as X, type PatchTaskReq as Y, type Phase as Z, type PhaseId as _, Components as a, type RelativeSchedule as a0, type SearchExecutionsReq as a1, type SearchExecutionsResp as a2, type SearchFlowsReq as a3, type SearchPagination as a4, type SearchSorting as a5, type SearchStepsReq as a6, type SearchStepsResp as a7, type Section as a8, type SectionSimplified as a9, type WorkflowExecution as aA, type WorkflowExecutionBase as aB, type WorkflowExecutionCreateReq as aC, type WorkflowExecutionSlim as aD, type WorkflowExecutionUpdateReq as aE, type WorkflowInEntity as aF, type WorkflowStatus as aG, type SectionStatus as aa, type StartFlowReq as ab, type Statement as ac, type Step as ad, type StepDescription as ae, type StepExtended as af, type StepId as ag, type StepJourney as ah, type StepPositionAt as ai, type StepRequirement as aj, type StepSimplified as ak, type StepStatus as al, type StepType as am, type Task as an, type TaskBase as ao, type TaskId as ap, type TaskType as aq, type TimeUnit as ar, type TriggerMode as as, type TriggerType as at, type UpdateEntityAttributes as au, type UpdateStepReq as av, type UpdateStepResp as aw, type UserId as ax, type VariableAssignment as ay, type WorkflowContext as az, type PathsDictionary as b, type AddTaskReq as c, type AgentConfig as d, type AgentExecutionInfo as e, type AiAgentTask as f, type AnalyticsInfo as g, type Assignees as h, type AutomationConfig as i, type AutomationInfo as j, type AutomationTask as k, type ClosingReason as l, type ClosingReasonResp as m, type Condition as n, type ConditionId as o, type CreateStepReq as p, type DelayedSchedule as q, type DueDateConfig as r, type DynamicDueDate as s, type Edge as t, type EnableRequirement as u, type EntityRef as v, type EntitySync as w, type ErrorResp as x, type EvaluationSource as y, type ExecutionPaginationDynamo as z };
3151
+ export { type PhaseId as $, type ActionSchedule as A, type ExecutionPaginationDynamo as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type Flow as F, type FlowClosingReason as G, type FlowContext as H, type FlowExecution as I, type FlowExecutionId as J, type FlowSlim as K, type FlowTemplateId as L, type FlowTrigger as M, type ImmediateSchedule as N, type OperationMethods as O, Paths as P, type ItemType as Q, type LastEvaluatedKey as R, type LoopConfig as S, type LoopInfo as T, type ManualTask as U, type Operator as V, type PartnerDetails as W, type PatchFlowReq as X, type PatchPhaseReq as Y, type PatchTaskReq as Z, type Phase as _, Components as a, type PhaseInEntity as a0, type RelativeSchedule as a1, type SearchExecutionsReq as a2, type SearchExecutionsResp as a3, type SearchFlowsReq as a4, type SearchPagination as a5, type SearchSorting as a6, type SearchStepsReq as a7, type SearchStepsResp as a8, type Section as a9, type WorkflowContext as aA, type WorkflowExecution as aB, type WorkflowExecutionBase as aC, type WorkflowExecutionCreateReq as aD, type WorkflowExecutionSlim as aE, type WorkflowExecutionUpdateReq as aF, type WorkflowInEntity as aG, type WorkflowStatus as aH, type SectionSimplified as aa, type SectionStatus as ab, type StartFlowReq as ac, type Statement as ad, type Step as ae, type StepDescription as af, type StepExtended as ag, type StepId as ah, type StepJourney as ai, type StepPositionAt as aj, type StepRequirement as ak, type StepSimplified as al, type StepStatus as am, type StepType as an, type Task as ao, type TaskBase as ap, type TaskId as aq, type TaskType as ar, type TimeUnit as as, type TriggerMode as at, type TriggerType as au, type UpdateEntityAttributes as av, type UpdateStepReq as aw, type UpdateStepResp as ax, type UserId as ay, type VariableAssignment as az, type PathsDictionary as b, type AddTaskReq as c, type AgentConfig as d, type AgentExecutionInfo as e, type AiAgentTask as f, type AnalyticsInfo as g, type Assignees as h, type AutomationConfig as i, type AutomationInfo as j, type AutomationInputContext as k, type AutomationTask as l, type ClosingReason as m, type ClosingReasonResp as n, type Condition as o, type ConditionId as p, type CreateStepReq as q, type DelayedSchedule as r, type DueDateConfig as s, type DynamicDueDate as t, type Edge as u, type EnableRequirement as v, type EntityRef as w, type EntitySync as x, type ErrorResp as y, type EvaluationSource as z };
@@ -223,6 +223,26 @@ declare namespace Components {
223
223
  */
224
224
  execution_status?: string;
225
225
  error_reason?: string;
226
+ input_context?: /**
227
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
228
+ *
229
+ */
230
+ AutomationInputContext;
231
+ }
232
+ /**
233
+ * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used.
234
+ *
235
+ */
236
+ export interface AutomationInputContext {
237
+ /**
238
+ * `trigger` = workflow's primary (trigger) entity. `task` = entity produced by an upstream task in the graph.
239
+ *
240
+ */
241
+ source: "trigger" | "task";
242
+ /**
243
+ * Required when source is `task`. The id of the upstream task whose output entity should feed this task.
244
+ */
245
+ task_id?: string;
226
246
  }
227
247
  export interface AutomationTask {
228
248
  id: TaskId;
@@ -3043,6 +3063,7 @@ type AnalyticsInfo = Components.Schemas.AnalyticsInfo;
3043
3063
  type Assignees = Components.Schemas.Assignees;
3044
3064
  type AutomationConfig = Components.Schemas.AutomationConfig;
3045
3065
  type AutomationInfo = Components.Schemas.AutomationInfo;
3066
+ type AutomationInputContext = Components.Schemas.AutomationInputContext;
3046
3067
  type AutomationTask = Components.Schemas.AutomationTask;
3047
3068
  type ClosingReason = Components.Schemas.ClosingReason;
3048
3069
  type ClosingReasonResp = Components.Schemas.ClosingReasonResp;
@@ -3127,4 +3148,4 @@ type WorkflowExecutionUpdateReq = Components.Schemas.WorkflowExecutionUpdateReq;
3127
3148
  type WorkflowInEntity = Components.Schemas.WorkflowInEntity;
3128
3149
  type WorkflowStatus = Components.Schemas.WorkflowStatus;
3129
3150
 
3130
- export { type PhaseInEntity as $, type ActionSchedule as A, type FlowClosingReason as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type Flow as F, type FlowContext as G, type FlowExecution as H, type FlowExecutionId as I, type FlowSlim as J, type FlowTemplateId as K, type FlowTrigger as L, type ImmediateSchedule as M, type ItemType as N, type OperationMethods as O, Paths as P, type LastEvaluatedKey as Q, type LoopConfig as R, type LoopInfo as S, type ManualTask as T, type Operator as U, type PartnerDetails as V, type PatchFlowReq as W, type PatchPhaseReq as X, type PatchTaskReq as Y, type Phase as Z, type PhaseId as _, Components as a, type RelativeSchedule as a0, type SearchExecutionsReq as a1, type SearchExecutionsResp as a2, type SearchFlowsReq as a3, type SearchPagination as a4, type SearchSorting as a5, type SearchStepsReq as a6, type SearchStepsResp as a7, type Section as a8, type SectionSimplified as a9, type WorkflowExecution as aA, type WorkflowExecutionBase as aB, type WorkflowExecutionCreateReq as aC, type WorkflowExecutionSlim as aD, type WorkflowExecutionUpdateReq as aE, type WorkflowInEntity as aF, type WorkflowStatus as aG, type SectionStatus as aa, type StartFlowReq as ab, type Statement as ac, type Step as ad, type StepDescription as ae, type StepExtended as af, type StepId as ag, type StepJourney as ah, type StepPositionAt as ai, type StepRequirement as aj, type StepSimplified as ak, type StepStatus as al, type StepType as am, type Task as an, type TaskBase as ao, type TaskId as ap, type TaskType as aq, type TimeUnit as ar, type TriggerMode as as, type TriggerType as at, type UpdateEntityAttributes as au, type UpdateStepReq as av, type UpdateStepResp as aw, type UserId as ax, type VariableAssignment as ay, type WorkflowContext as az, type PathsDictionary as b, type AddTaskReq as c, type AgentConfig as d, type AgentExecutionInfo as e, type AiAgentTask as f, type AnalyticsInfo as g, type Assignees as h, type AutomationConfig as i, type AutomationInfo as j, type AutomationTask as k, type ClosingReason as l, type ClosingReasonResp as m, type Condition as n, type ConditionId as o, type CreateStepReq as p, type DelayedSchedule as q, type DueDateConfig as r, type DynamicDueDate as s, type Edge as t, type EnableRequirement as u, type EntityRef as v, type EntitySync as w, type ErrorResp as x, type EvaluationSource as y, type ExecutionPaginationDynamo as z };
3151
+ export { type PhaseId as $, type ActionSchedule as A, type ExecutionPaginationDynamo as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type Flow as F, type FlowClosingReason as G, type FlowContext as H, type FlowExecution as I, type FlowExecutionId as J, type FlowSlim as K, type FlowTemplateId as L, type FlowTrigger as M, type ImmediateSchedule as N, type OperationMethods as O, Paths as P, type ItemType as Q, type LastEvaluatedKey as R, type LoopConfig as S, type LoopInfo as T, type ManualTask as U, type Operator as V, type PartnerDetails as W, type PatchFlowReq as X, type PatchPhaseReq as Y, type PatchTaskReq as Z, type Phase as _, Components as a, type PhaseInEntity as a0, type RelativeSchedule as a1, type SearchExecutionsReq as a2, type SearchExecutionsResp as a3, type SearchFlowsReq as a4, type SearchPagination as a5, type SearchSorting as a6, type SearchStepsReq as a7, type SearchStepsResp as a8, type Section as a9, type WorkflowContext as aA, type WorkflowExecution as aB, type WorkflowExecutionBase as aC, type WorkflowExecutionCreateReq as aD, type WorkflowExecutionSlim as aE, type WorkflowExecutionUpdateReq as aF, type WorkflowInEntity as aG, type WorkflowStatus as aH, type SectionSimplified as aa, type SectionStatus as ab, type StartFlowReq as ac, type Statement as ad, type Step as ae, type StepDescription as af, type StepExtended as ag, type StepId as ah, type StepJourney as ai, type StepPositionAt as aj, type StepRequirement as ak, type StepSimplified as al, type StepStatus as am, type StepType as an, type Task as ao, type TaskBase as ap, type TaskId as aq, type TaskType as ar, type TimeUnit as as, type TriggerMode as at, type TriggerType as au, type UpdateEntityAttributes as av, type UpdateStepReq as aw, type UpdateStepResp as ax, type UserId as ay, type VariableAssignment as az, type PathsDictionary as b, type AddTaskReq as c, type AgentConfig as d, type AgentExecutionInfo as e, type AiAgentTask as f, type AnalyticsInfo as g, type Assignees as h, type AutomationConfig as i, type AutomationInfo as j, type AutomationInputContext as k, type AutomationTask as l, type ClosingReason as m, type ClosingReasonResp as n, type Condition as o, type ConditionId as p, type CreateStepReq as q, type DelayedSchedule as r, type DueDateConfig as s, type DynamicDueDate as t, type Edge as u, type EnableRequirement as v, type EntityRef as w, type EntitySync as x, type ErrorResp as y, type EvaluationSource as z };