@epilot/sdk 2.9.3 → 2.9.5

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 (139) hide show
  1. package/definitions/targeting-runtime.json +1 -1
  2. package/definitions/targeting.json +7 -2
  3. package/definitions/workflow-runtime.json +1 -1
  4. package/definitions/workflow.json +445 -60
  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/calendar.cjs +6 -6
  24. package/dist/apis/calendar.js +1 -1
  25. package/dist/apis/configuration-hub.cjs +6 -6
  26. package/dist/apis/configuration-hub.js +1 -1
  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/snapshot.cjs +6 -6
  90. package/dist/apis/snapshot.js +1 -1
  91. package/dist/apis/submission.cjs +6 -6
  92. package/dist/apis/submission.js +1 -1
  93. package/dist/apis/target.cjs +6 -6
  94. package/dist/apis/target.js +1 -1
  95. package/dist/apis/targeting.cjs +8 -8
  96. package/dist/apis/targeting.d.cts +2 -2
  97. package/dist/apis/targeting.d.ts +2 -2
  98. package/dist/apis/targeting.js +2 -2
  99. package/dist/apis/template-variables.cjs +6 -6
  100. package/dist/apis/template-variables.js +1 -1
  101. package/dist/apis/user.cjs +6 -6
  102. package/dist/apis/user.js +1 -1
  103. package/dist/apis/validation-rules.cjs +6 -6
  104. package/dist/apis/validation-rules.js +1 -1
  105. package/dist/apis/webhooks.cjs +6 -6
  106. package/dist/apis/webhooks.js +1 -1
  107. package/dist/apis/workflow-definition.cjs +6 -6
  108. package/dist/apis/workflow-definition.js +1 -1
  109. package/dist/apis/workflow.cjs +8 -8
  110. package/dist/apis/workflow.d.cts +2 -2
  111. package/dist/apis/workflow.d.ts +2 -2
  112. package/dist/apis/workflow.js +2 -2
  113. package/dist/{chunk-KQKBSWGI.js → chunk-522LYPPW.js} +1 -1
  114. package/dist/{chunk-MCK2QUSD.cjs → chunk-7ILTRJDQ.cjs} +1 -1
  115. package/dist/{chunk-MBVZHZAH.js → chunk-DBRYXXXY.js} +4 -4
  116. package/dist/{chunk-LSPXLT3A.js → chunk-H3NMCCSA.js} +1 -1
  117. package/dist/{chunk-DCHUVJL4.cjs → chunk-IIQYDQGR.cjs} +4 -4
  118. package/dist/{chunk-QNZPOA54.cjs → chunk-PM25LLET.cjs} +1 -1
  119. package/dist/index.cjs +12 -12
  120. package/dist/index.d.cts +2 -2
  121. package/dist/index.d.ts +2 -2
  122. package/dist/index.js +3 -3
  123. package/dist/{targeting-WC62BBZN.cjs → targeting-4YMBBPDW.cjs} +1 -1
  124. package/dist/{targeting-X4Y2ODBT.js → targeting-VCENULF6.js} +1 -1
  125. package/dist/{targeting-runtime-D5YUPZQM.js → targeting-runtime-QI7322HB.js} +1 -1
  126. package/dist/{targeting-runtime-MLMOM7CK.cjs → targeting-runtime-X3DQ527N.cjs} +2 -2
  127. package/dist/{targeting.d-0rNF7ErD.d.cts → targeting.d-Bq3onSes.d.cts} +1 -1
  128. package/dist/{targeting.d-0rNF7ErD.d.ts → targeting.d-Bq3onSes.d.ts} +1 -1
  129. package/dist/workflow-7OU2YEEI.cjs +7 -0
  130. package/dist/workflow-IVKCWS44.js +7 -0
  131. package/dist/{workflow-runtime-DNTQDYPQ.js → workflow-runtime-L5HMFISV.js} +1 -1
  132. package/dist/{workflow-runtime-VKFESVFX.cjs → workflow-runtime-LMGACZP4.cjs} +2 -2
  133. package/dist/{workflow.d-CMSKt8oN.d.cts → workflow.d-eFv0ecBi.d.cts} +745 -81
  134. package/dist/{workflow.d-CMSKt8oN.d.ts → workflow.d-eFv0ecBi.d.ts} +745 -81
  135. package/docs/targeting.md +1 -1
  136. package/docs/workflow.md +247 -47
  137. package/package.json +1 -1
  138. package/dist/workflow-3WBD74WR.js +0 -7
  139. package/dist/workflow-WIUZ5TOX.cjs +0 -7
@@ -1,7 +1,7 @@
1
1
  import "./chunk-YPSWSI3M.js";
2
2
 
3
3
  // src/docs/targeting.json
4
- var targeting_default = '# Targeting API\n\n- **Base URL:** `https://targeting.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/targeting](https://docs.epilot.io/api/targeting)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.targeting.changeCampaignStatus(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/targeting\'\n\nconst targetingClient = getClient()\nauthorize(targetingClient, () => \'<token>\')\nconst { data } = await targetingClient.changeCampaignStatus(...)\n```\n\n## Operations\n\n**Campaign**\n- [`changeCampaignStatus`](#changecampaignstatus)\n- [`getCampaignJobStatus`](#getcampaignjobstatus)\n- [`getCampaignPortals`](#getcampaignportals)\n- [`setupCampaign`](#setupcampaign)\n- [`matchCampaigns`](#matchcampaigns)\n\n**Campaign Delivery**\n- [`retriggerCampaignAutomations`](#retriggercampaignautomations)\n\n**Target**\n- [`matchTargets`](#matchtargets)\n- [`getTargetQueries`](#gettargetqueries)\n\n**Campaign Recipient**\n- [`createRecipient`](#createrecipient)\n- [`updateRecipient`](#updaterecipient)\n- [`updateRecipientPortalStatus`](#updaterecipientportalstatus)\n- [`getRecipients`](#getrecipients)\n\n**Schemas**\n- [`BaseError`](#baseerror)\n- [`ServerError`](#servererror)\n- [`ClientError`](#clienterror)\n- [`BaseUUID`](#baseuuid)\n- [`BaseNanoID`](#basenanoid)\n- [`BaseTags`](#basetags)\n- [`BaseRelation`](#baserelation)\n- [`BaseSystemId`](#basesystemid)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`BaseSystemFields`](#basesystemfields)\n- [`BaseSystemFieldsRequired`](#basesystemfieldsrequired)\n- [`CampaignStatus`](#campaignstatus)\n- [`ExecutionSummaryItem`](#executionsummaryitem)\n- [`JobStatus`](#jobstatus)\n- [`Campaign`](#campaign)\n- [`Target`](#target)\n- [`MatchCampaignParams`](#matchcampaignparams)\n- [`MatchTargetParams`](#matchtargetparams)\n- [`GetTargetQueriesParams`](#gettargetqueriesparams)\n- [`TargetQueryResult`](#targetqueryresult)\n- [`AutomationStatus`](#automationstatus)\n- [`PortalStatus`](#portalstatus)\n- [`Recipient`](#recipient)\n- [`BaseRecipientPayload`](#baserecipientpayload)\n- [`AutomationRecipientPayload`](#automationrecipientpayload)\n- [`PortalRecipientPayload`](#portalrecipientpayload)\n- [`CreateRecipientPayload`](#createrecipientpayload)\n- [`UpdateRecipientPayload`](#updaterecipientpayload)\n- [`RetriggerAutomationsRequest`](#retriggerautomationsrequest)\n- [`RetriggerAutomationsResult`](#retriggerautomationsresult)\n- [`UpdatePortalStatusRequest`](#updateportalstatusrequest)\n- [`SetupCampaignRequest`](#setupcampaignrequest)\n- [`SetupTariffChangeCampaignRequest`](#setuptariffchangecampaignrequest)\n- [`SetupTariffChangeCampaignResponse`](#setuptariffchangecampaignresponse)\n\n### `changeCampaignStatus`\n\nChange the status of a campaign\n\n`POST /v1/campaign/{campaign_id}/status`\n\n```ts\nconst { data } = await client.changeCampaignStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `getCampaignJobStatus`\n\nGet the status of a campaign\'s automation job\n\n`GET /v1/campaign/{campaign_id}/job`\n\n```ts\nconst { data } = await client.getCampaignJobStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "queued",\n "execution_summary": [\n {\n "execution_id": "string",\n "execution_status": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getCampaignPortals`\n\nGet portals usage info for a campaign\n\n`GET /v1/campaign/{campaign_id}/portals`\n\n```ts\nconst { data } = await client.getCampaignPortals({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "portal": {\n "origin": "string",\n "domain": "string",\n "name": "string"\n },\n "widgets": [\n {\n "id": "string",\n "headline": {\n "en": "string",\n "de": "string"\n }\n }\n ]\n }\n]\n```\n\n</details>\n\n---\n\n### `retriggerCampaignAutomations`\n\nRetrigger automations for campaign recipients\n\n`POST /v1/campaign/{campaign_id}/automations:retrigger`\n\n```ts\nconst { data } = await client.retriggerCampaignAutomations(\n {\n campaign_id: \'example\',\n },\n {\n recipient_ids: [\'3fa85f64-5717-4562-b3fc-2c963f66afa6\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "results": [\n {\n "recipient_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "result": "success",\n "execution_id": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `setupCampaign`\n\nSet up a campaign with related entities and configurations\n\n`POST /v1/campaign:setup`\n\n```ts\nconst { data } = await client.setupCampaign(\n null,\n {\n type: \'tariff_change\',\n product_recommendation: {\n name: \'string\',\n source_product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n source_price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n offers: [\n {\n target_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n items: [\n {\n product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n highlight_config: {}\n }\n ]\n }\n ]\n },\n campaign: {\n name: \'string\',\n goal: \'string\',\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n journey: {\n journey_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n channels: {\n portal_widget: {\n portal_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n block_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n email: {\n automation_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n template_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "tariff_change",\n "product_recommendation_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "journey_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "portal_widget_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"\n}\n```\n\n</details>\n\n---\n\n### `matchCampaigns`\n\nMatch campaigns\n\n`POST /v1/campaign:match`\n\n```ts\nconst { data } = await client.matchCampaigns(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n campaign_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `matchTargets`\n\nMatch targets\n\n`POST /v1/target:match`\n\n```ts\nconst { data } = await client.matchTargets(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "target": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "description": "string",\n "entity_schema": "string",\n "entity_filters": {}\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getTargetQueries`\n\nGet target queries\n\n`POST /v1/target/queries`\n\n```ts\nconst { data } = await client.getTargetQueries(\n null,\n {\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "query": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createRecipient`\n\nCreate a recipient associated with a campaign\n\n`POST /v1/campaign/{campaign_id}/recipient`\n\n```ts\nconst { data } = await client.createRecipient(\n {\n campaign_id: \'example\',\n },\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\',\n automation_status: \'pending\',\n automation_execution_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipient`\n\nUpdate a recipient\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}`\n\n```ts\nconst { data } = await client.updateRecipient(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n automation_status: \'pending\',\n automation_execution_id: \'string\',\n portal_status: \'sent\',\n portal_state: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientPortalStatus`\n\nUpdate portal status for a campaign recipient\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status`\n\n```ts\nconst { data } = await client.updateRecipientPortalStatus(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n status: \'sent\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getRecipients`\n\nGet campaign recipients\n\n`GET /v1/campaign/{campaign_id}/recipients`\n\n```ts\nconst { data } = await client.getRecipients({\n campaign_id: \'example\',\n limit: 1,\n next: \'example\',\n q: \'example\',\n automation_status: \'example\',\n portal_status: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next": "string",\n "total": 0\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `BaseError`\n\n```ts\ntype BaseError = {\n status: number\n message: string\n}\n```\n\n### `ServerError`\n\n```ts\ntype ServerError = {\n status: number\n message: string\n}\n```\n\n### `ClientError`\n\nDescribes the structure of a client error response, which can be one of several types:\n1. `MessageError`: Contains a \'message\' field for general descriptive errors.\n2. `CodeError`: Contains a \'code\' field for specific, machine-readable error codes.\n3. `StatusedError`: Contains \'error\' and \'status\' f\n\n```ts\ntype ClientError = {\n message: string\n} | {\n code: "CAMPAIGN_NOT_FOUND" | "CAMPAIGN_HAS_NO_TARGET" | "CAMPAIGN_HAS_NO_DELIVERY_METHOD" | "CAMPAIGN_HAS_JOB_IN_PROGRESS" | "CAMPAIGN_HAS_UNEXPECTED_STATUS" | "JOB_TOKEN_MISSING" | "TARGET_WITHOUT_FILTERS"\n} | {\n error: string\n status: number\n}\n```\n\n### `BaseUUID`\n\n```ts\ntype BaseUUID = string // uuid\n```\n\n### `BaseNanoID`\n\n```ts\ntype BaseNanoID = string\n```\n\n### `BaseTags`\n\n```ts\ntype BaseTags = string[]\n```\n\n### `BaseRelation`\n\n```ts\ntype BaseRelation = {\n $relation?: Array<{\n entity_id?: string // uuid\n _tags?: string[]\n }>\n}\n```\n\n### `BaseSystemId`\n\n```ts\ntype BaseSystemId = {\n _id: string // uuid\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `BaseSystemFields`\n\n```ts\ntype BaseSystemFields = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n}\n```\n\n### `BaseSystemFieldsRequired`\n\n```ts\ntype BaseSystemFieldsRequired = object\n```\n\n### `CampaignStatus`\n\n```ts\ntype CampaignStatus = "draft" | "activating" | "active" | "inactive"\n```\n\n### `ExecutionSummaryItem`\n\n```ts\ntype ExecutionSummaryItem = {\n execution_id?: string\n execution_status?: string\n}\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = {\n status?: "queued" | "processing" | "finished" | "failed" | "cancelled" | "send_report"\n execution_summary?: Array<{\n execution_id?: string\n execution_status?: string\n }>\n}\n```\n\n### `Campaign`\n\n```ts\ntype Campaign = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n goal?: string\n status?: "draft" | "activating" | "active" | "inactive"\n start_date?: string // date\n end_date?: string // date\n flow_id?: string\n job_id?: string\n target?: {\n $relation?: Array<{\n entity_id?: { ... }\n _tags?: { ... }\n }>\n }\n}\n```\n\n### `Target`\n\n```ts\ntype Target = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n description?: string\n entity_schema?: string\n entity_filters?: Record<string, unknown>\n}\n```\n\n### `MatchCampaignParams`\n\n```ts\ntype MatchCampaignParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n campaign_ids: string // uuid[]\n}\n```\n\n### `MatchTargetParams`\n\n```ts\ntype MatchTargetParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n target_ids: string // uuid[]\n}\n```\n\n### `GetTargetQueriesParams`\n\n```ts\ntype GetTargetQueriesParams = {\n target_ids: string // uuid[]\n}\n```\n\n### `TargetQueryResult`\n\n```ts\ntype TargetQueryResult = {\n target_id: string // uuid\n query: string\n error?: string\n}\n```\n\n### `AutomationStatus`\n\n```ts\ntype AutomationStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled"\n```\n\n### `PortalStatus`\n\n```ts\ntype PortalStatus = "sent" | "seen" | "dismissed" | "clicked"\n```\n\n### `Recipient`\n\n```ts\ntype Recipient = {\n entity_id?: string // uuid\n entity_schema?: string\n title?: string\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_status_updated_at?: string // date-time\n portal_state?: Record<string, unknown>\n updated_at?: string // date-time\n}\n```\n\n### `BaseRecipientPayload`\n\n```ts\ntype BaseRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n}\n```\n\n### `AutomationRecipientPayload`\n\n```ts\ntype AutomationRecipientPayload = {\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n}\n```\n\n### `PortalRecipientPayload`\n\n```ts\ntype PortalRecipientPayload = {\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `CreateRecipientPayload`\n\n```ts\ntype CreateRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n} | {\n entity_id: string // uuid\n entity_schema: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n} | {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `UpdateRecipientPayload`\n\n```ts\ntype UpdateRecipientPayload = {\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `RetriggerAutomationsRequest`\n\n```ts\ntype RetriggerAutomationsRequest = {\n recipient_ids: string // uuid[]\n}\n```\n\n### `RetriggerAutomationsResult`\n\n```ts\ntype RetriggerAutomationsResult = {\n recipient_id: string // uuid\n result: "success" | "failure" | "not_found" | "invalid_status"\n execution_id?: string\n error?: string\n}\n```\n\n### `UpdatePortalStatusRequest`\n\n```ts\ntype UpdatePortalStatusRequest = {\n status: "sent" | "seen" | "dismissed" | "clicked"\n}\n```\n\n### `SetupCampaignRequest`\n\nDiscriminated by `type`. Each campaign variant has its own request shape;\nnew variants are added by introducing a new schema and extending the `oneOf` list.\n\n\n```ts\ntype SetupCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignRequest`\n\n```ts\ntype SetupTariffChangeCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignResponse`\n\n```ts\ntype SetupTariffChangeCampaignResponse = {\n type: "tariff_change"\n product_recommendation_id: string // uuid\n campaign_id: string // uuid\n journey_id?: string // uuid\n portal_widget_id?: string // uuid\n}\n```\n';
4
+ var targeting_default = '# Targeting API\n\n- **Base URL:** `https://targeting.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/targeting](https://docs.epilot.io/api/targeting)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.targeting.changeCampaignStatus(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/targeting\'\n\nconst targetingClient = getClient()\nauthorize(targetingClient, () => \'<token>\')\nconst { data } = await targetingClient.changeCampaignStatus(...)\n```\n\n## Operations\n\n**Campaign**\n- [`changeCampaignStatus`](#changecampaignstatus)\n- [`getCampaignJobStatus`](#getcampaignjobstatus)\n- [`getCampaignPortals`](#getcampaignportals)\n- [`setupCampaign`](#setupcampaign)\n- [`matchCampaigns`](#matchcampaigns)\n\n**Campaign Delivery**\n- [`retriggerCampaignAutomations`](#retriggercampaignautomations)\n\n**Target**\n- [`matchTargets`](#matchtargets)\n- [`getTargetQueries`](#gettargetqueries)\n\n**Campaign Recipient**\n- [`createRecipient`](#createrecipient)\n- [`updateRecipient`](#updaterecipient)\n- [`updateRecipientPortalStatus`](#updaterecipientportalstatus)\n- [`getRecipients`](#getrecipients)\n\n**Schemas**\n- [`BaseError`](#baseerror)\n- [`ServerError`](#servererror)\n- [`ClientError`](#clienterror)\n- [`BaseUUID`](#baseuuid)\n- [`BaseNanoID`](#basenanoid)\n- [`BaseTags`](#basetags)\n- [`BaseRelation`](#baserelation)\n- [`BaseSystemId`](#basesystemid)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`BaseSystemFields`](#basesystemfields)\n- [`BaseSystemFieldsRequired`](#basesystemfieldsrequired)\n- [`CampaignStatus`](#campaignstatus)\n- [`ExecutionSummaryItem`](#executionsummaryitem)\n- [`JobStatus`](#jobstatus)\n- [`Campaign`](#campaign)\n- [`Target`](#target)\n- [`MatchCampaignParams`](#matchcampaignparams)\n- [`MatchTargetParams`](#matchtargetparams)\n- [`GetTargetQueriesParams`](#gettargetqueriesparams)\n- [`TargetQueryResult`](#targetqueryresult)\n- [`AutomationStatus`](#automationstatus)\n- [`PortalStatus`](#portalstatus)\n- [`Recipient`](#recipient)\n- [`BaseRecipientPayload`](#baserecipientpayload)\n- [`AutomationRecipientPayload`](#automationrecipientpayload)\n- [`PortalRecipientPayload`](#portalrecipientpayload)\n- [`CreateRecipientPayload`](#createrecipientpayload)\n- [`UpdateRecipientPayload`](#updaterecipientpayload)\n- [`RetriggerAutomationsRequest`](#retriggerautomationsrequest)\n- [`RetriggerAutomationsResult`](#retriggerautomationsresult)\n- [`UpdatePortalStatusRequest`](#updateportalstatusrequest)\n- [`SetupCampaignRequest`](#setupcampaignrequest)\n- [`SetupTariffChangeCampaignRequest`](#setuptariffchangecampaignrequest)\n- [`SetupTariffChangeCampaignResponse`](#setuptariffchangecampaignresponse)\n\n### `changeCampaignStatus`\n\nChange the status of a campaign\n\n`POST /v1/campaign/{campaign_id}/status`\n\n```ts\nconst { data } = await client.changeCampaignStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `getCampaignJobStatus`\n\nGet the status of a campaign\'s automation job\n\n`GET /v1/campaign/{campaign_id}/job`\n\n```ts\nconst { data } = await client.getCampaignJobStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "queued",\n "execution_summary": [\n {\n "execution_id": "string",\n "execution_status": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getCampaignPortals`\n\nGet portals usage info for a campaign\n\n`GET /v1/campaign/{campaign_id}/portals`\n\n```ts\nconst { data } = await client.getCampaignPortals({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "portal": {\n "origin": "string",\n "domain": "string",\n "name": "string"\n },\n "widgets": [\n {\n "id": "string",\n "headline": {\n "en": "string",\n "de": "string"\n }\n }\n ]\n }\n]\n```\n\n</details>\n\n---\n\n### `retriggerCampaignAutomations`\n\nRetrigger automations for campaign recipients\n\n`POST /v1/campaign/{campaign_id}/automations:retrigger`\n\n```ts\nconst { data } = await client.retriggerCampaignAutomations(\n {\n campaign_id: \'example\',\n },\n {\n recipient_ids: [\'3fa85f64-5717-4562-b3fc-2c963f66afa6\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "results": [\n {\n "recipient_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "result": "success",\n "execution_id": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `setupCampaign`\n\nSet up a campaign with related entities and configurations\n\n`POST /v1/campaign:setup`\n\n```ts\nconst { data } = await client.setupCampaign(\n null,\n {\n type: \'tariff_change\',\n product_recommendation: {\n name: \'string\',\n source_product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n source_price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n offers: [\n {\n target_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n items: [\n {\n product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n highlight_config: {}\n }\n ]\n }\n ]\n },\n campaign: {\n name: \'string\',\n goal: \'string\',\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n journey: {\n journey_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n channels: {\n portal_widget: {\n portal_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n block_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n email: {\n automation_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n template_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "tariff_change",\n "product_recommendation_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "journey_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "portal_widget_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"\n}\n```\n\n</details>\n\n---\n\n### `matchCampaigns`\n\nMatch campaigns\n\n`POST /v1/campaign:match`\n\n```ts\nconst { data } = await client.matchCampaigns(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n campaign_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `matchTargets`\n\nMatch targets\n\n`POST /v1/target:match`\n\n```ts\nconst { data } = await client.matchTargets(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "target": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "description": "string",\n "entity_schema": "string",\n "entity_filters": {}\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getTargetQueries`\n\nGet target queries\n\n`POST /v1/target/queries`\n\n```ts\nconst { data } = await client.getTargetQueries(\n null,\n {\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "query": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createRecipient`\n\nCreate a recipient associated with a campaign\n\n`POST /v1/campaign/{campaign_id}/recipient`\n\n```ts\nconst { data } = await client.createRecipient(\n {\n campaign_id: \'example\',\n },\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\',\n automation_status: \'pending\',\n automation_execution_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipient`\n\nUpdate a recipient\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}`\n\n```ts\nconst { data } = await client.updateRecipient(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n automation_status: \'pending\',\n automation_execution_id: \'string\',\n portal_status: \'sent\',\n portal_state: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientPortalStatus`\n\nUpdate portal status for a campaign recipient\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status`\n\n```ts\nconst { data } = await client.updateRecipientPortalStatus(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n status: \'sent\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getRecipients`\n\nGet campaign recipients\n\n`GET /v1/campaign/{campaign_id}/recipients`\n\n```ts\nconst { data } = await client.getRecipients({\n campaign_id: \'example\',\n limit: 1,\n next: \'example\',\n q: \'example\',\n automation_status: [\'...\'],\n portal_status: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next": "string",\n "total": 0\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `BaseError`\n\n```ts\ntype BaseError = {\n status: number\n message: string\n}\n```\n\n### `ServerError`\n\n```ts\ntype ServerError = {\n status: number\n message: string\n}\n```\n\n### `ClientError`\n\nDescribes the structure of a client error response, which can be one of several types:\n1. `MessageError`: Contains a \'message\' field for general descriptive errors.\n2. `CodeError`: Contains a \'code\' field for specific, machine-readable error codes.\n3. `StatusedError`: Contains \'error\' and \'status\' f\n\n```ts\ntype ClientError = {\n message: string\n} | {\n code: "CAMPAIGN_NOT_FOUND" | "CAMPAIGN_HAS_NO_TARGET" | "CAMPAIGN_HAS_NO_DELIVERY_METHOD" | "CAMPAIGN_HAS_JOB_IN_PROGRESS" | "CAMPAIGN_HAS_UNEXPECTED_STATUS" | "JOB_TOKEN_MISSING" | "TARGET_WITHOUT_FILTERS"\n} | {\n error: string\n status: number\n}\n```\n\n### `BaseUUID`\n\n```ts\ntype BaseUUID = string // uuid\n```\n\n### `BaseNanoID`\n\n```ts\ntype BaseNanoID = string\n```\n\n### `BaseTags`\n\n```ts\ntype BaseTags = string[]\n```\n\n### `BaseRelation`\n\n```ts\ntype BaseRelation = {\n $relation?: Array<{\n entity_id?: string // uuid\n _tags?: string[]\n }>\n}\n```\n\n### `BaseSystemId`\n\n```ts\ntype BaseSystemId = {\n _id: string // uuid\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `BaseSystemFields`\n\n```ts\ntype BaseSystemFields = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n}\n```\n\n### `BaseSystemFieldsRequired`\n\n```ts\ntype BaseSystemFieldsRequired = object\n```\n\n### `CampaignStatus`\n\n```ts\ntype CampaignStatus = "draft" | "activating" | "active" | "inactive"\n```\n\n### `ExecutionSummaryItem`\n\n```ts\ntype ExecutionSummaryItem = {\n execution_id?: string\n execution_status?: string\n}\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = {\n status?: "queued" | "processing" | "finished" | "failed" | "cancelled" | "send_report"\n execution_summary?: Array<{\n execution_id?: string\n execution_status?: string\n }>\n}\n```\n\n### `Campaign`\n\n```ts\ntype Campaign = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n goal?: string\n status?: "draft" | "activating" | "active" | "inactive"\n start_date?: string // date\n end_date?: string // date\n flow_id?: string\n job_id?: string\n target?: {\n $relation?: Array<{\n entity_id?: { ... }\n _tags?: { ... }\n }>\n }\n}\n```\n\n### `Target`\n\n```ts\ntype Target = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n description?: string\n entity_schema?: string\n entity_filters?: Record<string, unknown>\n}\n```\n\n### `MatchCampaignParams`\n\n```ts\ntype MatchCampaignParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n campaign_ids: string // uuid[]\n}\n```\n\n### `MatchTargetParams`\n\n```ts\ntype MatchTargetParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n target_ids: string // uuid[]\n}\n```\n\n### `GetTargetQueriesParams`\n\n```ts\ntype GetTargetQueriesParams = {\n target_ids: string // uuid[]\n}\n```\n\n### `TargetQueryResult`\n\n```ts\ntype TargetQueryResult = {\n target_id: string // uuid\n query: string\n error?: string\n}\n```\n\n### `AutomationStatus`\n\n```ts\ntype AutomationStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled"\n```\n\n### `PortalStatus`\n\n```ts\ntype PortalStatus = "sent" | "seen" | "dismissed" | "clicked"\n```\n\n### `Recipient`\n\n```ts\ntype Recipient = {\n entity_id?: string // uuid\n entity_schema?: string\n title?: string\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_status_updated_at?: string // date-time\n portal_state?: Record<string, unknown>\n updated_at?: string // date-time\n}\n```\n\n### `BaseRecipientPayload`\n\n```ts\ntype BaseRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n}\n```\n\n### `AutomationRecipientPayload`\n\n```ts\ntype AutomationRecipientPayload = {\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n}\n```\n\n### `PortalRecipientPayload`\n\n```ts\ntype PortalRecipientPayload = {\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `CreateRecipientPayload`\n\n```ts\ntype CreateRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n} | {\n entity_id: string // uuid\n entity_schema: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n} | {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `UpdateRecipientPayload`\n\n```ts\ntype UpdateRecipientPayload = {\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `RetriggerAutomationsRequest`\n\n```ts\ntype RetriggerAutomationsRequest = {\n recipient_ids: string // uuid[]\n}\n```\n\n### `RetriggerAutomationsResult`\n\n```ts\ntype RetriggerAutomationsResult = {\n recipient_id: string // uuid\n result: "success" | "failure" | "not_found" | "invalid_status"\n execution_id?: string\n error?: string\n}\n```\n\n### `UpdatePortalStatusRequest`\n\n```ts\ntype UpdatePortalStatusRequest = {\n status: "sent" | "seen" | "dismissed" | "clicked"\n}\n```\n\n### `SetupCampaignRequest`\n\nDiscriminated by `type`. Each campaign variant has its own request shape;\nnew variants are added by introducing a new schema and extending the `oneOf` list.\n\n\n```ts\ntype SetupCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignRequest`\n\n```ts\ntype SetupTariffChangeCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignResponse`\n\n```ts\ntype SetupTariffChangeCampaignResponse = {\n type: "tariff_change"\n product_recommendation_id: string // uuid\n campaign_id: string // uuid\n journey_id?: string // uuid\n portal_widget_id?: string // uuid\n}\n```\n';
5
5
  export {
6
6
  targeting_default as default
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_targeting_runtime
3
- } from "./chunk-LSPXLT3A.js";
3
+ } from "./chunk-H3NMCCSA.js";
4
4
  import "./chunk-YPSWSI3M.js";
5
5
  export default require_targeting_runtime();
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMCK2QUSDcjs = require('./chunk-MCK2QUSD.cjs');
3
+ var _chunk7ILTRJDQcjs = require('./chunk-7ILTRJDQ.cjs');
4
4
  require('./chunk-NJK5F5TF.cjs');
5
- exports. default = _chunkMCK2QUSDcjs.require_targeting_runtime.call(void 0, );
5
+ exports. default = _chunk7ILTRJDQcjs.require_targeting_runtime.call(void 0, );
@@ -1754,7 +1754,7 @@ declare namespace Paths {
1754
1754
  }
1755
1755
  namespace GetRecipients {
1756
1756
  namespace Parameters {
1757
- export type AutomationStatus = Components.Schemas.AutomationStatus;
1757
+ export type AutomationStatus = Components.Schemas.AutomationStatus[];
1758
1758
  export type CampaignId = /**
1759
1759
  * example:
1760
1760
  * b8c01433-5556-4e2b-aad4-6f5348d1df84
@@ -1754,7 +1754,7 @@ declare namespace Paths {
1754
1754
  }
1755
1755
  namespace GetRecipients {
1756
1756
  namespace Parameters {
1757
- export type AutomationStatus = Components.Schemas.AutomationStatus;
1757
+ export type AutomationStatus = Components.Schemas.AutomationStatus[];
1758
1758
  export type CampaignId = /**
1759
1759
  * example:
1760
1760
  * b8c01433-5556-4e2b-aad4-6f5348d1df84
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
+
3
+ // src/docs/workflow.json
4
+ var workflow_default = '# Workflows Executions\n\n- **Base URL:** `https://workflows-execution.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/workflow](https://docs.epilot.io/api/workflow)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.workflow.getExecutions(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/workflow\'\n\nconst workflowClient = getClient()\nauthorize(workflowClient, () => \'<token>\')\nconst { data } = await workflowClient.getExecutions(...)\n```\n\n## Operations\n\n**Workflow Executions**\n- [`getExecutions`](#getexecutions)\n- [`createExecution`](#createexecution)\n- [`getExecution`](#getexecution)\n- [`updateExecution`](#updateexecution)\n- [`deleteExecution`](#deleteexecution)\n\n**Workflow Steps**\n- [`createStep`](#createstep)\n- [`updateStep`](#updatestep)\n- [`deleteStep`](#deletestep)\n\n**Closing Reasons**\n- [`getClosingReasonExecution`](#getclosingreasonexecution)\n\n**Flows V2**\n- [`startFlowExecution`](#startflowexecution)\n- [`getFlowExecution`](#getflowexecution)\n- [`patchFlowExecution`](#patchflowexecution)\n- [`deleteFlowExecution`](#deleteflowexecution)\n- [`searchFlowExecutions`](#searchflowexecutions)\n- [`patchTask`](#patchtask)\n- [`runTaskAutomation`](#runtaskautomation)\n- [`executeTask`](#executetask)\n- [`patchPhase`](#patchphase)\n- [`addTask`](#addtask)\n- [`cancelTaskSchedule`](#canceltaskschedule)\n- [`reconcileAutomationTask`](#reconcileautomationtask)\n- [`runTaskScheduleNow`](#runtaskschedulenow)\n\n**Schemas**\n- [`WorkflowExecutionCreateReq`](#workflowexecutioncreatereq)\n- [`WorkflowExecutionUpdateReq`](#workflowexecutionupdatereq)\n- [`ClosingReason`](#closingreason)\n- [`WorkflowContext`](#workflowcontext)\n- [`WorkflowExecutionBase`](#workflowexecutionbase)\n- [`WorkflowExecutionSlim`](#workflowexecutionslim)\n- [`FlowSlim`](#flowslim)\n- [`Flow`](#flow)\n- [`WorkflowExecution`](#workflowexecution)\n- [`WorkflowStatus`](#workflowstatus)\n- [`SectionSimplified`](#sectionsimplified)\n- [`Section`](#section)\n- [`StepId`](#stepid)\n- [`StepSimplified`](#stepsimplified)\n- [`Step`](#step)\n- [`StepExtended`](#stepextended)\n- [`StepStatus`](#stepstatus)\n- [`SectionStatus`](#sectionstatus)\n- [`StepType`](#steptype)\n- [`StepJourney`](#stepjourney)\n- [`AutomationConfig`](#automationconfig)\n- [`ECPDetails`](#ecpdetails)\n- [`PartnerDetails`](#partnerdetails)\n- [`StepDescription`](#stepdescription)\n- [`ItemType`](#itemtype)\n- [`TriggerType`](#triggertype)\n- [`CreateStepReq`](#createstepreq)\n- [`UpdateStepReq`](#updatestepreq)\n- [`StepPositionAt`](#steppositionat)\n- [`UpdateStepResp`](#updatestepresp)\n- [`SearchStepsResp`](#searchstepsresp)\n- [`SearchExecutionsReq`](#searchexecutionsreq)\n- [`SearchExecutionsResp`](#searchexecutionsresp)\n- [`LastEvaluatedKey`](#lastevaluatedkey)\n- [`SearchStepsReq`](#searchstepsreq)\n- [`SearchSorting`](#searchsorting)\n- [`SearchPagination`](#searchpagination)\n- [`ExecutionPaginationDynamo`](#executionpaginationdynamo)\n- [`ErrorResp`](#errorresp)\n- [`ClosingReasonResp`](#closingreasonresp)\n- [`PhaseInEntity`](#phaseinentity)\n- [`WorkflowInEntity`](#workflowinentity)\n- [`UpdateEntityAttributes`](#updateentityattributes)\n- [`EntitySync`](#entitysync)\n- [`DynamicDueDate`](#dynamicduedate)\n- [`StepRequirement`](#steprequirement)\n- [`StartFlowReq`](#startflowreq)\n- [`SearchFlowsReq`](#searchflowsreq)\n- [`PatchFlowReq`](#patchflowreq)\n- [`FlowExecution`](#flowexecution)\n- [`FlowClosingReason`](#flowclosingreason)\n- [`FlowTrigger`](#flowtrigger)\n- [`FlowContext`](#flowcontext)\n- [`EntityRef`](#entityref)\n- [`PhaseId`](#phaseid)\n- [`TaskId`](#taskid)\n- [`Task`](#task)\n- [`TaskType`](#tasktype)\n- [`ManualTask`](#manualtask)\n- [`AutomationTask`](#automationtask)\n- [`LoopInfo`](#loopinfo)\n- [`LoopConfig`](#loopconfig)\n- [`TriggerMode`](#triggermode)\n- [`ActionSchedule`](#actionschedule)\n- [`ImmediateSchedule`](#immediateschedule)\n- [`DelayedSchedule`](#delayedschedule)\n- [`RelativeSchedule`](#relativeschedule)\n- [`DecisionTask`](#decisiontask)\n- [`AiAgentTask`](#aiagenttask)\n- [`AgentConfig`](#agentconfig)\n- [`AgentExecutionInfo`](#agentexecutioninfo)\n- [`TaskBase`](#taskbase)\n- [`Phase`](#phase)\n- [`Edge`](#edge)\n- [`AutomationInfo`](#automationinfo)\n- [`AutomationInputContext`](#automationinputcontext)\n- [`AnalyticsInfo`](#analyticsinfo)\n- [`ConditionId`](#conditionid)\n- [`Condition`](#condition)\n- [`Statement`](#statement)\n- [`EvaluationSource`](#evaluationsource)\n- [`Operator`](#operator)\n- [`DueDateConfig`](#duedateconfig)\n- [`TimeUnit`](#timeunit)\n- [`EnableRequirement`](#enablerequirement)\n- [`FlowTemplateId`](#flowtemplateid)\n- [`FlowExecutionId`](#flowexecutionid)\n- [`UserId`](#userid)\n- [`VariableAssignment`](#variableassignment)\n- [`Assignees`](#assignees)\n- [`PatchTaskReq`](#patchtaskreq)\n- [`PatchPhaseReq`](#patchphasereq)\n- [`AddTaskReq`](#addtaskreq)\n\n### `getExecutions`\n\nRetrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are more light weight - steps are not loaded with all information.\n\n`GET /v1/workflows/executions`\n\n```ts\nconst { data } = await client.getExecutions({\n context: \'example\',\n schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "8gja72h6kas6h",\n "name": "Lead Qualification",\n "trigger": "MANUAL",\n "status": "STARTED",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:01:13.000Z",\n "flow": [\n {\n "id": "sectionId1",\n "definitionId": "section_definition_id_1",\n "name": "Initial Information Gathering",\n "type": "SECTION",\n "steps": [\n {\n "id": "sada5641f3a21",\n "definitionId": "step_definition_id_1",\n "name": "Call client"\n },\n {\n "id": "sada5641f3a22",\n "definitionId": "step_definition_id_2",\n "name": "Check product availability"\n }\n ]\n },\n {\n "id": "firstLevelStepId1",\n "definitionId": "step_definition_id_4",\n "name": "Print and send catalog",\n "type": "STEP"\n }\n ]\n }\n]\n```\n\n</details>\n\n---\n\n### `createExecution`\n\nCreates a new V1 Workflow Execution from a workflow definition (template).\n\n`POST /v1/workflows/executions`\n\n```ts\nconst { data } = await client.createExecution(\n null,\n {\n workflowId: \'j3f23fh23uif98\',\n trigger: \'AUTOMATIC\',\n contexts: [\n {\n id: \'3fa3fa86-0907-4642-a57e-0fe30a19874d\',\n schema: \'contact\'\n },\n {\n id: \'3a6d42fa-5070-4723-b90f-41ead4303e33\',\n schema: \'opportunity\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "8gja72h6kas6h",\n "name": "Lead Qualification",\n "trigger": "MANUAL",\n "status": "STARTED",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:01:13.000Z",\n "assignedTo": ["252", "29052"],\n "flow": [\n {\n "id": "sectionId1",\n "name": "Initial Information Gathering",\n "steps": [\n {\n "id": "sada5641f3a21",\n "name": "Call client and confirm address and product",\n "definitionId": "step_definition_id_1",\n "status": "ASSIGNED",\n "assignedTo": ["11"]\n },\n {\n "id": "sada5641f3a22",\n "name": "Check product availability",\n "status": "UNASSIGNED",\n "definitionId": "step_definition_id_2"\n }\n ]\n },\n {\n "id": "firstLevelStepId1",\n "definitionId": "step_definition_id_4",\n "name": "Print and send catalog",\n "status": "SKIPPED",\n "dueDate": "2023-01-15T20:00:00"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nRetrieves a complete V1 workflow execution by ID, including all steps information.\n\n`GET /v1/workflows/executions/{executionId}`\n\n```ts\nconst { data } = await client.getExecution({\n executionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "8gja72h6kas6h",\n "name": "Lead Qualification",\n "trigger": "MANUAL",\n "status": "STARTED",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:01:13.000Z",\n "assignedTo": ["252", "29052"],\n "flow": [\n {\n "id": "sectionId1",\n "name": "Initial Information Gathering",\n "steps": [\n {\n "id": "sada5641f3a21",\n "name": "Call client and confirm address and product",\n "definitionId": "step_definition_id_1",\n "status": "ASSIGNED",\n "assignedTo": ["11"]\n },\n {\n "id": "sada5641f3a22",\n "name": "Check product availability",\n "status": "UNASSIGNED",\n "definitionId": "step_definition_id_2"\n }\n ]\n },\n {\n "id": "firstLevelStepId1",\n "definitionId": "step_definition_id_4",\n "name": "Print and send catalog",\n "status": "SKIPPED",\n "dueDate": "2023-01-15T20:00:00"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `updateExecution`\n\nPatches updates like assignees, status, closingReason for a single Workflow Execution.\n\n`PATCH /v1/workflows/executions/{executionId}`\n\n```ts\nconst { data } = await client.updateExecution(\n {\n executionId: \'example\',\n },\n {\n status: \'STARTED\',\n assignedTo: [\'string\'],\n selectedClosingReasons: [\n {\n id: \'string\',\n title: \'string\'\n }\n ],\n closingReasonDescription: \'string\',\n dueDate: \'string\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n closedBy: \'string\',\n contexts: [\n {\n id: \'string\',\n title: \'string\',\n schema: \'string\'\n }\n ],\n completedTime: \'string\'\n },\n)\n```\n\n---\n\n### `deleteExecution`\n\nDelete workflow execution by id. Workflow contexts will NOT be deleted.\n\n`DELETE /v1/workflows/executions/{executionId}`\n\n```ts\nconst { data } = await client.deleteExecution({\n executionId: \'example\',\n})\n```\n\n---\n\n### `createStep`\n\nCreate a new step in current workflow execution.\n\n`POST /v1/workflows/executions/{executionId}/steps`\n\n```ts\nconst { data } = await client.createStep(\n {\n executionId: \'example\',\n },\n {\n insertionIndex: 0,\n name: \'string\',\n description: {\n enabled: true,\n value: \'string\'\n },\n status: \'UNASSIGNED\',\n sectionId: \'string\',\n executionType: \'MANUAL\',\n automationConfig: {\n flowId: \'string\',\n executionId: \'string\',\n executionStatus: \'string\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "definitionId": "string",\n "entityRefId": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "type": "STEP",\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "enabled": true,\n "requirements": [\n {\n "definitionId": "string",\n "type": "STEP",\n "condition": "CLOSED"\n }\n ],\n "executionType": "MANUAL",\n "sectionId": "string",\n "executionId": "string",\n "userIds": [0],\n "assignedTo": ["string"],\n "assignedToInProgress": "string",\n "assignedToOnHold": "string",\n "status": "UNASSIGNED",\n "created": "string",\n "lastUpdated": "string",\n "statusLastUpdated": "string",\n "startedTime": "string",\n "completedTime": "string",\n "dueDate": "string",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "manuallyCreated": true,\n "automationConfig": {\n "flowId": "string",\n "executionId": "string",\n "executionStatus": "string"\n },\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "taxonomies": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `updateStep`\n\nUpdates a workflow execution step with new values for status, assignees, due date, position, and more.\n\n`PATCH /v1/workflows/executions/{executionId}/steps/{stepId}`\n\n```ts\nconst { data } = await client.updateStep(\n {\n executionId: \'example\',\n stepId: \'example\',\n },\n {\n stepId: \'string\',\n entityRefId: \'string\',\n userIds: [0],\n assignedTo: [\'string\'],\n assignedToInProgress: \'string\',\n assignedToOnHold: \'string\',\n status: \'UNASSIGNED\',\n dueDate: \'string\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n name: \'string\',\n description: {\n enabled: true,\n value: \'string\'\n },\n position: {\n index: 0,\n sectionId: \'string\'\n },\n automationConfig: {\n flowId: \'string\',\n executionId: \'string\',\n executionStatus: \'string\'\n },\n startedTime: \'string\',\n completedTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "definitionId": "string",\n "entityRefId": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "type": "STEP",\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "enabled": true,\n "requirements": [\n {\n "definitionId": "string",\n "type": "STEP",\n "condition": "CLOSED"\n }\n ],\n "executionType": "MANUAL",\n "sectionId": "string",\n "executionId": "string",\n "userIds": [0],\n "assignedTo": ["string"],\n "assignedToInProgress": "string",\n "assignedToOnHold": "string",\n "status": "UNASSIGNED",\n "created": "string",\n "lastUpdated": "string",\n "statusLastUpdated": "string",\n "startedTime": "string",\n "completedTime": "string",\n "dueDate": "string",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "manuallyCreated": true,\n "automationConfig": {\n "flowId": "string",\n "executionId": "string",\n "executionStatus": "string"\n },\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\n "taxonomies": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `deleteStep`\n\nDeletes a step from a workflow execution.\n\n`DELETE /v1/workflows/executions/{executionId}/steps/{stepId}`\n\n```ts\nconst { data } = await client.deleteStep({\n executionId: \'example\',\n stepId: \'example\',\n})\n```\n\n---\n\n### `getClosingReasonExecution`\n\nShows all Closing Reasons defined at the moment of starting the Workflow Execution.\nThe Closing Reasons shown in the execution are just snapshots\nfrom the state of the Definition when the instance was\n\n`GET /v1/workflows/executions/{executionId}/closing-reasons`\n\n```ts\nconst { data } = await client.getClosingReasonExecution({\n executionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "string",\n "title": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `startFlowExecution`\n\nStarts a new Flow Execution based on a flow template (definition).\n\n`POST /v2/flows/executions`\n\n```ts\nconst { data } = await client.startFlowExecution(\n null,\n {\n flow_template_id: \'tpl_abc123def456\',\n trigger: {\n type: \'MANUAL\',\n automation_config: {\n flow_id: \'string\',\n execution_id: \'string\',\n execution_status: \'string\',\n error_reason: \'string\',\n input_context: {\n source: \'trigger\',\n task_id: \'string\'\n },\n heal_attempts: 0,\n last_heal_attempted_at: \'1970-01-01T00:00:00.000Z\'\n }\n },\n contexts: [\n {\n entity_id: \'string\',\n entity_schema: \'string\',\n is_primary: false\n }\n ],\n purposes: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "string",\n "completed_at": "string",\n "closed_at": "string",\n "started_by": "string",\n "closed_by": "string"\n },\n "contexts": [\n {\n "entity_id": "string",\n "entity_schema": "string",\n "is_primary": false\n }\n ],\n "crt_tasks": [\n {\n "id": "string",\n "crt_since": "1970-01-01T00:00:00.000Z"\n }\n ],\n "phases": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "analytics": {},\n "taxonomies": ["string"],\n "loop_config": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {},\n "status": "UNASSIGNED",\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "analytics": {},\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {}\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "abc123",\n "none_met": true\n }\n ],\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n },\n "closing_reason": {\n "selected_reasons": [\n {}\n ],\n "configured_reasons": [\n {}\n ],\n "extra_description": "string"\n },\n "available_in_ecp": true,\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "trigger": {\n "type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {},\n "heal_attempts": 0,\n "last_heal_attempted_at": "1970-01-01T00:00:00.000Z"\n }\n },\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `getFlowExecution`\n\nRetrieves a complete flow execution by ID, including all phases, tasks, edges, contexts, and analytics.\n\n`GET /v2/flows/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getFlowExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "string",\n "completed_at": "string",\n "closed_at": "string",\n "started_by": "string",\n "closed_by": "string"\n },\n "contexts": [\n {\n "entity_id": "string",\n "entity_schema": "string",\n "is_primary": false\n }\n ],\n "crt_tasks": [\n {\n "id": "string",\n "crt_since": "1970-01-01T00:00:00.000Z"\n }\n ],\n "phases": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "analytics": {},\n "taxonomies": ["string"],\n "loop_config": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {},\n "status": "UNASSIGNED",\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "analytics": {},\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {}\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "abc123",\n "none_met": true\n }\n ],\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n },\n "closing_reason": {\n "selected_reasons": [\n {}\n ],\n "configured_reasons": [\n {}\n ],\n "extra_description": "string"\n },\n "available_in_ecp": true,\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "trigger": {\n "type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {},\n "heal_attempts": 0,\n "last_heal_attempted_at": "1970-01-01T00:00:00.000Z"\n }\n },\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `patchFlowExecution`\n\nPatch flow execution with new assignees, status, analytics & other changes.\n\n`PATCH /v2/flows/executions/{execution_id}`\n\n```ts\nconst { data } = await client.patchFlowExecution(\n {\n execution_id: \'example\',\n },\n {\n status: \'STARTED\',\n assigned_to: [\'string\'],\n closing_reason: {\n selected_reasons: [\n {\n id: \'string\',\n title: \'string\'\n }\n ],\n configured_reasons: [\n {\n id: \'string\',\n title: \'string\'\n }\n ],\n extra_description: \'string\'\n },\n due_date: \'string\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n contexts: [\n {\n entity_id: \'string\',\n entity_schema: \'string\',\n is_primary: false\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "string",\n "completed_at": "string",\n "closed_at": "string",\n "started_by": "string",\n "closed_by": "string"\n },\n "contexts": [\n {\n "entity_id": "string",\n "entity_schema": "string",\n "is_primary": false\n }\n ],\n "crt_tasks": [\n {\n "id": "string",\n "crt_since": "1970-01-01T00:00:00.000Z"\n }\n ],\n "phases": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "analytics": {},\n "taxonomies": ["string"],\n "loop_config": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {},\n "status": "UNASSIGNED",\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "analytics": {},\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {}\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "abc123",\n "none_met": true\n }\n ],\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n },\n "closing_reason": {\n "selected_reasons": [\n {}\n ],\n "configured_reasons": [\n {}\n ],\n "extra_description": "string"\n },\n "available_in_ecp": true,\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "trigger": {\n "type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {},\n "heal_attempts": 0,\n "last_heal_attempted_at": "1970-01-01T00:00:00.000Z"\n }\n },\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `deleteFlowExecution`\n\nDeletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.\n\n`DELETE /v2/flows/executions/{execution_id}`\n\n```ts\nconst { data } = await client.deleteFlowExecution({\n execution_id: \'example\',\n soft: true,\n})\n```\n\n---\n\n### `searchFlowExecutions`\n\nSearch Flow Executions for a specific Entity.\n\n`POST /v2/flows/executions:search`\n\n```ts\nconst { data } = await client.searchFlowExecutions(\n null,\n {\n entity_id: \'string\',\n entity_schema: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {},\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {},\n "contexts": [],\n "crt_tasks": [],\n "phases": [],\n "tasks": [],\n "edges": [],\n "_execution_chain": {},\n "closing_reason": {},\n "available_in_ecp": true,\n "entity_sync": [],\n "taxonomies": ["string"],\n "trigger": {},\n "singleClosingReasonSelection": true\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `patchTask`\n\nUpdates attributes of a flow task including status, assignees, due date, and more.\n\n`PATCH /v2/flows/executions/{execution_id}/tasks/{task_id}`\n\n```ts\nconst { data } = await client.patchTask(\n {\n execution_id: \'example\',\n task_id: \'example\',\n },\n {\n name: \'Review customer application\',\n status: \'UNASSIGNED\',\n due_date: \'2026-05-28T00:00:00.000\',\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 enabled: true,\n automation_config: {\n flow_id: \'string\',\n execution_id: \'string\',\n execution_status: \'string\',\n error_reason: \'string\',\n input_context: {\n source: \'trigger\',\n task_id: \'string\'\n },\n heal_attempts: 0,\n last_heal_attempted_at: \'1970-01-01T00:00:00.000Z\'\n },\n description: {\n enabled: true,\n value: \'string\'\n },\n ecp: {\n enabled: true,\n label: \'string\',\n description: \'string\',\n journey: {\n id: \'string\',\n journeyId: \'string\',\n name: \'string\',\n complete_task_automatically: true\n }\n },\n installer: {\n enabled: true,\n label: \'string\',\n description: \'string\',\n journey: {\n id: \'string\',\n journeyId: \'string\',\n name: \'string\',\n complete_task_automatically: true\n }\n },\n partner: {\n enabled: true,\n label: \'string\',\n description: \'string\'\n },\n next_condition_id: \'cond_branch_approved\',\n revert_execution: false,\n completed_via_journey: false\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\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 "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `runTaskAutomation`\n\nRuns configured automation for a flow task\n\n`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/automation:run`\n\n```ts\nconst { data } = await client.runTaskAutomation({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\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 "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {\n "source": "trigger",\n "task_id": "string"\n },\n "heal_attempts": 0,\n "last_heal_attempted_at": "1970-01-01T00:00:00.000Z"\n },\n "automation_execution_id": "string",\n "trigger_mode": "manual",\n "schedule": {\n "mode": "immediate"\n },\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `executeTask`\n\nExecutes any kind of flow task immediately.\n\n`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/execute`\n\n```ts\nconst { data } = await client.executeTask({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\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 "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `patchPhase`\n\nApply updates to a phase within flow execution\n\n`PATCH /v2/flows/executions/{execution_id}/phases/{phase_id}`\n\n```ts\nconst { data } = await client.patchPhase(\n {\n execution_id: \'example\',\n phase_id: \'example\',\n },\n {\n name: \'string\',\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 },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\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 "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "taxonomies": ["string"],\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `addTask`\n\nCreate a new task in current workflow execution.\n\n`POST /v2/flows/executions/{execution_id}/tasks`\n\n```ts\nconst { data } = await client.addTask(\n {\n execution_id: \'example\',\n },\n {\n previous_task_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n next_task_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n task: {\n id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n name: \'string\',\n status: \'UNASSIGNED\',\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 enabled: true,\n automation_config: {\n flow_id: \'string\',\n execution_id: \'string\',\n execution_status: \'string\',\n error_reason: \'string\',\n input_context: {\n source: \'trigger\',\n task_id: \'string\'\n },\n heal_attempts: 0,\n last_heal_attempted_at: \'1970-01-01T00:00:00.000Z\'\n },\n phase_id: \'string\',\n task_type: \'MANUAL\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\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 "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelTaskSchedule`\n\nCancels a scheduled task, deleting the schedule and marking the task as skipped.\n\n`DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule`\n\n```ts\nconst { data } = await client.cancelTaskSchedule({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n---\n\n### `reconcileAutomationTask`\n\nReconciles an automation task\'s status against its linked automation execution.\n\n`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/reconcile-automation`\n\n```ts\nconst { data } = await client.reconcileAutomationTask({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "flow_template_id": "string",\n "org_id": "string",\n "name": "string",\n "created_at": "string",\n "updated_at": "string",\n "due_date": "string",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "status": "STARTED",\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "string",\n "completed_at": "string",\n "closed_at": "string",\n "started_by": "string",\n "closed_by": "string"\n },\n "contexts": [\n {\n "entity_id": "string",\n "entity_schema": "string",\n "is_primary": false\n }\n ],\n "crt_tasks": [\n {\n "id": "string",\n "crt_since": "1970-01-01T00:00:00.000Z"\n }\n ],\n "phases": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "status": "OPEN",\n "updated_at": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "analytics": {},\n "taxonomies": ["string"],\n "loop_config": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {},\n "status": "UNASSIGNED",\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "analytics": {},\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {}\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "abc123",\n "none_met": true\n }\n ],\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n },\n "closing_reason": {\n "selected_reasons": [\n {}\n ],\n "configured_reasons": [\n {}\n ],\n "extra_description": "string"\n },\n "available_in_ecp": true,\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "trigger": {\n "type": "MANUAL",\n "automation_config": {\n "flow_id": "string",\n "execution_id": "string",\n "execution_status": "string",\n "error_reason": "string",\n "input_context": {},\n "heal_attempts": 0,\n "last_heal_attempted_at": "1970-01-01T00:00:00.000Z"\n }\n },\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `runTaskScheduleNow`\n\nCancels the pending schedule for a task and immediately triggers its automation execution.\n\n`POST /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule/run-now`\n\n```ts\nconst { data } = await client.runTaskScheduleNow({\n execution_id: \'example\',\n task_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "template_id": "string",\n "name": "string",\n "description": {\n "enabled": true,\n "value": "string"\n },\n "status": "UNASSIGNED",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n },\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 "requirements": [\n {\n "task_id": "string",\n "phase_id": "string",\n "when": "TASK_FINISHED"\n }\n ],\n "assigned_to": ["string"],\n "analytics": {\n "started_at": "1970-01-01T00:00:00.000Z",\n "in_progress_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status_updated_at": "1970-01-01T00:00:00.000Z",\n "in_progress_by": "string",\n "completed_by": "string",\n "skipped_by": "string",\n "on_hold_by": "string"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "manually_created": true,\n "enabled": true,\n "ecp": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "installer": {\n "enabled": true,\n "label": "string",\n "description": "string",\n "journey": {\n "id": "string",\n "journeyId": "string",\n "name": "string",\n "complete_task_automatically": true\n }\n },\n "partner": {\n "enabled": true,\n "label": "string",\n "description": "string"\n },\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "loop_config": {\n "max_iterations": 3,\n "crt_iterations": 0\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `WorkflowExecutionCreateReq`\n\n```ts\ntype WorkflowExecutionCreateReq = {\n workflowId: string\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n purposes?: string[]\n}\n```\n\n### `WorkflowExecutionUpdateReq`\n\n```ts\ntype WorkflowExecutionUpdateReq = {\n status?: "STARTED" | "DONE" | "CLOSED"\n assignedTo?: string[]\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: 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 closedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n completedTime?: string\n}\n```\n\n### `ClosingReason`\n\n```ts\ntype ClosingReason = {\n id: string\n title: string\n}\n```\n\n### `WorkflowContext`\n\n```ts\ntype WorkflowContext = {\n id: string\n title: string\n schema: string\n}\n```\n\n### `WorkflowExecutionBase`\n\n```ts\ntype WorkflowExecutionBase = {\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: 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 status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n nextOpenStep?: {\n id?: string\n entityRefId?: string\n }\n configuredClosingReasonSnapshot?: Array<{\n id: string\n title: string\n }>\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: { ... }\n entityAttribute: { ... }\n }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n}\n```\n\n### `WorkflowExecutionSlim`\n\n```ts\ntype WorkflowExecutionSlim = {\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: 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 status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n nextOpenStep?: {\n id?: string\n entityRefId?: string\n }\n configuredClosingReasonSnapshot?: Array<{\n id: string\n title: string\n }>\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: { ... }\n entityAttribute: { ... }\n }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n // ...\n}\n```\n\n### `FlowSlim`\n\n```ts\ntype FlowSlim = {\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\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 enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n // ...\n}\n```\n\n### `Flow`\n\n```ts\ntype Flow = {\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\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 enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n // ...\n}\n```\n\n### `WorkflowExecution`\n\n```ts\ntype WorkflowExecution = {\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: 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 status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n nextOpenStep?: {\n id?: string\n entityRefId?: string\n }\n configuredClosingReasonSnapshot?: Array<{\n id: string\n title: string\n }>\n selectedClosingReasons?: Array<{\n id: string\n title: string\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: { ... }\n entityAttribute: { ... }\n }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n flow: Array<{\n id: string\n definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: string[]\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n // ...\n}\n```\n\n### `WorkflowStatus`\n\n```ts\ntype WorkflowStatus = "STARTED" | "DONE" | "CLOSED"\n```\n\n### `SectionSimplified`\n\nA group of Steps that define the progress of the Workflow\n\n```ts\ntype SectionSimplified = {\n id: string\n definitionId?: string\n name: string\n type: "STEP" | "SECTION"\n steps: Array<{\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\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 enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n }>\n assignedTo?: 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 definitionId?: string\n name: string\n userIds?: number[]\n assignedTo?: 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 startedTime?: string\n completedTime?: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n type: "STEP" | "SECTION"\n steps: Array<{\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\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 enabled?: boolean\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n manuallyCreated?: boolean\n automationConfig?: {\n flowId: { ... }\n executionId?: { ... }\n executionStatus?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n taxonomies?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `StepId`\n\n```ts\ntype StepId = {\n id?: string\n entityRefId?: string\n}\n```\n\n### `StepSimplified`\n\n```ts\ntype StepSimplified = {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\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 enabled?: boolean\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n}\n```\n\n### `Step`\n\n```ts\ntype Step = {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\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 enabled?: boolean\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: 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 manuallyCreated?: boolean\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n taxonomies?: string[]\n}\n```\n\n### `StepExtended`\n\n```ts\ntype StepExtended = {\n executionId: string\n executionName: string\n executionStatus: "STARTED" | "DONE" | "CLOSED"\n contexts?: Array<{\n id: string\n title: string\n schema: string\n }>\n}\n```\n\n### `StepStatus`\n\n**Note**: "UNASSIGNED" and "ASSIGNED" are deprecated and will be removed in a future version. Please use "PENDING" instead. Status values for workflow execution steps/tasks:\n- **UNASSIGNED**: Step has not been assigned to any user (deprecated - use PENDING instead)\n- **ASSIGNED**: Step has been assi\n\n```ts\ntype StepStatus = "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n```\n\n### `SectionStatus`\n\n```ts\ntype SectionStatus = "OPEN" | "IN_PROGRESS" | "COMPLETED"\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### `AutomationConfig`\n\nConfiguration for automation execution to run\n\n```ts\ntype AutomationConfig = {\n flowId: string\n executionId?: string\n executionStatus?: string\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### `ItemType`\n\n```ts\ntype ItemType = "STEP" | "SECTION"\n```\n\n### `TriggerType`\n\n```ts\ntype TriggerType = "MANUAL" | "AUTOMATIC"\n```\n\n### `CreateStepReq`\n\n```ts\ntype CreateStepReq = {\n insertionIndex: number\n name: string\n description?: {\n enabled: boolean\n value: string\n }\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n sectionId?: string\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n}\n```\n\n### `UpdateStepReq`\n\n```ts\ntype UpdateStepReq = {\n stepId?: string\n entityRefId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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 name?: string\n description?: {\n enabled: boolean\n value: string\n }\n position?: {\n index: number\n sectionId?: string\n }\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n startedTime?: string\n completedTime?: string\n}\n```\n\n### `StepPositionAt`\n\n```ts\ntype StepPositionAt = {\n index: number\n sectionId?: string\n}\n```\n\n### `UpdateStepResp`\n\n```ts\ntype UpdateStepResp = {\n id: string\n definitionId?: string\n entityRefId?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\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 enabled?: boolean\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n executionType?: "MANUAL" | "AUTOMATION"\n sectionId?: string\n executionId?: string\n userIds?: number[]\n assignedTo?: string[]\n assignedToInProgress?: string\n assignedToOnHold?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n created?: string\n lastUpdated?: string\n statusLastUpdated?: string\n startedTime?: string\n completedTime?: 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 manuallyCreated?: boolean\n automationConfig?: {\n flowId: string\n executionId?: string\n executionStatus?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n taxonomies?: string[]\n}\n```\n\n### `SearchStepsResp`\n\n```ts\ntype SearchStepsResp = {\n hits?: number\n results?: Array<{\n executionId: string\n executionName: string\n executionStatus: "STARTED" | "DONE" | "CLOSED"\n contexts?: Array<{\n id: { ... }\n title: { ... }\n schema: { ... }\n }>\n }>\n}\n```\n\n### `SearchExecutionsReq`\n\n```ts\ntype SearchExecutionsReq = {\n name?: string\n status?: "STARTED" | "DONE" | "CLOSED"\n includeDoneWorkflows?: boolean\n assignedTo?: string\n sorting?: "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"\n pagination?: {\n orgId?: string\n creationTime?: string\n }\n}\n```\n\n### `SearchExecutionsResp`\n\n```ts\ntype SearchExecutionsResp = {\n executions: Array<{\n id?: string\n definitionId?: string\n orgId?: string\n name?: string\n creationTime?: string\n lastUpdateTime?: string\n dueDate?: string\n completedTime?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition?: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n status?: "STARTED" | "DONE" | "CLOSED"\n trigger?: "MANUAL" | "AUTOMATIC"\n assignedTo?: string[]\n lastModifiedBy?: string\n contexts?: Array<{\n id: { ... }\n title: { ... }\n schema: { ... }\n }>\n nextOpenStep?: {\n id?: { ... }\n entityRefId?: { ... }\n }\n configuredClosingReasonSnapshot?: Array<{\n id: { ... }\n title: { ... }\n }>\n selectedClosingReasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n closingReasonDescription?: string\n enableECPWorkflow?: boolean\n updateEntityAttributes?: Array<{\n source: { ... }\n target: { ... }\n }>\n version?: number\n taxonomies?: string[]\n singleClosingReasonSelection?: boolean\n flow: Array<{\n id: { ... }\n definitionId?: { ... }\n name: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n status?: { ... }\n type: { ... }\n steps: { ... }\n taxonomies?: { ... }\n } | {\n id: { ... }\n definitionId?: { ... }\n entityRefId?: { ... }\n name: { ... }\n description?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n enabled?: { ... }\n requirements?: { ... }\n executionType?: { ... }\n sectionId?: { ... }\n executionId?: { ... }\n userIds?: { ... }\n assignedTo?: { ... }\n assignedToInProgress?: { ... }\n assignedToOnHold?: { ... }\n status?: { ... }\n created?: { ... }\n lastUpdated?: { ... }\n statusLastUpdated?: { ... }\n startedTime?: { ... }\n completedTime?: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n manuallyCreated?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n taxonomies?: { ... }\n }>\n }>\n lastEvaluatedKey?: {\n orgId?: string\n creationTime?: string\n }\n}\n```\n\n### `LastEvaluatedKey`\n\n```ts\ntype LastEvaluatedKey = {\n orgId?: string\n creationTime?: string\n}\n```\n\n### `SearchStepsReq`\n\n```ts\ntype SearchStepsReq = {\n executionName?: string\n stepName?: string\n assignedTo?: number\n includeDoneWorkflows?: boolean\n manuallyCreated?: boolean\n status?: "OPEN" | "COMPLETE" | "NEXT_OPEN_ITEM_IN_WORKFLOW"\n sorting?: "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"\n pagination?: {\n from?: number\n size?: number\n }\n}\n```\n\n### `SearchSorting`\n\n```ts\ntype SearchSorting = "A_Z" | "Z_A" | "DUE_DATE_ASC" | "DUE_DATE_DESC" | "TRIGGER_DATE_ASC" | "TRIGGER_DATE_DESC"\n```\n\n### `SearchPagination`\n\n```ts\ntype SearchPagination = {\n from?: number\n size?: number\n}\n```\n\n### `ExecutionPaginationDynamo`\n\n```ts\ntype ExecutionPaginationDynamo = {\n orgId?: string\n creationTime?: string\n}\n```\n\n### `ErrorResp`\n\nStandard error response returned when an API request fails.\nContains a human-readable message describing the error.\n\n\n```ts\ntype ErrorResp = {\n message: string\n}\n```\n\n### `ClosingReasonResp`\n\n```ts\ntype ClosingReasonResp = {\n reasons?: Array<{\n id: string\n title: string\n }>\n}\n```\n\n### `PhaseInEntity`\n\n```ts\ntype PhaseInEntity = {\n phase_id?: string\n phase_name?: string\n phase_progress?: number\n phase_assignees?: string[]\n}\n```\n\n### `WorkflowInEntity`\n\n```ts\ntype WorkflowInEntity = {\n id?: string\n definition_id?: string\n name?: string\n status?: "STARTED" | "DONE" | "CLOSED"\n assignees?: string[]\n duedate?: string // date-time\n last_update_time?: string // date-time\n progress?: number\n upcoming_tasks_assignees?: string[]\n task_id?: string\n task_name?: string\n task_assignees?: string[]\n task_duedate?: string // date-time\n task_execution_type?: "MANUAL" | "AUTOMATION"\n task_status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n phase_id?: string\n phase_name?: string\n phase_assignees?: string[]\n phase_progress?: number\n phases_in_progress?: Array<{\n phase_id?: string\n phase_name?: string\n phase_progress?: number\n phase_assignees?: string[]\n }>\n selected_closing_reasons?: Array<{\n id: string\n title: string\n }>\n closing_reason_description?: 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\n### `StartFlowReq`\n\nRequest payload for starting a new flow execution from a template.\n\n\n```ts\ntype StartFlowReq = {\n flow_template_id: string\n trigger?: {\n type?: "MANUAL" | "AUTOMATIC"\n automation_config?: {\n flow_id: { ... }\n execution_id?: { ... }\n execution_status?: { ... }\n error_reason?: { ... }\n input_context?: { ... }\n heal_attempts?: { ... }\n last_heal_attempted_at?: { ... }\n }\n }\n contexts: Array<{\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n }>\n purposes?: string[]\n}\n```\n\n### `SearchFlowsReq`\n\n```ts\ntype SearchFlowsReq = {\n entity_id: string\n entity_schema: string\n}\n```\n\n### `PatchFlowReq`\n\n```ts\ntype PatchFlowReq = {\n status?: "STARTED" | "DONE" | "CLOSED"\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n closing_reason?: {\n selected_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n configured_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n extra_description?: string\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\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 contexts?: Array<{\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n }>\n}\n```\n\n### `FlowExecution`\n\n```ts\ntype FlowExecution = {\n id: string\n flow_template_id: string\n org_id: string\n name: string\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" | "years"\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 status: "STARTED" | "DONE" | "CLOSED"\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n analytics: {\n started_at?: string\n completed_at?: string\n closed_at?: string\n started_by?: string\n closed_by?: string\n }\n contexts: Array<{\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n }>\n crt_tasks: Array<{\n id?: string\n crt_since?: string // date-time\n }>\n phases?: Array<{\n id: string\n template_id: string\n name: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\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 analytics?: {\n started_at?: { ... }\n in_progress_at?: { ... }\n completed_at?: { ... }\n status_updated_at?: { ... }\n in_progress_by?: { ... }\n completed_by?: { ... }\n skipped_by?: { ... }\n on_hold_by?: { ... }\n }\n taxonomies?: string[]\n loop_config?: {\n max_iterations: { ... }\n crt_iterations?: { ... }\n }\n }>\n tasks: Array<{\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n requirements?: Array<{\n task_id?: { ... }\n phase_id?: { ... }\n when: { ... }\n }>\n assigned_to?: Array<string | {\n variable: { ... }\n // ...\n}\n```\n\n### `FlowClosingReason`\n\n```ts\ntype FlowClosingReason = {\n selected_reasons?: Array<{\n id: string\n title: string\n }>\n configured_reasons?: Array<{\n id: string\n title: string\n }>\n extra_description?: string\n}\n```\n\n### `FlowTrigger`\n\n```ts\ntype FlowTrigger = {\n type?: "MANUAL" | "AUTOMATIC"\n automation_config?: {\n flow_id: string\n execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n }\n heal_attempts?: number\n last_heal_attempted_at?: string // date-time\n }\n}\n```\n\n### `FlowContext`\n\n```ts\ntype FlowContext = {\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n}\n```\n\n### `EntityRef`\n\n```ts\ntype EntityRef = {\n entity_id?: string\n entity_schema?: string\n is_primary?: boolean\n}\n```\n\n### `PhaseId`\n\n```ts\ntype PhaseId = string\n```\n\n### `TaskId`\n\n```ts\ntype TaskId = string\n```\n\n### `Task`\n\n```ts\ntype Task = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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" | "years"\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 analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\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 loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n} | {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n // ...\n}\n```\n\n### `TaskType`\n\n```ts\ntype TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n```\n\n### `ManualTask`\n\n```ts\ntype ManualTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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" | "years"\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 analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\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 loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n}\n```\n\n### `AutomationTask`\n\n```ts\ntype AutomationTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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" | "years"\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 analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\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 execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n }\n heal_attempts?: number\n last_heal_attempted_at?: string // date-time\n }\n automation_execution_id?: string\n trigger_mode?: "manual" | "automatic"\n schedule?: {\n mode: "immediate"\n } | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n schedule_id?: string\n scheduled_at?: string\n } | {\n mode: "relative"\n // ...\n}\n```\n\n### `LoopInfo`\n\nInformation about loop iterations, when task is part of a loop branch\n\n```ts\ntype LoopInfo = {\n max_iterations: number\n crt_iterations?: number\n}\n```\n\n### `LoopConfig`\n\n```ts\ntype LoopConfig = {\n loop_branch_id: string\n exit_branch_id: string\n max_iterations: number\n crt_iterations?: number\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" | "years"\n schedule_id?: string\n scheduled_at?: string\n} | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\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 schedule_id?: string\n scheduled_at?: string\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" | "years"\n schedule_id?: string\n scheduled_at?: string\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" | "years"\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 schedule_id?: string\n scheduled_at?: string\n}\n```\n\n### `DecisionTask`\n\n```ts\ntype DecisionTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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" | "years"\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 analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\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 evaluated_at?: string // date-time\n is_met?: boolean\n }>\n allow_parallel_execution?: boolean\n schedule?: {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n schedule_id?: string\n scheduled_at?: string\n } | {\n mode: "relative"\n // ...\n}\n```\n\n### `AiAgentTask`\n\n```ts\ntype AiAgentTask = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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" | "years"\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 analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\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 parameters?: object\n }\n loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n agent_execution?: {\n execution_id?: string\n execution_status?: string\n error_reason?: string\n outcome?: string\n }\n agent_execution_id?: string\n}\n```\n\n### `AgentConfig`\n\nConfiguration for AI Agent to run\n\n```ts\ntype AgentConfig = {\n agent_id: string\n parameters?: object\n}\n```\n\n### `AgentExecutionInfo`\n\n```ts\ntype AgentExecutionInfo = {\n execution_id?: string\n execution_status?: string\n error_reason?: string\n outcome?: string\n}\n```\n\n### `TaskBase`\n\n```ts\ntype TaskBase = {\n id: string\n template_id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n status: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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" | "years"\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 analytics: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n created_at?: string // date-time\n updated_at?: string // date-time\n manually_created?: boolean\n enabled: boolean\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 template_id: string\n name: string\n status?: "OPEN" | "IN_PROGRESS" | "COMPLETED"\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\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 analytics?: {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n }\n taxonomies?: string[]\n loop_config?: {\n max_iterations: number\n crt_iterations?: number\n }\n}\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### `AutomationInfo`\n\n```ts\ntype AutomationInfo = {\n flow_id: string\n execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: "trigger" | "task"\n task_id?: string\n }\n heal_attempts?: number\n last_heal_attempted_at?: string // date-time\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### `AnalyticsInfo`\n\n```ts\ntype AnalyticsInfo = {\n started_at?: string // date-time\n in_progress_at?: string // date-time\n completed_at?: string // date-time\n status_updated_at?: string // date-time\n in_progress_by?: string\n completed_by?: string\n skipped_by?: string\n on_hold_by?: string\n}\n```\n\n### `ConditionId`\n\nA locally unique identifier for the condition\n\n```ts\ntype ConditionId = string\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 attributes?: { ... }\n attributes_match?: { ... }\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 evaluated_at?: string // date-time\n is_met?: boolean\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 attributes?: string[]\n attributes_match?: "any" | "all"\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 attributes?: string[]\n attributes_match?: "any" | "all"\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" | "years"\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" | "years"\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### `FlowTemplateId`\n\n```ts\ntype FlowTemplateId = string\n```\n\n### `FlowExecutionId`\n\n```ts\ntype FlowExecutionId = string\n```\n\n### `UserId`\n\nThe user id\n\n```ts\ntype UserId = string\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### `Assignees`\n\nThe user ids or variable assignments\n\n```ts\ntype Assignees = Array<string | {\n variable: string\n value?: string[]\n}>\n```\n\n### `PatchTaskReq`\n\nRequest payload for updating a task within a flow execution.\nAll fields are optional; only provided fields will be updated.\n\n\n```ts\ntype PatchTaskReq = {\n name?: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\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 enabled?: boolean\n automation_config?: {\n flow_id: string\n execution_id?: string\n execution_status?: string\n error_reason?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n }\n heal_attempts?: number\n last_heal_attempted_at?: string // date-time\n }\n description?: {\n enabled?: boolean\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 next_condition_id?: string\n revert_execution?: boolean\n completed_via_journey?: boolean\n}\n```\n\n### `PatchPhaseReq`\n\n```ts\ntype PatchPhaseReq = {\n name?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\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}\n```\n\n### `AddTaskReq`\n\n```ts\ntype AddTaskReq = {\n previous_task_id: string // uuid\n next_task_id: string // uuid\n task: {\n id?: string // uuid\n name: string\n status?: "UNASSIGNED" | "ASSIGNED" | "COMPLETED" | "SKIPPED" | "IN_PROGRESS" | "SCHEDULED" | "PENDING" | "CONDITION_PENDING" | "WAITING_FOR_CONFIRMATION" | "ON_HOLD" | "FAILED"\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 enabled?: boolean\n automation_config?: {\n flow_id: { ... }\n execution_id?: { ... }\n execution_status?: { ... }\n error_reason?: { ... }\n input_context?: { ... }\n heal_attempts?: { ... }\n last_heal_attempted_at?: { ... }\n }\n phase_id?: string\n task_type?: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n }\n}\n```\n';
5
+
6
+
7
+ exports.default = workflow_default;