@epilot/sdk 2.4.2 → 2.4.3

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 (132) hide show
  1. package/definitions/automation.json +42 -0
  2. package/definitions/pricing-runtime.json +1 -1
  3. package/definitions/pricing.json +158 -83
  4. package/dist/apis/access-token.cjs +6 -6
  5. package/dist/apis/access-token.js +1 -1
  6. package/dist/apis/address-suggestions.cjs +6 -6
  7. package/dist/apis/address-suggestions.js +1 -1
  8. package/dist/apis/address.cjs +6 -6
  9. package/dist/apis/address.js +1 -1
  10. package/dist/apis/ai-agents.cjs +6 -6
  11. package/dist/apis/ai-agents.js +1 -1
  12. package/dist/apis/app.cjs +6 -6
  13. package/dist/apis/app.js +1 -1
  14. package/dist/apis/audit-logs.cjs +6 -6
  15. package/dist/apis/audit-logs.js +1 -1
  16. package/dist/apis/automation.cjs +6 -6
  17. package/dist/apis/automation.d.cts +2 -2
  18. package/dist/apis/automation.d.ts +2 -2
  19. package/dist/apis/automation.js +1 -1
  20. package/dist/apis/billing.cjs +6 -6
  21. package/dist/apis/billing.js +1 -1
  22. package/dist/apis/blueprint-manifest.cjs +6 -6
  23. package/dist/apis/blueprint-manifest.js +1 -1
  24. package/dist/apis/configuration-hub.cjs +6 -6
  25. package/dist/apis/configuration-hub.js +1 -1
  26. package/dist/apis/consent.cjs +6 -6
  27. package/dist/apis/consent.js +1 -1
  28. package/dist/apis/customer-portal.cjs +6 -6
  29. package/dist/apis/customer-portal.js +1 -1
  30. package/dist/apis/dashboard.cjs +6 -6
  31. package/dist/apis/dashboard.js +1 -1
  32. package/dist/apis/data-governance.cjs +6 -6
  33. package/dist/apis/data-governance.js +1 -1
  34. package/dist/apis/deduplication.cjs +6 -6
  35. package/dist/apis/deduplication.js +1 -1
  36. package/dist/apis/design.cjs +6 -6
  37. package/dist/apis/design.js +1 -1
  38. package/dist/apis/document.cjs +6 -6
  39. package/dist/apis/document.js +1 -1
  40. package/dist/apis/email-settings.cjs +6 -6
  41. package/dist/apis/email-settings.js +1 -1
  42. package/dist/apis/email-template.cjs +6 -6
  43. package/dist/apis/email-template.js +1 -1
  44. package/dist/apis/entity-mapping.cjs +6 -6
  45. package/dist/apis/entity-mapping.js +1 -1
  46. package/dist/apis/entity.cjs +6 -6
  47. package/dist/apis/entity.js +1 -1
  48. package/dist/apis/environments.cjs +6 -6
  49. package/dist/apis/environments.js +1 -1
  50. package/dist/apis/event-catalog.cjs +6 -6
  51. package/dist/apis/event-catalog.js +1 -1
  52. package/dist/apis/file.cjs +6 -6
  53. package/dist/apis/file.js +1 -1
  54. package/dist/apis/iban.cjs +6 -6
  55. package/dist/apis/iban.js +1 -1
  56. package/dist/apis/integration-toolkit.cjs +6 -6
  57. package/dist/apis/integration-toolkit.js +1 -1
  58. package/dist/apis/journey.cjs +6 -6
  59. package/dist/apis/journey.js +1 -1
  60. package/dist/apis/kanban.cjs +6 -6
  61. package/dist/apis/kanban.js +1 -1
  62. package/dist/apis/message.cjs +6 -6
  63. package/dist/apis/message.js +1 -1
  64. package/dist/apis/metering.cjs +6 -6
  65. package/dist/apis/metering.js +1 -1
  66. package/dist/apis/notes.cjs +6 -6
  67. package/dist/apis/notes.js +1 -1
  68. package/dist/apis/notification.cjs +6 -6
  69. package/dist/apis/notification.js +1 -1
  70. package/dist/apis/organization.cjs +6 -6
  71. package/dist/apis/organization.js +1 -1
  72. package/dist/apis/partner-directory.cjs +6 -6
  73. package/dist/apis/partner-directory.js +1 -1
  74. package/dist/apis/permissions.cjs +6 -6
  75. package/dist/apis/permissions.js +1 -1
  76. package/dist/apis/pricing-tier.cjs +6 -6
  77. package/dist/apis/pricing-tier.js +1 -1
  78. package/dist/apis/pricing.cjs +8 -8
  79. package/dist/apis/pricing.d.cts +2 -2
  80. package/dist/apis/pricing.d.ts +2 -2
  81. package/dist/apis/pricing.js +2 -2
  82. package/dist/apis/purpose.cjs +6 -6
  83. package/dist/apis/purpose.js +1 -1
  84. package/dist/apis/query.cjs +6 -6
  85. package/dist/apis/query.js +1 -1
  86. package/dist/apis/sandbox.cjs +6 -6
  87. package/dist/apis/sandbox.js +1 -1
  88. package/dist/apis/sharing.cjs +6 -6
  89. package/dist/apis/sharing.js +1 -1
  90. package/dist/apis/submission.cjs +6 -6
  91. package/dist/apis/submission.js +1 -1
  92. package/dist/apis/target.cjs +6 -6
  93. package/dist/apis/target.js +1 -1
  94. package/dist/apis/targeting.cjs +6 -6
  95. package/dist/apis/targeting.js +1 -1
  96. package/dist/apis/template-variables.cjs +6 -6
  97. package/dist/apis/template-variables.js +1 -1
  98. package/dist/apis/user.cjs +6 -6
  99. package/dist/apis/user.js +1 -1
  100. package/dist/apis/validation-rules.cjs +6 -6
  101. package/dist/apis/validation-rules.js +1 -1
  102. package/dist/apis/webhooks.cjs +6 -6
  103. package/dist/apis/webhooks.js +1 -1
  104. package/dist/apis/workflow-definition.cjs +6 -6
  105. package/dist/apis/workflow-definition.js +1 -1
  106. package/dist/apis/workflow.cjs +6 -6
  107. package/dist/apis/workflow.js +1 -1
  108. package/dist/automation-BMO7ZFTN.cjs +7 -0
  109. package/dist/automation-MEZTSUR3.js +7 -0
  110. package/dist/{automation.d-CzhG2m4L.d.cts → automation.d-Du6-uiz5.d.cts} +31 -0
  111. package/dist/{automation.d-CzhG2m4L.d.ts → automation.d-Du6-uiz5.d.ts} +31 -0
  112. package/dist/{chunk-MEUS7LCE.js → chunk-63BFJKWV.js} +1 -1
  113. package/dist/{chunk-YLJD7G7H.cjs → chunk-AM5TSEMU.cjs} +3 -3
  114. package/dist/{chunk-JXJC6WEW.cjs → chunk-KP7H52BF.cjs} +1 -1
  115. package/dist/{chunk-CQ3AKMIJ.js → chunk-M25MI6ZX.js} +3 -3
  116. package/dist/index.cjs +10 -10
  117. package/dist/index.d.cts +2 -2
  118. package/dist/index.d.ts +2 -2
  119. package/dist/index.js +2 -2
  120. package/dist/pricing-G67CH3XH.js +7 -0
  121. package/dist/pricing-XAET4G7T.cjs +7 -0
  122. package/dist/{pricing-runtime-JRR4FWFI.js → pricing-runtime-2YKEJJMZ.js} +1 -1
  123. package/dist/{pricing-runtime-6XNS4EOF.cjs → pricing-runtime-XDCOKL47.cjs} +2 -2
  124. package/dist/{pricing.d-Cv39plGm.d.cts → pricing.d-BHpMU4KU.d.cts} +80 -25
  125. package/dist/{pricing.d-Cv39plGm.d.ts → pricing.d-BHpMU4KU.d.ts} +80 -25
  126. package/docs/automation.md +42 -5
  127. package/docs/pricing.md +39 -15
  128. package/package.json +1 -1
  129. package/dist/automation-GFNNLSIN.js +0 -7
  130. package/dist/automation-IOCVCTKR.cjs +0 -7
  131. package/dist/pricing-4Z4TOETA.cjs +0 -7
  132. package/dist/pricing-C65DTZSX.js +0 -7
@@ -1,7 +0,0 @@
1
- import "./chunk-YPSWSI3M.js";
2
-
3
- // src/docs/automation.json
4
- var automation_default = '# Automation API\n\n- **Base URL:** `https://automation.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/automation](https://docs.epilot.io/api/automation)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.automation.searchFlows(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/automation\'\n\nconst automationClient = getClient()\nauthorize(automationClient, () => \'<token>\')\nconst { data } = await automationClient.searchFlows(...)\n```\n\n## Operations\n\n**flows**\n- [`searchFlows`](#searchflows)\n- [`createFlow`](#createflow)\n- [`batchGetFlows`](#batchgetflows)\n- [`getFlow`](#getflow)\n- [`putFlow`](#putflow)\n- [`deleteFlow`](#deleteflow)\n\n**executions**\n- [`getExecutions`](#getexecutions)\n- [`startExecution`](#startexecution)\n- [`getExecution`](#getexecution)\n- [`cancelExecution`](#cancelexecution)\n- [`retriggerAction`](#retriggeraction)\n- [`resumeExecutionWithToken`](#resumeexecutionwithtoken)\n- [`cancelSchedule`](#cancelschedule)\n\n**bulk**\n- [`bulkTriggerExecutions`](#bulktriggerexecutions)\n- [`getBulkJob`](#getbulkjob)\n- [`patchBulkJob`](#patchbulkjob)\n\n**Schemas**\n- [`AutomationFlowId`](#automationflowid)\n- [`AutomationActionId`](#automationactionid)\n- [`AutomationFlow`](#automationflow)\n- [`WorkflowContextRole`](#workflowcontextrole)\n- [`SearchAutomationsResp`](#searchautomationsresp)\n- [`AnyTrigger`](#anytrigger)\n- [`AnyAction`](#anyaction)\n- [`AnyActionConfig`](#anyactionconfig)\n- [`AutomationActionConfig`](#automationactionconfig)\n- [`AutomationActionExecutionState`](#automationactionexecutionstate)\n- [`RetryStrategy`](#retrystrategy)\n- [`AutomationAction`](#automationaction)\n- [`ErrorOutput`](#erroroutput)\n- [`ErrorCode`](#errorcode)\n- [`ErrorDetail`](#errordetail)\n- [`CartCheckoutActionConfig`](#cartcheckoutactionconfig)\n- [`CartCheckoutAction`](#cartcheckoutaction)\n- [`CartCheckoutConfig`](#cartcheckoutconfig)\n- [`MapEntityActionConfig`](#mapentityactionconfig)\n- [`MapEntityAction`](#mapentityaction)\n- [`MapEntityConfig`](#mapentityconfig)\n- [`MappingConfigRef`](#mappingconfigref)\n- [`RelationAttribute`](#relationattribute)\n- [`MappingAttributeV2`](#mappingattributev2)\n- [`OperationNode`](#operationnode)\n- [`OperationObjectNode`](#operationobjectnode)\n- [`PrimitiveJSONValue`](#primitivejsonvalue)\n- [`MappingAttribute`](#mappingattribute)\n- [`MappingAttributeMode`](#mappingattributemode)\n- [`SetValueMapper`](#setvaluemapper)\n- [`CopyValueMapper`](#copyvaluemapper)\n- [`AppendValueMapper`](#appendvaluemapper)\n- [`MoveThreadAction`](#movethreadaction)\n- [`AssignThreadAction`](#assignthreadaction)\n- [`MoveThreadConfig`](#movethreadconfig)\n- [`AssignThreadConfig`](#assignthreadconfig)\n- [`SendEmailActionConfig`](#sendemailactionconfig)\n- [`SendEmailAction`](#sendemailaction)\n- [`ForwardEmailActionConfig`](#forwardemailactionconfig)\n- [`ForwardEmailAction`](#forwardemailaction)\n- [`ForwardEmailConfig`](#forwardemailconfig)\n- [`ReplyEmailActionConfig`](#replyemailactionconfig)\n- [`ReplyEmailAction`](#replyemailaction)\n- [`ReplyEmailConfig`](#replyemailconfig)\n- [`SendEmailConfig`](#sendemailconfig)\n- [`SendEmailCondition`](#sendemailcondition)\n- [`CreateDocumentActionConfig`](#createdocumentactionconfig)\n- [`CreateDocumentAction`](#createdocumentaction)\n- [`CreateDocumentConfig`](#createdocumentconfig)\n- [`TriggerWorkflowActionConfig`](#triggerworkflowactionconfig)\n- [`TriggerWorkflowAction`](#triggerworkflowaction)\n- [`TriggerWorkflowConfig`](#triggerworkflowconfig)\n- [`TriggerWorkflowCondition`](#triggerworkflowcondition)\n- [`TriggerShareEntityActionConfig`](#triggershareentityactionconfig)\n- [`TriggerShareEntityAction`](#triggershareentityaction)\n- [`TriggerShareEntityConfig`](#triggershareentityconfig)\n- [`AssignUsersToStep`](#assignuserstostep)\n- [`CustomAction`](#customaction)\n- [`TriggerWebhookActionConfig`](#triggerwebhookactionconfig)\n- [`TriggerWebhookAction`](#triggerwebhookaction)\n- [`TriggerWebhookConfig`](#triggerwebhookconfig)\n- [`InformERPActionConfig`](#informerpactionconfig)\n- [`InformERPAction`](#informerpaction)\n- [`InformERPConfig`](#informerpconfig)\n- [`TriggerEventActionConfig`](#triggereventactionconfig)\n- [`TriggerEventAction`](#triggereventaction)\n- [`TriggerEventConfig`](#triggereventconfig)\n- [`FlowExecutionCancelActionConfig`](#flowexecutioncancelactionconfig)\n- [`FlowExecutionCancelAction`](#flowexecutioncancelaction)\n- [`FlowExecutionCancelConfig`](#flowexecutioncancelconfig)\n- [`CancellationReason`](#cancellationreason)\n- [`ConditionStatement`](#conditionstatement)\n- [`ActionCondition`](#actioncondition)\n- [`ActionScheduleSource`](#actionschedulesource)\n- [`ActionSchedule`](#actionschedule)\n- [`AutomationExecutionId`](#automationexecutionid)\n- [`AutomationExecution`](#automationexecution)\n- [`WorkflowExecutionContext`](#workflowexecutioncontext)\n- [`ExecutionChain`](#executionchain)\n- [`TriggerEventManual`](#triggereventmanual)\n- [`TriggerEventFlowAutomationTask`](#triggereventflowautomationtask)\n- [`TriggerEventEntityActivity`](#triggerevententityactivity)\n- [`TriggerEventMessaging`](#triggereventmessaging)\n- [`TriggerEventEntityOperation`](#triggerevententityoperation)\n- [`ApiCallerContext`](#apicallercontext)\n- [`ExecutionStatus`](#executionstatus)\n- [`GetExecutionsResp`](#getexecutionsresp)\n- [`StartExecutionRequest`](#startexecutionrequest)\n- [`PatchBulkJobRequest`](#patchbulkjobrequest)\n- [`BulkTriggerRequest`](#bulktriggerrequest)\n- [`EntityRef`](#entityref)\n- [`BulkTriggerJob`](#bulktriggerjob)\n- [`ExecItem`](#execitem)\n- [`JobId`](#jobid)\n- [`EntityId`](#entityid)\n- [`ActivityId`](#activityid)\n- [`OrganizationId`](#organizationid)\n- [`TriggerContext`](#triggercontext)\n- [`AutomationTrigger`](#automationtrigger)\n- [`FlowsTrigger`](#flowstrigger)\n- [`JourneySubmitTrigger`](#journeysubmittrigger)\n- [`FrontendSubmitTrigger`](#frontendsubmittrigger)\n- [`ApiSubmissionTrigger`](#apisubmissiontrigger)\n- [`NewEmailThreadTrigger`](#newemailthreadtrigger)\n- [`ReceivedEmailTrigger`](#receivedemailtrigger)\n- [`EntityOperationTrigger`](#entityoperationtrigger)\n- [`ActivityTrigger`](#activitytrigger)\n- [`EntityOperation`](#entityoperation)\n- [`EntitySearchFilter`](#entitysearchfilter)\n- [`EntitySearchFilterValue`](#entitysearchfiltervalue)\n- [`EntityManualTrigger`](#entitymanualtrigger)\n- [`TriggerCondition`](#triggercondition)\n- [`Comparison`](#comparison)\n- [`FilterConditionOnEvent`](#filterconditiononevent)\n- [`EqualsIgnoreCaseCondition`](#equalsignorecasecondition)\n- [`AnythingButCondition`](#anythingbutcondition)\n- [`NumericCondition`](#numericcondition)\n- [`ExistsCondition`](#existscondition)\n- [`PrefixCondition`](#prefixcondition)\n- [`SuffixCondition`](#suffixcondition)\n- [`WildcardCondition`](#wildcardcondition)\n- [`OrCondition`](#orcondition)\n- [`DiffAdded`](#diffadded)\n- [`DiffUpdated`](#diffupdated)\n- [`DiffDeleted`](#diffdeleted)\n- [`OrConditionForDiff`](#orconditionfordiff)\n- [`EntityItemSnapshot`](#entityitemsnapshot)\n- [`RetryReq`](#retryreq)\n- [`ResumeToken`](#resumetoken)\n- [`ResumeReq`](#resumereq)\n- [`ResumeResp`](#resumeresp)\n- [`ErrorObject`](#errorobject)\n\n### `searchFlows`\n\nSearch available automation flows\n\n`GET /v1/automation/flows`\n\n```ts\nconst { data } = await client.searchFlows({\n schema: \'example\',\n size: 1,\n from: 1,\n trigger_source_id: \'example\',\n include_flows: true,\n})\n```\n\n---\n\n### `createFlow`\n\nCreate new automation flow\n\n`POST /v1/automation/flows`\n\n```ts\nconst { data } = await client.createFlow()\n```\n\n---\n\n### `batchGetFlows`\n\nGet multiple automation flows by their IDs\n\n`POST /v1/automation/flows:batchGet`\n\n```ts\nconst { data } = await client.batchGetFlows(\n null,\n {\n ids: [\'7791b04a-16d2-44a2-9af9-2d59c25c512f\']\n },\n)\n```\n\n---\n\n### `getFlow`\n\nList available automation flows\n\n`GET /v1/automation/flows/{flow_id}`\n\n```ts\nconst { data } = await client.getFlow({\n flow_id: \'example\',\n})\n```\n\n---\n\n### `putFlow`\n\nUpdate automation flow by id\n\n`PUT /v1/automation/flows/{flow_id}`\n\n```ts\nconst { data } = await client.putFlow({\n flow_id: \'example\',\n})\n```\n\n---\n\n### `deleteFlow`\n\nUpdate automation flow by id\n\n`DELETE /v1/automation/flows/{flow_id}`\n\n```ts\nconst { data } = await client.deleteFlow({\n flow_id: \'example\',\n})\n```\n\n---\n\n### `getExecutions`\n\nList automation executions\n\n`GET /v1/automation/executions`\n\n```ts\nconst { data } = await client.getExecutions({\n entity_id: \'example\',\n size: 1,\n from: 1,\n include_flows: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "total": 0,\n "results": [\n {\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {},\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [],\n "schedules": [],\n "actions": [],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {},\n "version": 2,\n "trigger_event": {},\n "workflow_context": {}\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `startExecution`\n\nStart new automation execution\n\n`POST /v1/automation/executions`\n\n```ts\nconst { data } = await client.startExecution(\n null,\n {\n entity_id: \'e3d3ebac-baab-4395-abf4-50b5bf1f8b74\',\n flow_id: \'7791b04a-16d2-44a2-9af9-2d59c25c512f\',\n workflow_context: {\n workflow_exec_id: \'string\',\n workflow_exec_task_id: \'string\',\n workflow_role: \'trigger_workflow\',\n _execution_chain: {\n parent_execution_id: \'string\',\n parent_task_id: \'string\',\n depth: 0\n }\n },\n flow_execution_id: \'string\',\n flow_automation_task_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {\n "id": "string",\n "schedule_id": "string",\n "evaluationResult": true,\n "statements": []\n }\n ],\n "schedules": [\n {\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {}\n }\n ],\n "actions": [\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n },\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "trigger-workflow",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n }\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {\n "EpilotAuth": {}\n }\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `bulkTriggerExecutions`\n\nCreate a bulk job that triggers multiple automation executions\n\n`POST /v1/automation/executions/bulk-jobs`\n\n```ts\nconst { data } = await client.bulkTriggerExecutions(\n null,\n {\n flow_id: \'7791b04a-16d2-44a2-9af9-2d59c25c512f\',\n entities_refs: [\n {\n entity_id: \'e3d3ebac-baab-4395-abf4-50b5bf1f8b74\',\n entity_schema: \'string\'\n }\n ],\n trigger_context: {\n entity_id: \'a1b2c3d4-e5f6-7890-1234-567890abcdef\'\n }\n },\n)\n```\n\n---\n\n### `getBulkJob`\n\nGet the status of a bulk job that triggers multiple automation executions\n\n`GET /v1/automation/executions/bulk-jobs/{job_id}`\n\n```ts\nconst { data } = await client.getBulkJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "status": "approval",\n "created_by": "1234",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "report_file_entity_id": "string",\n "entity_query": {\n "type": "refs",\n "data": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string"\n }\n ]\n },\n "pagination_state": {\n "page_size": 0,\n "pages_processed": 0,\n "total_processed": 0,\n "stable_query_id": "string",\n "search_after": ["string"],\n "has_more": true\n },\n "execution_summary": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string",\n "execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "timestamp": "2025-10-30T15:56:47.842Z",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `patchBulkJob`\n\nApprove / Cancel bulk job that triggers multiple automation executions\n\n`PATCH /v1/automation/executions/bulk-jobs/{job_id}`\n\n```ts\nconst { data } = await client.patchBulkJob(\n {\n job_id: \'example\',\n },\n {\n action: \'APPROVE\',\n task_token: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "status": "approval",\n "created_by": "1234",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "report_file_entity_id": "string",\n "entity_query": {\n "type": "refs",\n "data": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string"\n }\n ]\n },\n "pagination_state": {\n "page_size": 0,\n "pages_processed": 0,\n "total_processed": 0,\n "stable_query_id": "string",\n "search_after": ["string"],\n "has_more": true\n },\n "execution_summary": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string",\n "execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "timestamp": "2025-10-30T15:56:47.842Z",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nGet automation execution\n\n`GET /v1/automation/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {\n "id": "string",\n "schedule_id": "string",\n "evaluationResult": true,\n "statements": []\n }\n ],\n "schedules": [\n {\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {}\n }\n ],\n "actions": [\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n },\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "trigger-workflow",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n }\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {\n "EpilotAuth": {}\n }\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelExecution`\n\nCancel automation execution\n\n`DELETE /v1/automation/executions/{execution_id}`\n\n```ts\nconst { data } = await client.cancelExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {\n "id": "string",\n "schedule_id": "string",\n "evaluationResult": true,\n "statements": []\n }\n ],\n "schedules": [\n {\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {}\n }\n ],\n "actions": [\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n },\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "trigger-workflow",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n }\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {\n "EpilotAuth": {}\n }\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `retriggerAction`\n\nRetry a specific automation execution action which failed / is stuck.\n\n`POST /v1/automation/executions/{execution_id}/{action_id}/retrigger`\n\n```ts\nconst { data } = await client.retriggerAction(\n {\n execution_id: \'example\',\n action_id: \'example\',\n },\n {\n condition_id: \'string\',\n retry_strategy: \'RETRY_AND_RESUME\'\n },\n)\n```\n\n---\n\n### `resumeExecutionWithToken`\n\nResume a paused automation execution using a unique resume token.\n\n`POST /v1/automation/public/executions:resume`\n\n```ts\nconst { data } = await client.resumeExecutionWithToken(\n null,\n {\n resume_token: \'eyJraWQiOiJrZXkifQ==\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution": {\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {}\n ],\n "schedules": [\n {}\n ],\n "actions": [\n {},\n {}\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {}\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {}\n }\n },\n "resumedAction": {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {\n "mapping_config": {},\n "target_schema": "string",\n "target_unique": ["string"],\n "mapping_attributes": [],\n "relation_attributes": [],\n "linkback_relation_attribute": "mapped_entities",\n "linkback_relation_tags": ["string"]\n },\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {\n "message": "There are no registered portal users for the given emails, hence skipping the action",\n "payload": {}\n },\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {\n "error_code": "MAPPING_ERROR",\n "error_reason": "string",\n "error_info": {}\n },\n "retry_strategy": "RETRY_AND_RESUME"\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelSchedule`\n\nCancel a scheduled automation\n\n`DELETE /v1/automation/executions/{execution_id}/schedules/{schedule_id}`\n\n```ts\nconst { data } = await client.cancelSchedule({\n execution_id: \'example\',\n schedule_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {\n "id": "string",\n "origin": "trigger",\n "schema": "string",\n "attribute": "string"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `AutomationFlowId`\n\nID of the Automation Flow\n\n```ts\ntype AutomationFlowId = string\n```\n\n### `AutomationActionId`\n\n```ts\ntype AutomationActionId = string\n```\n\n### `AutomationFlow`\n\n```ts\ntype AutomationFlow = {\n id?: string\n flow_name: string\n enabled?: boolean\n disable_details?: {\n disabled_at: string // date-time\n disabled_by: "system" | "user"\n blame?: string\n }\n triggers: Array<{\n id?: string // uuid\n type: "frontend_submission"\n configuration: {\n source_id?: { ... }\n }\n } | {\n id?: string // uuid\n type: "journey_submission"\n configuration: {\n source_id: { ... }\n }\n } | {\n id?: string // uuid\n type: "api_submission"\n configuration: {\n source_id?: { ... }\n }\n } | {\n id?: string // uuid\n type: "entity_operation"\n configuration: {\n schema?: { ... }\n operations?: { ... }\n include_activities?: { ... }\n exclude_activities?: { ... }\n filter_config?: { ... }\n ecp_config?: { ... }\n }\n } | {\n id?: string // uuid\n type: "activity"\n configuration: {\n schema?: { ... }\n types?: { ... }\n }\n } | {\n id?: string // uuid\n type: "entity_manual"\n configuration: {\n schema?: { ... }\n }\n } | {\n id?: string // uuid\n type: "received_email"\n configuration: {\n message_type?: { ... }\n }\n } | {\n id?: string // uuid\n type: "new_email_thread"\n configuration: {\n shared_inbox_ids?: { ... }\n direction: { ... }\n }\n } | {\n id?: string // uuid\n type: "flows_trigger"\n configuration?: {\n journey_id?: { ... }\n }\n }>\n trigger_conditions?: Array<{\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n }>\n entity_schema?: string\n conditions?: Array<{\n id?: string\n schedule_id?: string\n evaluationResult?: boolean\n statements?: Array<{\n id?: { ... }\n source?: { ... }\n operation?: { ... }\n values?: { ... }\n }>\n }>\n schedules?: Array<{\n id: string\n scheduleApiId?: string\n numberOfUnits?: number\n timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"\n timeRelation?: "after" | "before"\n source: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n // ...\n}\n```\n\n### `WorkflowContextRole`\n\nThe role this automation plays in the workflow.\n\n```ts\ntype WorkflowContextRole = "trigger_workflow" | "run_task_automation"\n```\n\n### `SearchAutomationsResp`\n\n```ts\ntype SearchAutomationsResp = {\n total: number\n results: Array<{\n id?: string\n flow_name: string\n enabled?: boolean\n disable_details?: {\n disabled_at: { ... }\n disabled_by: { ... }\n blame?: { ... }\n }\n triggers: Array<{\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration?: { ... }\n }>\n trigger_conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n }>\n entity_schema?: string\n conditions?: Array<{\n id?: { ... }\n schedule_id?: { ... }\n evaluationResult?: { ... }\n statements?: { ... }\n }>\n schedules?: Array<{\n id: { ... }\n scheduleApiId?: { ... }\n numberOfUnits?: { ... }\n timePeriod?: { ... }\n timeRelation?: { ... }\n source: { ... }\n }>\n actions: Array<{\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n id?: { ... }\n // ...\n}\n```\n\n### `AnyTrigger`\n\n```ts\ntype AnyTrigger = {\n id?: string // uuid\n type: "frontend_submission"\n configuration: {\n source_id?: string\n }\n} | {\n id?: string // uuid\n type: "journey_submission"\n configuration: {\n source_id: string // uuid\n }\n} | {\n id?: string // uuid\n type: "api_submission"\n configuration: {\n source_id?: string\n }\n} | {\n id?: string // uuid\n type: "entity_operation"\n configuration: {\n schema?: string\n operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"[]\n include_activities?: string[]\n exclude_activities?: string[]\n filter_config?: {\n operation?: { ... }\n activity?: { ... }\n }\n ecp_config?: {\n origin?: { ... }\n portal_id?: { ... }\n file_config?: { ... }\n }\n }\n} | {\n id?: string // uuid\n type: "activity"\n configuration: {\n schema?: string\n types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]\n }\n} | {\n id?: string // uuid\n type: "entity_manual"\n configuration: {\n schema?: string\n }\n} | {\n id?: string // uuid\n type: "received_email"\n configuration: {\n message_type?: "RECEIVED"\n }\n} | {\n id?: string // uuid\n type: "new_email_thread"\n configuration: {\n shared_inbox_ids?: string[]\n direction: "INBOUND" | "OUTBOUND" | "BOTH"\n }\n} | {\n id?: string // uuid\n type: "flows_trigger"\n configuration?: {\n journey_id?: string // uuid\n }\n}\n```\n\n### `AnyAction`\n\n```ts\ntype AnyAction = {\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n} | {\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n} | {\n type?: "trigger-share-entity"\n config?: {\n partner_org_ids?: string[]\n }\n} | {\n type?: "trigger-webhook"\n config?: {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n} | {\n type?: "inform-erp"\n config?: {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n} | {\n type?: "trigger-event"\n config?: {\n event_name: string\n event_inputs?: Record<string, unknown>\n }\n} | {\n type?: "create-document"\n config?: {\n template_id?: string\n filename?: string\n }\n} | {\n type?: "send-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n // ...\n}\n```\n\n### `AnyActionConfig`\n\n```ts\ntype AnyActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n} | {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n} | {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n partner_org_ids?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n} | {\n id?: string\n // ...\n}\n```\n\n### `AutomationActionConfig`\n\n```ts\ntype AutomationActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: string\n config?: Record<string, unknown>\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `AutomationActionExecutionState`\n\n```ts\ntype AutomationActionExecutionState = {\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n started_at?: string\n updated_at?: string\n outputs?: Record<string, unknown>\n error_output?: {\n error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n error_reason: string\n error_info?: {\n details?: { ... }\n }\n }\n retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n}\n```\n\n### `RetryStrategy`\n\ndifferent behaviors for retrying failed execution actions.\n\n```ts\ntype RetryStrategy = "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n```\n\n### `AutomationAction`\n\n```ts\ntype AutomationAction = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: string\n config?: Record<string, unknown>\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n started_at?: string\n updated_at?: string\n outputs?: Record<string, unknown>\n error_output?: {\n error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n error_reason: string\n error_info?: {\n details?: { ... }\n }\n }\n retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n}\n```\n\n### `ErrorOutput`\n\n```ts\ntype ErrorOutput = {\n error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n error_reason: string\n error_info?: {\n details?: Array<{\n explanation: { ... }\n context?: { ... }\n id?: { ... }\n }>\n }\n}\n```\n\n### `ErrorCode`\n\n```ts\ntype ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n```\n\n### `ErrorDetail`\n\n```ts\ntype ErrorDetail = {\n explanation: string\n context?: string\n id?: string\n}\n```\n\n### `CartCheckoutActionConfig`\n\n```ts\ntype CartCheckoutActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "cart-checkout"\n config?: {\n version?: string\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n target_unique?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `CartCheckoutAction`\n\n```ts\ntype CartCheckoutAction = {\n type?: "cart-checkout"\n config?: {\n version?: string\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n target_unique?: string[]\n }\n}\n```\n\n### `CartCheckoutConfig`\n\n```ts\ntype CartCheckoutConfig = {\n version?: string\n mapping_config?: {\n config_id: string\n target_id: string\n version?: number\n }\n relation_attributes?: Array<{\n target: string\n target_tags?: string[]\n target_tags_include_source?: boolean\n source_filter?: {\n limit?: { ... }\n schema?: { ... }\n attribute?: { ... }\n relation_tag?: { ... }\n tag?: { ... }\n self?: { ... }\n }\n related_to?: Record<string, unknown>\n mode: "append" | "prepend" | "set"\n }>\n mapping_attributes?: Array<{\n target?: string\n operation: {\n _set?: { ... }\n _append?: { ... }\n _uniq?: { ... }\n _copy?: { ... }\n } | unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n target_unique?: string[]\n}\n```\n\n### `MapEntityActionConfig`\n\n```ts\ntype MapEntityActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `MapEntityAction`\n\n```ts\ntype MapEntityAction = {\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n}\n```\n\n### `MapEntityConfig`\n\n```ts\ntype MapEntityConfig = {\n mapping_config?: {\n config_id: string\n target_id: string\n version?: number\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: string\n operation: {\n _set?: { ... }\n _append?: { ... }\n _uniq?: { ... }\n _copy?: { ... }\n } | unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n }>\n relation_attributes?: Array<{\n target: string\n target_tags?: string[]\n target_tags_include_source?: boolean\n source_filter?: {\n limit?: { ... }\n schema?: { ... }\n attribute?: { ... }\n relation_tag?: { ... }\n tag?: { ... }\n self?: { ... }\n }\n related_to?: Record<string, unknown>\n mode: "append" | "prepend" | "set"\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n}\n```\n\n### `MappingConfigRef`\n\n```ts\ntype MappingConfigRef = {\n config_id: string\n target_id: string\n version?: number\n}\n```\n\n### `RelationAttribute`\n\n```ts\ntype RelationAttribute = {\n target: string\n target_tags?: string[]\n target_tags_include_source?: boolean\n source_filter?: {\n limit?: number\n schema?: string\n attribute?: string\n relation_tag?: string\n tag?: string\n self?: boolean\n }\n related_to?: Record<string, unknown>\n mode: "append" | "prepend" | "set"\n}\n```\n\n### `MappingAttributeV2`\n\n```ts\ntype MappingAttributeV2 = {\n target?: string\n operation: {\n _set?: unknown\n _append?: unknown\n _uniq?: boolean | string[]\n _copy?: string\n } | unknown\n}\n```\n\n### `OperationNode`\n\nMapping operation nodes are either primitive values or operation node objects\n\n```ts\ntype OperationNode = {\n _set?: unknown\n _append?: unknown\n _uniq?: boolean | string[]\n _copy?: string\n} | unknown\n```\n\n### `OperationObjectNode`\n\n```ts\ntype OperationObjectNode = {\n _set?: unknown\n _append?: unknown\n _uniq?: boolean | string[]\n _copy?: string\n}\n```\n\n### `PrimitiveJSONValue`\n\n```ts\ntype PrimitiveJSONValue = unknown\n```\n\n### `MappingAttribute`\n\n```ts\ntype MappingAttribute = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n} | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n} | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n}\n```\n\n### `MappingAttributeMode`\n\n- copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used togethe\n\n```ts\ntype MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value"\n```\n\n### `SetValueMapper`\n\n```ts\ntype SetValueMapper = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n}\n```\n\n### `CopyValueMapper`\n\n```ts\ntype CopyValueMapper = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n}\n```\n\n### `AppendValueMapper`\n\n```ts\ntype AppendValueMapper = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n}\n```\n\n### `MoveThreadAction`\n\n```ts\ntype MoveThreadAction = {\n type?: "move-thread"\n config?: {\n target_inbox_id?: string\n }\n}\n```\n\n### `AssignThreadAction`\n\n```ts\ntype AssignThreadAction = {\n type?: "assign-thread"\n config?: {\n remove?: string[]\n add?: string[]\n }\n}\n```\n\n### `MoveThreadConfig`\n\n```ts\ntype MoveThreadConfig = {\n target_inbox_id?: string\n}\n```\n\n### `AssignThreadConfig`\n\n```ts\ntype AssignThreadConfig = {\n remove?: string[]\n add?: string[]\n}\n```\n\n### `SendEmailActionConfig`\n\n```ts\ntype SendEmailActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "send-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n attachments?: Array<{\n source_filter?: { ... }\n }>\n conditions?: Array<{\n _equals?: { ... }\n }>\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `SendEmailAction`\n\n```ts\ntype SendEmailAction = {\n type?: "send-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n attachments?: Array<{\n source_filter?: { ... }\n }>\n conditions?: Array<{\n _equals?: { ... }\n }>\n }\n}\n```\n\n### `ForwardEmailActionConfig`\n\n```ts\ntype ForwardEmailActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "forward-email"\n config?: {\n forward_to: Array<{\n email: { ... }\n name?: { ... }\n }>\n include_attachments?: boolean\n subject_prefix?: string\n mark_as_done?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `ForwardEmailAction`\n\n```ts\ntype ForwardEmailAction = {\n type?: "forward-email"\n config?: {\n forward_to: Array<{\n email: { ... }\n name?: { ... }\n }>\n include_attachments?: boolean\n subject_prefix?: string\n mark_as_done?: boolean\n }\n}\n```\n\n### `ForwardEmailConfig`\n\n```ts\ntype ForwardEmailConfig = {\n forward_to: Array<{\n email: string // email\n name?: string\n }>\n include_attachments?: boolean\n subject_prefix?: string\n mark_as_done?: boolean\n}\n```\n\n### `ReplyEmailActionConfig`\n\n```ts\ntype ReplyEmailActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "reply-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `ReplyEmailAction`\n\n```ts\ntype ReplyEmailAction = {\n type?: "reply-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n }\n}\n```\n\n### `ReplyEmailConfig`\n\n```ts\ntype ReplyEmailConfig = {\n email_template_id?: string\n language_code?: "de" | "en"\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n}\n```\n\n### `SendEmailConfig`\n\n```ts\ntype SendEmailConfig = {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n attachments?: Array<{\n source_filter?: {\n limit?: { ... }\n filename_regex?: { ... }\n attribute?: { ... }\n relation_tag?: { ... }\n tag?: { ... }\n document_type?: { ... }\n self?: { ... }\n }\n }>\n conditions?: Array<{\n _equals?: {\n source?: { ... }\n value?: { ... }\n }\n }>\n}\n```\n\n### `SendEmailCondition`\n\n```ts\ntype SendEmailCondition = {\n _equals?: {\n source?: string\n value?: string\n }\n}\n```\n\n### `CreateDocumentActionConfig`\n\n```ts\ntype CreateDocumentActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "create-document"\n config?: {\n template_id?: string\n filename?: string\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `CreateDocumentAction`\n\n```ts\ntype CreateDocumentAction = {\n type?: "create-document"\n config?: {\n template_id?: string\n filename?: string\n }\n}\n```\n\n### `CreateDocumentConfig`\n\n```ts\ntype CreateDocumentConfig = {\n template_id?: string\n filename?: string\n}\n```\n\n### `TriggerWorkflowActionConfig`\n\n```ts\ntype TriggerWorkflowActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerWorkflowAction`\n\n```ts\ntype TriggerWorkflowAction = {\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n}\n```\n\n### `TriggerWorkflowConfig`\n\n```ts\ntype TriggerWorkflowConfig = {\n target_workflow?: string\n conditions?: Array<{\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n schema?: string\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: string\n step_name?: string\n user_ids?: number[]\n }>\n filter_with_purposes?: boolean\n}\n```\n\n### `TriggerWorkflowCondition`\n\n```ts\ntype TriggerWorkflowCondition = {\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n schema?: string\n}\n```\n\n### `TriggerShareEntityActionConfig`\n\n```ts\ntype TriggerShareEntityActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n partner_org_ids?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerShareEntityAction`\n\n```ts\ntype TriggerShareEntityAction = {\n type?: "trigger-share-entity"\n config?: {\n partner_org_ids?: string[]\n }\n}\n```\n\n### `TriggerShareEntityConfig`\n\n```ts\ntype TriggerShareEntityConfig = {\n partner_org_ids?: string[]\n}\n```\n\n### `AssignUsersToStep`\n\n```ts\ntype AssignUsersToStep = {\n step_id?: string\n step_name?: string\n user_ids?: number[]\n}\n```\n\n### `CustomAction`\n\n```ts\ntype CustomAction = {\n type?: "custom-action"\n config?: {\n name?: string\n description?: string\n app_id?: string\n component_id?: string\n wait_for_callback?: boolean\n }\n}\n```\n\n### `TriggerWebhookActionConfig`\n\n```ts\ntype TriggerWebhookActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-webhook"\n config?: {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerWebhookAction`\n\n```ts\ntype TriggerWebhookAction = {\n type?: "trigger-webhook"\n config?: {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n}\n```\n\n### `TriggerWebhookConfig`\n\n```ts\ntype TriggerWebhookConfig = {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n}\n```\n\n### `InformERPActionConfig`\n\n```ts\ntype InformERPActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "inform-erp"\n config?: {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `InformERPAction`\n\n```ts\ntype InformERPAction = {\n type?: "inform-erp"\n config?: {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n}\n```\n\n### `InformERPConfig`\n\n```ts\ntype InformERPConfig = {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n}\n```\n\n### `TriggerEventActionConfig`\n\n```ts\ntype TriggerEventActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-event"\n config?: {\n event_name: string\n event_inputs?: Record<string, unknown>\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerEventAction`\n\n```ts\ntype TriggerEventAction = {\n type?: "trigger-event"\n config?: {\n event_name: string\n event_inputs?: Record<string, unknown>\n }\n}\n```\n\n### `TriggerEventConfig`\n\nConfiguration for triggering an event catalog event\n\n```ts\ntype TriggerEventConfig = {\n event_name: string\n event_inputs?: Record<string, unknown>\n}\n```\n\n### `FlowExecutionCancelActionConfig`\n\n```ts\ntype FlowExecutionCancelActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "cancel-flow-execution"\n config?: {\n selected_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n extra_description?: string\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `FlowExecutionCancelAction`\n\n```ts\ntype FlowExecutionCancelAction = {\n type?: "cancel-flow-execution"\n config?: {\n selected_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n extra_description?: string\n }\n}\n```\n\n### `FlowExecutionCancelConfig`\n\nConfiguration for cancelling a flow execution with selected reasons\n\n```ts\ntype FlowExecutionCancelConfig = {\n selected_reasons?: Array<{\n id: string\n title: string\n }>\n extra_description?: string\n}\n```\n\n### `CancellationReason`\n\nA reason for cancelling a flow execution\n\n```ts\ntype CancellationReason = {\n id: string\n title: string\n}\n```\n\n### `ConditionStatement`\n\n```ts\ntype ConditionStatement = {\n id?: string // uuid\n source?: {\n id?: string\n origin?: "trigger" | "action"\n originType?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "payment" | "relation_payment_method"\n attributeRepeatable?: boolean\n repeatableItemOp?: boolean\n attributeOperation?: "all" | "updated" | "added" | "deleted"\n }\n operation?: "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" | "entity_exists" | "entity_does_not_exist"\n values?: string[]\n}\n```\n\n### `ActionCondition`\n\n```ts\ntype ActionCondition = {\n id?: string\n schedule_id?: string\n evaluationResult?: boolean\n statements?: Array<{\n id?: string // uuid\n source?: {\n id?: { ... }\n origin?: { ... }\n originType?: { ... }\n schema?: { ... }\n attribute?: { ... }\n attributeType?: { ... }\n attributeRepeatable?: { ... }\n repeatableItemOp?: { ... }\n attributeOperation?: { ... }\n }\n operation?: "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" | "entity_exists" | "entity_does_not_exist"\n values?: string[]\n }>\n}\n```\n\n### `ActionScheduleSource`\n\nThe source of the schedule_at timestamp that will be used to schedule the action\n\n```ts\ntype ActionScheduleSource = {\n id: string\n origin: "trigger" | "action" | "action_task" | "automation"\n schema?: string\n attribute?: string\n}\n```\n\n### `ActionSchedule`\n\n```ts\ntype ActionSchedule = {\n id: string\n scheduleApiId?: string\n numberOfUnits?: number\n timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"\n timeRelation?: "after" | "before"\n source: {\n id: string\n origin: "trigger" | "action" | "action_task" | "automation"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `AutomationExecutionId`\n\n```ts\ntype AutomationExecutionId = string\n```\n\n### `AutomationExecution`\n\n```ts\ntype AutomationExecution = {\n id: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n entity_id: string\n activity_id?: string\n entity_snapshot?: {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n }\n org_id: string\n flow_id: string\n flow_name?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n current_action_id?: string\n conditions?: Array<{\n id?: string\n schedule_id?: string\n evaluationResult?: boolean\n statements?: Array<{\n id?: { ... }\n source?: { ... }\n operation?: { ... }\n values?: { ... }\n }>\n }>\n schedules?: Array<{\n id: string\n scheduleApiId?: string\n numberOfUnits?: number\n timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"\n timeRelation?: "after" | "before"\n source: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n }>\n actions: Array<{\n type?: "map-entity"\n config?: {\n mapping_config?: { ... }\n target_schema: { ... }\n target_unique?: { ... }\n mapping_attributes?: { ... }\n relation_attributes?: { ... }\n linkback_relation_attribute?: { ... }\n linkback_relation_tags?: { ... }\n }\n } | {\n type?: "trigger-workflow"\n config?: {\n target_workflow?: { ... }\n conditions?: { ... }\n assignees?: { ... }\n assign_steps?: { ... }\n filter_with_purposes?: { ... }\n }\n } | {\n type?: "trigger-share-entity"\n config?: {\n partner_org_ids?: { ... }\n }\n } | {\n type?: "trigger-webhook"\n config?: {\n event_id?: { ... }\n entity_sources?: { ... }\n target_webhook_id?: { ... }\n sync?: { ... }\n }\n } | {\n type?: "inform-erp"\n config?: {\n entity_sources?: { ... }\n target_webhook_id?: { ... }\n sync?: { ... }\n }\n } | {\n type?: "trigger-event"\n config?: {\n event_name: { ... }\n event_inputs?: { ... }\n }\n } | {\n type?: "create-document"\n config?: {\n template_id?: { ... }\n filename?: { ... }\n }\n } | {\n type?: "send-email"\n config?: {\n email_template_id?: { ... }\n // ...\n}\n```\n\n### `WorkflowExecutionContext`\n\n```ts\ntype WorkflowExecutionContext = {\n workflow_exec_id: string\n workflow_exec_task_id?: string\n workflow_role: "trigger_workflow" | "run_task_automation"\n _execution_chain?: {\n parent_execution_id?: string\n parent_task_id?: string\n depth?: number\n }\n}\n```\n\n### `ExecutionChain`\n\n[Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers.\n\n```ts\ntype ExecutionChain = {\n parent_execution_id?: string\n parent_task_id?: string\n depth?: number\n}\n```\n\n### `TriggerEventManual`\n\n```ts\ntype TriggerEventManual = {\n type?: "manual"\n org_id: string\n entity_id: string\n caller?: {\n EpilotAuth?: {\n claims?: { ... }\n userId?: { ... }\n organizationId?: { ... }\n token?: { ... }\n }\n }\n}\n```\n\n### `TriggerEventFlowAutomationTask`\n\n```ts\ntype TriggerEventFlowAutomationTask = {\n type?: "flow_automation_task"\n org_id: string\n entity_id: string\n flow_execution_id: string\n flow_automation_task_id: string // UUID\n caller?: {\n EpilotAuth?: {\n claims?: { ... }\n userId?: { ... }\n organizationId?: { ... }\n token?: { ... }\n }\n }\n}\n```\n\n### `TriggerEventEntityActivity`\n\n```ts\ntype TriggerEventEntityActivity = {\n type?: "entity_activity"\n org_id: string\n activity_id: string\n activity_type: string\n entity_id?: string\n}\n```\n\n### `TriggerEventMessaging`\n\n```ts\ntype TriggerEventMessaging = {\n type?: "new_email_thread"\n org_id: string\n thread_id: string\n message_id: string\n entity_id: string\n}\n```\n\n### `TriggerEventEntityOperation`\n\n```ts\ntype TriggerEventEntityOperation = {\n type?: "entity_operation"\n entity_id: string\n org_id: string\n activity_id: string\n operation_type: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"\n}\n```\n\n### `ApiCallerContext`\n\n```ts\ntype ApiCallerContext = {\n EpilotAuth?: {\n claims?: {\n userId?: { ... }\n sub?: { ... }\n email?: { ... }\n cognito:username?: { ... }\n custom:ivy_user_id?: { ... }\n }\n userId?: string\n organizationId?: string\n token?: string\n }\n}\n```\n\n### `ExecutionStatus`\n\n```ts\ntype ExecutionStatus = "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n```\n\n### `GetExecutionsResp`\n\n```ts\ntype GetExecutionsResp = {\n total: number\n results: Array<{\n id: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n entity_id: string\n activity_id?: string\n entity_snapshot?: {\n _id: { ... }\n _title: { ... }\n _org: { ... }\n _schema: { ... }\n _tags?: { ... }\n _created_at: { ... }\n _updated_at: { ... }\n }\n org_id: string\n flow_id: string\n flow_name?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n current_action_id?: string\n conditions?: Array<{\n id?: { ... }\n schedule_id?: { ... }\n evaluationResult?: { ... }\n statements?: { ... }\n }>\n schedules?: Array<{\n id: { ... }\n scheduleApiId?: { ... }\n numberOfUnits?: { ... }\n timePeriod?: { ... }\n timeRelation?: { ... }\n source: { ... }\n }>\n actions: Array<{\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n id?: { ... }\n flow_action_id?: { ... }\n name?: { ... }\n type?: { ... }\n config?: { ... }\n allow_failure?: { ... }\n created_automatically?: { ... }\n is_bulk_action?: { ... }\n reason?: { ... }\n condition_id?: { ... }\n schedule_id?: { ... }\n execution_status?: { ... }\n started_at?: { ... }\n updated_at?: { ... }\n outputs?: { ... }\n error_output?: { ... }\n retry_strategy?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n }>\n resume_token?: string\n trigger_context?: Record<string, string>\n version?: number\n trigger_event?: {\n type?: { ... }\n org_id: { ... }\n // ...\n}\n```\n\n### `StartExecutionRequest`\n\n```ts\ntype StartExecutionRequest = {\n entity_id: string\n flow_id: string\n workflow_context?: {\n workflow_exec_id: string\n workflow_exec_task_id?: string\n workflow_role: "trigger_workflow" | "run_task_automation"\n _execution_chain?: {\n parent_execution_id?: { ... }\n parent_task_id?: { ... }\n depth?: { ... }\n }\n }\n flow_execution_id?: string\n flow_automation_task_id?: string\n}\n```\n\n### `PatchBulkJobRequest`\n\n```ts\ntype PatchBulkJobRequest = {\n action: "APPROVE" | "CANCEL"\n task_token: string\n}\n```\n\n### `BulkTriggerRequest`\n\n```ts\ntype BulkTriggerRequest = {\n flow_id: string\n entities_refs: Array<{\n entity_id: string\n entity_schema: string\n }>\n trigger_context?: Record<string, string>\n} | {\n flow_id: string\n entities_query: string\n trigger_context?: Record<string, string>\n} | {\n flow_id: string\n entities_filter: Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: { ... }\n }\n range?: Record<string, {\n gt?: { ... }\n gte?: { ... }\n lt?: { ... }\n lte?: { ... }\n format?: { ... }\n relation?: { ... }\n time_zone?: { ... }\n }>\n exists?: {\n field: { ... }\n }\n $and?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $or?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $not?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n }>\n trigger_context?: Record<string, string>\n}\n```\n\n### `EntityRef`\n\n```ts\ntype EntityRef = {\n entity_id: string\n entity_schema: string\n}\n```\n\n### `BulkTriggerJob`\n\n```ts\ntype BulkTriggerJob = {\n job_id: string\n org_id: string\n flow_id: string\n status: "approval" | "querying_entities" | "entities_loaded" | "executing" | "monitoring" | "send_report" | "finished" | "failed" | "cancelled"\n created_by: string\n created_at: string // date-time\n updated_at: string // date-time\n approved_at?: string // date-time\n trigger_context?: Record<string, string>\n task_token?: string\n report_file_entity_id?: string\n entity_query?: {\n type: "refs" | "query" | "filter"\n data: Array<{\n entity_id: { ... }\n entity_schema: { ... }\n }> | string | Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n }\n pagination_state?: {\n page_size?: number\n pages_processed?: number\n total_processed?: number\n stable_query_id?: string\n search_after?: string | number[]\n has_more?: boolean\n }\n execution_summary?: Array<{\n entity_id: string\n entity_schema?: string\n execution_id?: string\n execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n timestamp?: string // date-time\n error?: string\n }>\n}\n```\n\n### `ExecItem`\n\nExecution item for bulk trigger automation. It maps each entity to its automation execution id & status\n\n```ts\ntype ExecItem = {\n entity_id: string\n entity_schema?: string\n execution_id?: string\n execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n timestamp?: string // date-time\n error?: string\n}\n```\n\n### `JobId`\n\nJob ID for tracking the status of bulk trigger automation executions\n\n```ts\ntype JobId = string\n```\n\n### `EntityId`\n\n```ts\ntype EntityId = string\n```\n\n### `ActivityId`\n\n```ts\ntype ActivityId = string\n```\n\n### `OrganizationId`\n\n```ts\ntype OrganizationId = string\n```\n\n### `TriggerContext`\n\nAdditional contextual data for a bulk trigger automation. This would normally include additional entity IDs you\'d need after a listener picks up an event.\n\n```ts\ntype TriggerContext = Record<string, string>\n```\n\n### `AutomationTrigger`\n\n```ts\ntype AutomationTrigger = {\n id?: string // uuid\n}\n```\n\n### `FlowsTrigger`\n\n```ts\ntype FlowsTrigger = {\n id?: string // uuid\n type: "flows_trigger"\n configuration?: {\n journey_id?: string // uuid\n }\n}\n```\n\n### `JourneySubmitTrigger`\n\n```ts\ntype JourneySubmitTrigger = {\n id?: string // uuid\n type: "journey_submission"\n configuration: {\n source_id: string // uuid\n }\n}\n```\n\n### `FrontendSubmitTrigger`\n\n```ts\ntype FrontendSubmitTrigger = {\n id?: string // uuid\n type: "frontend_submission"\n configuration: {\n source_id?: string\n }\n}\n```\n\n### `ApiSubmissionTrigger`\n\n```ts\ntype ApiSubmissionTrigger = {\n id?: string // uuid\n type: "api_submission"\n configuration: {\n source_id?: string\n }\n}\n```\n\n### `NewEmailThreadTrigger`\n\n```ts\ntype NewEmailThreadTrigger = {\n id?: string // uuid\n type: "new_email_thread"\n configuration: {\n shared_inbox_ids?: string[]\n direction: "INBOUND" | "OUTBOUND" | "BOTH"\n }\n}\n```\n\n### `ReceivedEmailTrigger`\n\n```ts\ntype ReceivedEmailTrigger = {\n id?: string // uuid\n type: "received_email"\n configuration: {\n message_type?: "RECEIVED"\n }\n}\n```\n\n### `EntityOperationTrigger`\n\n- If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.\n- The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`\n | Comparison | Example\n\n```ts\ntype EntityOperationTrigger = {\n id?: string // uuid\n type: "entity_operation"\n configuration: {\n schema?: string\n operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"[]\n include_activities?: string[]\n exclude_activities?: string[]\n filter_config?: {\n operation?: { ... }\n activity?: { ... }\n }\n ecp_config?: {\n origin?: { ... }\n portal_id?: { ... }\n file_config?: { ... }\n }\n }\n}\n```\n\n### `ActivityTrigger`\n\n```ts\ntype ActivityTrigger = {\n id?: string // uuid\n type: "activity"\n configuration: {\n schema?: string\n types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]\n }\n}\n```\n\n### `EntityOperation`\n\n```ts\ntype EntityOperation = "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"\n```\n\n### `EntitySearchFilter`\n\nA subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.\n\n```ts\ntype EntitySearchFilter = Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: string[]\n }\n range?: Record<string, {\n gt?: string | number | boolean\n gte?: string | number | boolean\n lt?: string | number | boolean\n lte?: string | number | boolean\n format?: string\n relation?: "INTERSECTS" | "CONTAINS" | "WITHIN"\n time_zone?: string\n }>\n exists?: {\n field: string\n }\n $and?: Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: { ... }\n }\n range?: Record<string, {\n gt?: { ... }\n gte?: { ... }\n lt?: { ... }\n lte?: { ... }\n format?: { ... }\n relation?: { ... }\n time_zone?: { ... }\n }>\n exists?: {\n field: { ... }\n }\n $and?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $or?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $not?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n }>\n $or?: Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: { ... }\n }\n range?: Record<string, {\n gt?: { ... }\n gte?: { ... }\n lt?: { ... }\n lte?: { ... }\n format?: { ... }\n relation?: { ... }\n time_zone?: { ... }\n }>\n exists?: {\n field: { ... }\n }\n $and?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $or?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n // ...\n}\n```\n\n### `EntitySearchFilterValue`\n\nA filter field value.\n\n```ts\ntype EntitySearchFilterValue = string | number | boolean\n```\n\n### `EntityManualTrigger`\n\n```ts\ntype EntityManualTrigger = {\n id?: string // uuid\n type: "entity_manual"\n configuration: {\n schema?: string\n }\n}\n```\n\n### `TriggerCondition`\n\n```ts\ntype TriggerCondition = {\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n}\n```\n\n### `Comparison`\n\n```ts\ntype Comparison = "equals" | "any_of" | "not_empty" | "is_empty"\n```\n\n### `FilterConditionOnEvent`\n\n```ts\ntype FilterConditionOnEvent = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `EqualsIgnoreCaseCondition`\n\n```ts\ntype EqualsIgnoreCaseCondition = {\n equals-ignore-case?: string\n}\n```\n\n### `AnythingButCondition`\n\n```ts\ntype AnythingButCondition = {\n anything-but?: string[]\n}\n```\n\n### `NumericCondition`\n\n```ts\ntype NumericCondition = {\n numeric?: string | number[]\n}\n```\n\n### `ExistsCondition`\n\n```ts\ntype ExistsCondition = {\n exists?: boolean\n}\n```\n\n### `PrefixCondition`\n\n```ts\ntype PrefixCondition = {\n prefix?: string\n}\n```\n\n### `SuffixCondition`\n\n```ts\ntype SuffixCondition = {\n suffix?: string\n}\n```\n\n### `WildcardCondition`\n\n```ts\ntype WildcardCondition = {\n wildcard?: string\n}\n```\n\n### `OrCondition`\n\n```ts\ntype OrCondition = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n}\n```\n\n### `DiffAdded`\n\n```ts\ntype DiffAdded = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `DiffUpdated`\n\n```ts\ntype DiffUpdated = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `DiffDeleted`\n\n```ts\ntype DiffDeleted = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `OrConditionForDiff`\n\n```ts\ntype OrConditionForDiff = {\n $or?: unknown | unknown | unknown[]\n}\n```\n\n### `EntityItemSnapshot`\n\n```ts\ntype EntityItemSnapshot = {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n}\n```\n\n### `RetryReq`\n\n```ts\ntype RetryReq = {\n condition_id?: string\n retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n}\n```\n\n### `ResumeToken`\n\nA unique token to resume a paused automation execution\n\n```ts\ntype ResumeToken = string\n```\n\n### `ResumeReq`\n\n```ts\ntype ResumeReq = {\n resume_token: string\n}\n```\n\n### `ResumeResp`\n\n```ts\ntype ResumeResp = {\n execution: {\n id: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n entity_id: string\n activity_id?: string\n entity_snapshot?: {\n _id: { ... }\n _title: { ... }\n _org: { ... }\n _schema: { ... }\n _tags?: { ... }\n _created_at: { ... }\n _updated_at: { ... }\n }\n org_id: string\n flow_id: string\n flow_name?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n current_action_id?: string\n conditions?: Array<{\n id?: { ... }\n schedule_id?: { ... }\n evaluationResult?: { ... }\n statements?: { ... }\n }>\n schedules?: Array<{\n id: { ... }\n scheduleApiId?: { ... }\n numberOfUnits?: { ... }\n timePeriod?: { ... }\n timeRelation?: { ... }\n source: { ... }\n }>\n actions: Array<{\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n id?: { ... }\n flow_action_id?: { ... }\n name?: { ... }\n type?: { ... }\n config?: { ... }\n allow_failure?: { ... }\n created_automatically?: { ... }\n is_bulk_action?: { ... }\n reason?: { ... }\n condition_id?: { ... }\n schedule_id?: { ... }\n execution_status?: { ... }\n started_at?: { ... }\n updated_at?: { ... }\n outputs?: { ... }\n error_output?: { ... }\n retry_strategy?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n }>\n resume_token?: string\n trigger_context?: Record<string, string>\n version?: number\n trigger_event?: {\n type?: { ... }\n org_id: { ... }\n entity_id: { ... }\n // ...\n}\n```\n\n### `ErrorObject`\n\n```ts\ntype ErrorObject = {\n status?: number\n error?: string\n}\n```\n';
5
- export {
6
- automation_default as default
7
- };
@@ -1,7 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
-
3
- // src/docs/automation.json
4
- var automation_default = '# Automation API\n\n- **Base URL:** `https://automation.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/automation](https://docs.epilot.io/api/automation)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.automation.searchFlows(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/automation\'\n\nconst automationClient = getClient()\nauthorize(automationClient, () => \'<token>\')\nconst { data } = await automationClient.searchFlows(...)\n```\n\n## Operations\n\n**flows**\n- [`searchFlows`](#searchflows)\n- [`createFlow`](#createflow)\n- [`batchGetFlows`](#batchgetflows)\n- [`getFlow`](#getflow)\n- [`putFlow`](#putflow)\n- [`deleteFlow`](#deleteflow)\n\n**executions**\n- [`getExecutions`](#getexecutions)\n- [`startExecution`](#startexecution)\n- [`getExecution`](#getexecution)\n- [`cancelExecution`](#cancelexecution)\n- [`retriggerAction`](#retriggeraction)\n- [`resumeExecutionWithToken`](#resumeexecutionwithtoken)\n- [`cancelSchedule`](#cancelschedule)\n\n**bulk**\n- [`bulkTriggerExecutions`](#bulktriggerexecutions)\n- [`getBulkJob`](#getbulkjob)\n- [`patchBulkJob`](#patchbulkjob)\n\n**Schemas**\n- [`AutomationFlowId`](#automationflowid)\n- [`AutomationActionId`](#automationactionid)\n- [`AutomationFlow`](#automationflow)\n- [`WorkflowContextRole`](#workflowcontextrole)\n- [`SearchAutomationsResp`](#searchautomationsresp)\n- [`AnyTrigger`](#anytrigger)\n- [`AnyAction`](#anyaction)\n- [`AnyActionConfig`](#anyactionconfig)\n- [`AutomationActionConfig`](#automationactionconfig)\n- [`AutomationActionExecutionState`](#automationactionexecutionstate)\n- [`RetryStrategy`](#retrystrategy)\n- [`AutomationAction`](#automationaction)\n- [`ErrorOutput`](#erroroutput)\n- [`ErrorCode`](#errorcode)\n- [`ErrorDetail`](#errordetail)\n- [`CartCheckoutActionConfig`](#cartcheckoutactionconfig)\n- [`CartCheckoutAction`](#cartcheckoutaction)\n- [`CartCheckoutConfig`](#cartcheckoutconfig)\n- [`MapEntityActionConfig`](#mapentityactionconfig)\n- [`MapEntityAction`](#mapentityaction)\n- [`MapEntityConfig`](#mapentityconfig)\n- [`MappingConfigRef`](#mappingconfigref)\n- [`RelationAttribute`](#relationattribute)\n- [`MappingAttributeV2`](#mappingattributev2)\n- [`OperationNode`](#operationnode)\n- [`OperationObjectNode`](#operationobjectnode)\n- [`PrimitiveJSONValue`](#primitivejsonvalue)\n- [`MappingAttribute`](#mappingattribute)\n- [`MappingAttributeMode`](#mappingattributemode)\n- [`SetValueMapper`](#setvaluemapper)\n- [`CopyValueMapper`](#copyvaluemapper)\n- [`AppendValueMapper`](#appendvaluemapper)\n- [`MoveThreadAction`](#movethreadaction)\n- [`AssignThreadAction`](#assignthreadaction)\n- [`MoveThreadConfig`](#movethreadconfig)\n- [`AssignThreadConfig`](#assignthreadconfig)\n- [`SendEmailActionConfig`](#sendemailactionconfig)\n- [`SendEmailAction`](#sendemailaction)\n- [`ForwardEmailActionConfig`](#forwardemailactionconfig)\n- [`ForwardEmailAction`](#forwardemailaction)\n- [`ForwardEmailConfig`](#forwardemailconfig)\n- [`ReplyEmailActionConfig`](#replyemailactionconfig)\n- [`ReplyEmailAction`](#replyemailaction)\n- [`ReplyEmailConfig`](#replyemailconfig)\n- [`SendEmailConfig`](#sendemailconfig)\n- [`SendEmailCondition`](#sendemailcondition)\n- [`CreateDocumentActionConfig`](#createdocumentactionconfig)\n- [`CreateDocumentAction`](#createdocumentaction)\n- [`CreateDocumentConfig`](#createdocumentconfig)\n- [`TriggerWorkflowActionConfig`](#triggerworkflowactionconfig)\n- [`TriggerWorkflowAction`](#triggerworkflowaction)\n- [`TriggerWorkflowConfig`](#triggerworkflowconfig)\n- [`TriggerWorkflowCondition`](#triggerworkflowcondition)\n- [`TriggerShareEntityActionConfig`](#triggershareentityactionconfig)\n- [`TriggerShareEntityAction`](#triggershareentityaction)\n- [`TriggerShareEntityConfig`](#triggershareentityconfig)\n- [`AssignUsersToStep`](#assignuserstostep)\n- [`CustomAction`](#customaction)\n- [`TriggerWebhookActionConfig`](#triggerwebhookactionconfig)\n- [`TriggerWebhookAction`](#triggerwebhookaction)\n- [`TriggerWebhookConfig`](#triggerwebhookconfig)\n- [`InformERPActionConfig`](#informerpactionconfig)\n- [`InformERPAction`](#informerpaction)\n- [`InformERPConfig`](#informerpconfig)\n- [`TriggerEventActionConfig`](#triggereventactionconfig)\n- [`TriggerEventAction`](#triggereventaction)\n- [`TriggerEventConfig`](#triggereventconfig)\n- [`FlowExecutionCancelActionConfig`](#flowexecutioncancelactionconfig)\n- [`FlowExecutionCancelAction`](#flowexecutioncancelaction)\n- [`FlowExecutionCancelConfig`](#flowexecutioncancelconfig)\n- [`CancellationReason`](#cancellationreason)\n- [`ConditionStatement`](#conditionstatement)\n- [`ActionCondition`](#actioncondition)\n- [`ActionScheduleSource`](#actionschedulesource)\n- [`ActionSchedule`](#actionschedule)\n- [`AutomationExecutionId`](#automationexecutionid)\n- [`AutomationExecution`](#automationexecution)\n- [`WorkflowExecutionContext`](#workflowexecutioncontext)\n- [`ExecutionChain`](#executionchain)\n- [`TriggerEventManual`](#triggereventmanual)\n- [`TriggerEventFlowAutomationTask`](#triggereventflowautomationtask)\n- [`TriggerEventEntityActivity`](#triggerevententityactivity)\n- [`TriggerEventMessaging`](#triggereventmessaging)\n- [`TriggerEventEntityOperation`](#triggerevententityoperation)\n- [`ApiCallerContext`](#apicallercontext)\n- [`ExecutionStatus`](#executionstatus)\n- [`GetExecutionsResp`](#getexecutionsresp)\n- [`StartExecutionRequest`](#startexecutionrequest)\n- [`PatchBulkJobRequest`](#patchbulkjobrequest)\n- [`BulkTriggerRequest`](#bulktriggerrequest)\n- [`EntityRef`](#entityref)\n- [`BulkTriggerJob`](#bulktriggerjob)\n- [`ExecItem`](#execitem)\n- [`JobId`](#jobid)\n- [`EntityId`](#entityid)\n- [`ActivityId`](#activityid)\n- [`OrganizationId`](#organizationid)\n- [`TriggerContext`](#triggercontext)\n- [`AutomationTrigger`](#automationtrigger)\n- [`FlowsTrigger`](#flowstrigger)\n- [`JourneySubmitTrigger`](#journeysubmittrigger)\n- [`FrontendSubmitTrigger`](#frontendsubmittrigger)\n- [`ApiSubmissionTrigger`](#apisubmissiontrigger)\n- [`NewEmailThreadTrigger`](#newemailthreadtrigger)\n- [`ReceivedEmailTrigger`](#receivedemailtrigger)\n- [`EntityOperationTrigger`](#entityoperationtrigger)\n- [`ActivityTrigger`](#activitytrigger)\n- [`EntityOperation`](#entityoperation)\n- [`EntitySearchFilter`](#entitysearchfilter)\n- [`EntitySearchFilterValue`](#entitysearchfiltervalue)\n- [`EntityManualTrigger`](#entitymanualtrigger)\n- [`TriggerCondition`](#triggercondition)\n- [`Comparison`](#comparison)\n- [`FilterConditionOnEvent`](#filterconditiononevent)\n- [`EqualsIgnoreCaseCondition`](#equalsignorecasecondition)\n- [`AnythingButCondition`](#anythingbutcondition)\n- [`NumericCondition`](#numericcondition)\n- [`ExistsCondition`](#existscondition)\n- [`PrefixCondition`](#prefixcondition)\n- [`SuffixCondition`](#suffixcondition)\n- [`WildcardCondition`](#wildcardcondition)\n- [`OrCondition`](#orcondition)\n- [`DiffAdded`](#diffadded)\n- [`DiffUpdated`](#diffupdated)\n- [`DiffDeleted`](#diffdeleted)\n- [`OrConditionForDiff`](#orconditionfordiff)\n- [`EntityItemSnapshot`](#entityitemsnapshot)\n- [`RetryReq`](#retryreq)\n- [`ResumeToken`](#resumetoken)\n- [`ResumeReq`](#resumereq)\n- [`ResumeResp`](#resumeresp)\n- [`ErrorObject`](#errorobject)\n\n### `searchFlows`\n\nSearch available automation flows\n\n`GET /v1/automation/flows`\n\n```ts\nconst { data } = await client.searchFlows({\n schema: \'example\',\n size: 1,\n from: 1,\n trigger_source_id: \'example\',\n include_flows: true,\n})\n```\n\n---\n\n### `createFlow`\n\nCreate new automation flow\n\n`POST /v1/automation/flows`\n\n```ts\nconst { data } = await client.createFlow()\n```\n\n---\n\n### `batchGetFlows`\n\nGet multiple automation flows by their IDs\n\n`POST /v1/automation/flows:batchGet`\n\n```ts\nconst { data } = await client.batchGetFlows(\n null,\n {\n ids: [\'7791b04a-16d2-44a2-9af9-2d59c25c512f\']\n },\n)\n```\n\n---\n\n### `getFlow`\n\nList available automation flows\n\n`GET /v1/automation/flows/{flow_id}`\n\n```ts\nconst { data } = await client.getFlow({\n flow_id: \'example\',\n})\n```\n\n---\n\n### `putFlow`\n\nUpdate automation flow by id\n\n`PUT /v1/automation/flows/{flow_id}`\n\n```ts\nconst { data } = await client.putFlow({\n flow_id: \'example\',\n})\n```\n\n---\n\n### `deleteFlow`\n\nUpdate automation flow by id\n\n`DELETE /v1/automation/flows/{flow_id}`\n\n```ts\nconst { data } = await client.deleteFlow({\n flow_id: \'example\',\n})\n```\n\n---\n\n### `getExecutions`\n\nList automation executions\n\n`GET /v1/automation/executions`\n\n```ts\nconst { data } = await client.getExecutions({\n entity_id: \'example\',\n size: 1,\n from: 1,\n include_flows: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "total": 0,\n "results": [\n {\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {},\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [],\n "schedules": [],\n "actions": [],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {},\n "version": 2,\n "trigger_event": {},\n "workflow_context": {}\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `startExecution`\n\nStart new automation execution\n\n`POST /v1/automation/executions`\n\n```ts\nconst { data } = await client.startExecution(\n null,\n {\n entity_id: \'e3d3ebac-baab-4395-abf4-50b5bf1f8b74\',\n flow_id: \'7791b04a-16d2-44a2-9af9-2d59c25c512f\',\n workflow_context: {\n workflow_exec_id: \'string\',\n workflow_exec_task_id: \'string\',\n workflow_role: \'trigger_workflow\',\n _execution_chain: {\n parent_execution_id: \'string\',\n parent_task_id: \'string\',\n depth: 0\n }\n },\n flow_execution_id: \'string\',\n flow_automation_task_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {\n "id": "string",\n "schedule_id": "string",\n "evaluationResult": true,\n "statements": []\n }\n ],\n "schedules": [\n {\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {}\n }\n ],\n "actions": [\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n },\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "trigger-workflow",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n }\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {\n "EpilotAuth": {}\n }\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `bulkTriggerExecutions`\n\nCreate a bulk job that triggers multiple automation executions\n\n`POST /v1/automation/executions/bulk-jobs`\n\n```ts\nconst { data } = await client.bulkTriggerExecutions(\n null,\n {\n flow_id: \'7791b04a-16d2-44a2-9af9-2d59c25c512f\',\n entities_refs: [\n {\n entity_id: \'e3d3ebac-baab-4395-abf4-50b5bf1f8b74\',\n entity_schema: \'string\'\n }\n ],\n trigger_context: {\n entity_id: \'a1b2c3d4-e5f6-7890-1234-567890abcdef\'\n }\n },\n)\n```\n\n---\n\n### `getBulkJob`\n\nGet the status of a bulk job that triggers multiple automation executions\n\n`GET /v1/automation/executions/bulk-jobs/{job_id}`\n\n```ts\nconst { data } = await client.getBulkJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "status": "approval",\n "created_by": "1234",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "report_file_entity_id": "string",\n "entity_query": {\n "type": "refs",\n "data": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string"\n }\n ]\n },\n "pagination_state": {\n "page_size": 0,\n "pages_processed": 0,\n "total_processed": 0,\n "stable_query_id": "string",\n "search_after": ["string"],\n "has_more": true\n },\n "execution_summary": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string",\n "execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "timestamp": "2025-10-30T15:56:47.842Z",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `patchBulkJob`\n\nApprove / Cancel bulk job that triggers multiple automation executions\n\n`PATCH /v1/automation/executions/bulk-jobs/{job_id}`\n\n```ts\nconst { data } = await client.patchBulkJob(\n {\n job_id: \'example\',\n },\n {\n action: \'APPROVE\',\n task_token: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "status": "approval",\n "created_by": "1234",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",\n "report_file_entity_id": "string",\n "entity_query": {\n "type": "refs",\n "data": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string"\n }\n ]\n },\n "pagination_state": {\n "page_size": 0,\n "pages_processed": 0,\n "total_processed": 0,\n "stable_query_id": "string",\n "search_after": ["string"],\n "has_more": true\n },\n "execution_summary": [\n {\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_schema": "string",\n "execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "timestamp": "2025-10-30T15:56:47.842Z",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getExecution`\n\nGet automation execution\n\n`GET /v1/automation/executions/{execution_id}`\n\n```ts\nconst { data } = await client.getExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {\n "id": "string",\n "schedule_id": "string",\n "evaluationResult": true,\n "statements": []\n }\n ],\n "schedules": [\n {\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {}\n }\n ],\n "actions": [\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n },\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "trigger-workflow",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n }\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {\n "EpilotAuth": {}\n }\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelExecution`\n\nCancel automation execution\n\n`DELETE /v1/automation/executions/{execution_id}`\n\n```ts\nconst { data } = await client.cancelExecution({\n execution_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {\n "id": "string",\n "schedule_id": "string",\n "evaluationResult": true,\n "statements": []\n }\n ],\n "schedules": [\n {\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {}\n }\n ],\n "actions": [\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n },\n {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "trigger-workflow",\n "config": {},\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {},\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {},\n "retry_strategy": "RETRY_AND_RESUME"\n }\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {\n "EpilotAuth": {}\n }\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {\n "parent_execution_id": "string",\n "parent_task_id": "string",\n "depth": 0\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `retriggerAction`\n\nRetry a specific automation execution action which failed / is stuck.\n\n`POST /v1/automation/executions/{execution_id}/{action_id}/retrigger`\n\n```ts\nconst { data } = await client.retriggerAction(\n {\n execution_id: \'example\',\n action_id: \'example\',\n },\n {\n condition_id: \'string\',\n retry_strategy: \'RETRY_AND_RESUME\'\n },\n)\n```\n\n---\n\n### `resumeExecutionWithToken`\n\nResume a paused automation execution using a unique resume token.\n\n`POST /v1/automation/public/executions:resume`\n\n```ts\nconst { data } = await client.resumeExecutionWithToken(\n null,\n {\n resume_token: \'eyJraWQiOiJrZXkifQ==\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "execution": {\n "id": "9baf184f-bc81-4128-bca3-d974c90a12c4",\n "execution_status": "pending",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "entity_snapshot": {\n "_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "_title": "string",\n "_org": "string",\n "_schema": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z"\n },\n "org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",\n "flow_name": "Handle contact form",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "conditions": [\n {}\n ],\n "schedules": [\n {}\n ],\n "actions": [\n {},\n {}\n ],\n "resume_token": "eyJraWQiOiJrZXkifQ==",\n "trigger_context": {\n "entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"\n },\n "version": 2,\n "trigger_event": {\n "type": "manual",\n "org_id": "123",\n "entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",\n "caller": {}\n },\n "workflow_context": {\n "workflow_exec_id": "string",\n "workflow_exec_task_id": "string",\n "workflow_role": "trigger_workflow",\n "_execution_chain": {}\n }\n },\n "resumedAction": {\n "id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",\n "name": "string",\n "type": "map-entity",\n "config": {\n "mapping_config": {},\n "target_schema": "string",\n "target_unique": ["string"],\n "mapping_attributes": [],\n "relation_attributes": [],\n "linkback_relation_attribute": "mapped_entities",\n "linkback_relation_tags": ["string"]\n },\n "allow_failure": true,\n "created_automatically": true,\n "is_bulk_action": true,\n "reason": {\n "message": "There are no registered portal users for the given emails, hence skipping the action",\n "payload": {}\n },\n "condition_id": "string",\n "schedule_id": "string",\n "execution_status": "pending",\n "started_at": "string",\n "updated_at": "string",\n "outputs": {},\n "error_output": {\n "error_code": "MAPPING_ERROR",\n "error_reason": "string",\n "error_info": {}\n },\n "retry_strategy": "RETRY_AND_RESUME"\n }\n}\n```\n\n</details>\n\n---\n\n### `cancelSchedule`\n\nCancel a scheduled automation\n\n`DELETE /v1/automation/executions/{execution_id}/schedules/{schedule_id}`\n\n```ts\nconst { data } = await client.cancelSchedule({\n execution_id: \'example\',\n schedule_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "scheduleApiId": "string",\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "timeRelation": "after",\n "source": {\n "id": "string",\n "origin": "trigger",\n "schema": "string",\n "attribute": "string"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `AutomationFlowId`\n\nID of the Automation Flow\n\n```ts\ntype AutomationFlowId = string\n```\n\n### `AutomationActionId`\n\n```ts\ntype AutomationActionId = string\n```\n\n### `AutomationFlow`\n\n```ts\ntype AutomationFlow = {\n id?: string\n flow_name: string\n enabled?: boolean\n disable_details?: {\n disabled_at: string // date-time\n disabled_by: "system" | "user"\n blame?: string\n }\n triggers: Array<{\n id?: string // uuid\n type: "frontend_submission"\n configuration: {\n source_id?: { ... }\n }\n } | {\n id?: string // uuid\n type: "journey_submission"\n configuration: {\n source_id: { ... }\n }\n } | {\n id?: string // uuid\n type: "api_submission"\n configuration: {\n source_id?: { ... }\n }\n } | {\n id?: string // uuid\n type: "entity_operation"\n configuration: {\n schema?: { ... }\n operations?: { ... }\n include_activities?: { ... }\n exclude_activities?: { ... }\n filter_config?: { ... }\n ecp_config?: { ... }\n }\n } | {\n id?: string // uuid\n type: "activity"\n configuration: {\n schema?: { ... }\n types?: { ... }\n }\n } | {\n id?: string // uuid\n type: "entity_manual"\n configuration: {\n schema?: { ... }\n }\n } | {\n id?: string // uuid\n type: "received_email"\n configuration: {\n message_type?: { ... }\n }\n } | {\n id?: string // uuid\n type: "new_email_thread"\n configuration: {\n shared_inbox_ids?: { ... }\n direction: { ... }\n }\n } | {\n id?: string // uuid\n type: "flows_trigger"\n configuration?: {\n journey_id?: { ... }\n }\n }>\n trigger_conditions?: Array<{\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n }>\n entity_schema?: string\n conditions?: Array<{\n id?: string\n schedule_id?: string\n evaluationResult?: boolean\n statements?: Array<{\n id?: { ... }\n source?: { ... }\n operation?: { ... }\n values?: { ... }\n }>\n }>\n schedules?: Array<{\n id: string\n scheduleApiId?: string\n numberOfUnits?: number\n timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"\n timeRelation?: "after" | "before"\n source: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n // ...\n}\n```\n\n### `WorkflowContextRole`\n\nThe role this automation plays in the workflow.\n\n```ts\ntype WorkflowContextRole = "trigger_workflow" | "run_task_automation"\n```\n\n### `SearchAutomationsResp`\n\n```ts\ntype SearchAutomationsResp = {\n total: number\n results: Array<{\n id?: string\n flow_name: string\n enabled?: boolean\n disable_details?: {\n disabled_at: { ... }\n disabled_by: { ... }\n blame?: { ... }\n }\n triggers: Array<{\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration: { ... }\n } | {\n id?: { ... }\n type: { ... }\n configuration?: { ... }\n }>\n trigger_conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n }>\n entity_schema?: string\n conditions?: Array<{\n id?: { ... }\n schedule_id?: { ... }\n evaluationResult?: { ... }\n statements?: { ... }\n }>\n schedules?: Array<{\n id: { ... }\n scheduleApiId?: { ... }\n numberOfUnits?: { ... }\n timePeriod?: { ... }\n timeRelation?: { ... }\n source: { ... }\n }>\n actions: Array<{\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n id?: { ... }\n // ...\n}\n```\n\n### `AnyTrigger`\n\n```ts\ntype AnyTrigger = {\n id?: string // uuid\n type: "frontend_submission"\n configuration: {\n source_id?: string\n }\n} | {\n id?: string // uuid\n type: "journey_submission"\n configuration: {\n source_id: string // uuid\n }\n} | {\n id?: string // uuid\n type: "api_submission"\n configuration: {\n source_id?: string\n }\n} | {\n id?: string // uuid\n type: "entity_operation"\n configuration: {\n schema?: string\n operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"[]\n include_activities?: string[]\n exclude_activities?: string[]\n filter_config?: {\n operation?: { ... }\n activity?: { ... }\n }\n ecp_config?: {\n origin?: { ... }\n portal_id?: { ... }\n file_config?: { ... }\n }\n }\n} | {\n id?: string // uuid\n type: "activity"\n configuration: {\n schema?: string\n types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]\n }\n} | {\n id?: string // uuid\n type: "entity_manual"\n configuration: {\n schema?: string\n }\n} | {\n id?: string // uuid\n type: "received_email"\n configuration: {\n message_type?: "RECEIVED"\n }\n} | {\n id?: string // uuid\n type: "new_email_thread"\n configuration: {\n shared_inbox_ids?: string[]\n direction: "INBOUND" | "OUTBOUND" | "BOTH"\n }\n} | {\n id?: string // uuid\n type: "flows_trigger"\n configuration?: {\n journey_id?: string // uuid\n }\n}\n```\n\n### `AnyAction`\n\n```ts\ntype AnyAction = {\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n} | {\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n} | {\n type?: "trigger-share-entity"\n config?: {\n partner_org_ids?: string[]\n }\n} | {\n type?: "trigger-webhook"\n config?: {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n} | {\n type?: "inform-erp"\n config?: {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n} | {\n type?: "trigger-event"\n config?: {\n event_name: string\n event_inputs?: Record<string, unknown>\n }\n} | {\n type?: "create-document"\n config?: {\n template_id?: string\n filename?: string\n }\n} | {\n type?: "send-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n // ...\n}\n```\n\n### `AnyActionConfig`\n\n```ts\ntype AnyActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n} | {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n} | {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n partner_org_ids?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n} | {\n id?: string\n // ...\n}\n```\n\n### `AutomationActionConfig`\n\n```ts\ntype AutomationActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: string\n config?: Record<string, unknown>\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `AutomationActionExecutionState`\n\n```ts\ntype AutomationActionExecutionState = {\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n started_at?: string\n updated_at?: string\n outputs?: Record<string, unknown>\n error_output?: {\n error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n error_reason: string\n error_info?: {\n details?: { ... }\n }\n }\n retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n}\n```\n\n### `RetryStrategy`\n\ndifferent behaviors for retrying failed execution actions.\n\n```ts\ntype RetryStrategy = "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n```\n\n### `AutomationAction`\n\n```ts\ntype AutomationAction = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: string\n config?: Record<string, unknown>\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n started_at?: string\n updated_at?: string\n outputs?: Record<string, unknown>\n error_output?: {\n error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n error_reason: string\n error_info?: {\n details?: { ... }\n }\n }\n retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n}\n```\n\n### `ErrorOutput`\n\n```ts\ntype ErrorOutput = {\n error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n error_reason: string\n error_info?: {\n details?: Array<{\n explanation: { ... }\n context?: { ... }\n id?: { ... }\n }>\n }\n}\n```\n\n### `ErrorCode`\n\n```ts\ntype ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"\n```\n\n### `ErrorDetail`\n\n```ts\ntype ErrorDetail = {\n explanation: string\n context?: string\n id?: string\n}\n```\n\n### `CartCheckoutActionConfig`\n\n```ts\ntype CartCheckoutActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "cart-checkout"\n config?: {\n version?: string\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n target_unique?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `CartCheckoutAction`\n\n```ts\ntype CartCheckoutAction = {\n type?: "cart-checkout"\n config?: {\n version?: string\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n target_unique?: string[]\n }\n}\n```\n\n### `CartCheckoutConfig`\n\n```ts\ntype CartCheckoutConfig = {\n version?: string\n mapping_config?: {\n config_id: string\n target_id: string\n version?: number\n }\n relation_attributes?: Array<{\n target: string\n target_tags?: string[]\n target_tags_include_source?: boolean\n source_filter?: {\n limit?: { ... }\n schema?: { ... }\n attribute?: { ... }\n relation_tag?: { ... }\n tag?: { ... }\n self?: { ... }\n }\n related_to?: Record<string, unknown>\n mode: "append" | "prepend" | "set"\n }>\n mapping_attributes?: Array<{\n target?: string\n operation: {\n _set?: { ... }\n _append?: { ... }\n _uniq?: { ... }\n _copy?: { ... }\n } | unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n target_unique?: string[]\n}\n```\n\n### `MapEntityActionConfig`\n\n```ts\ntype MapEntityActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `MapEntityAction`\n\n```ts\ntype MapEntityAction = {\n type?: "map-entity"\n config?: {\n mapping_config?: {\n config_id: { ... }\n target_id: { ... }\n version?: { ... }\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: { ... }\n operation: { ... }\n } | {\n mode: { ... }\n target: { ... }\n value: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source: { ... }\n } | {\n mode: { ... }\n target: { ... }\n source?: { ... }\n value_json: { ... }\n target_unique?: { ... }\n }>\n relation_attributes?: Array<{\n target: { ... }\n target_tags?: { ... }\n target_tags_include_source?: { ... }\n source_filter?: { ... }\n related_to?: { ... }\n mode: { ... }\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n }\n}\n```\n\n### `MapEntityConfig`\n\n```ts\ntype MapEntityConfig = {\n mapping_config?: {\n config_id: string\n target_id: string\n version?: number\n }\n target_schema: string\n target_unique?: string[]\n mapping_attributes?: Array<{\n target?: string\n operation: {\n _set?: { ... }\n _append?: { ... }\n _uniq?: { ... }\n _copy?: { ... }\n } | unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n } | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n }>\n relation_attributes?: Array<{\n target: string\n target_tags?: string[]\n target_tags_include_source?: boolean\n source_filter?: {\n limit?: { ... }\n schema?: { ... }\n attribute?: { ... }\n relation_tag?: { ... }\n tag?: { ... }\n self?: { ... }\n }\n related_to?: Record<string, unknown>\n mode: "append" | "prepend" | "set"\n }>\n linkback_relation_attribute?: string\n linkback_relation_tags?: string[]\n}\n```\n\n### `MappingConfigRef`\n\n```ts\ntype MappingConfigRef = {\n config_id: string\n target_id: string\n version?: number\n}\n```\n\n### `RelationAttribute`\n\n```ts\ntype RelationAttribute = {\n target: string\n target_tags?: string[]\n target_tags_include_source?: boolean\n source_filter?: {\n limit?: number\n schema?: string\n attribute?: string\n relation_tag?: string\n tag?: string\n self?: boolean\n }\n related_to?: Record<string, unknown>\n mode: "append" | "prepend" | "set"\n}\n```\n\n### `MappingAttributeV2`\n\n```ts\ntype MappingAttributeV2 = {\n target?: string\n operation: {\n _set?: unknown\n _append?: unknown\n _uniq?: boolean | string[]\n _copy?: string\n } | unknown\n}\n```\n\n### `OperationNode`\n\nMapping operation nodes are either primitive values or operation node objects\n\n```ts\ntype OperationNode = {\n _set?: unknown\n _append?: unknown\n _uniq?: boolean | string[]\n _copy?: string\n} | unknown\n```\n\n### `OperationObjectNode`\n\n```ts\ntype OperationObjectNode = {\n _set?: unknown\n _append?: unknown\n _uniq?: boolean | string[]\n _copy?: string\n}\n```\n\n### `PrimitiveJSONValue`\n\n```ts\ntype PrimitiveJSONValue = unknown\n```\n\n### `MappingAttribute`\n\n```ts\ntype MappingAttribute = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n} | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n} | {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n}\n```\n\n### `MappingAttributeMode`\n\n- copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used togethe\n\n```ts\ntype MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value"\n```\n\n### `SetValueMapper`\n\n```ts\ntype SetValueMapper = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n value: unknown\n}\n```\n\n### `CopyValueMapper`\n\n```ts\ntype CopyValueMapper = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source: string\n}\n```\n\n### `AppendValueMapper`\n\n```ts\ntype AppendValueMapper = {\n mode: "copy_if_exists" | "append_if_exists" | "set_value"\n target: string\n source?: string\n value_json: string\n target_unique?: string[]\n}\n```\n\n### `MoveThreadAction`\n\n```ts\ntype MoveThreadAction = {\n type?: "move-thread"\n config?: {\n target_inbox_id?: string\n }\n}\n```\n\n### `AssignThreadAction`\n\n```ts\ntype AssignThreadAction = {\n type?: "assign-thread"\n config?: {\n remove?: string[]\n add?: string[]\n }\n}\n```\n\n### `MoveThreadConfig`\n\n```ts\ntype MoveThreadConfig = {\n target_inbox_id?: string\n}\n```\n\n### `AssignThreadConfig`\n\n```ts\ntype AssignThreadConfig = {\n remove?: string[]\n add?: string[]\n}\n```\n\n### `SendEmailActionConfig`\n\n```ts\ntype SendEmailActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "send-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n attachments?: Array<{\n source_filter?: { ... }\n }>\n conditions?: Array<{\n _equals?: { ... }\n }>\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `SendEmailAction`\n\n```ts\ntype SendEmailAction = {\n type?: "send-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n attachments?: Array<{\n source_filter?: { ... }\n }>\n conditions?: Array<{\n _equals?: { ... }\n }>\n }\n}\n```\n\n### `ForwardEmailActionConfig`\n\n```ts\ntype ForwardEmailActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "forward-email"\n config?: {\n forward_to: Array<{\n email: { ... }\n name?: { ... }\n }>\n include_attachments?: boolean\n subject_prefix?: string\n mark_as_done?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `ForwardEmailAction`\n\n```ts\ntype ForwardEmailAction = {\n type?: "forward-email"\n config?: {\n forward_to: Array<{\n email: { ... }\n name?: { ... }\n }>\n include_attachments?: boolean\n subject_prefix?: string\n mark_as_done?: boolean\n }\n}\n```\n\n### `ForwardEmailConfig`\n\n```ts\ntype ForwardEmailConfig = {\n forward_to: Array<{\n email: string // email\n name?: string\n }>\n include_attachments?: boolean\n subject_prefix?: string\n mark_as_done?: boolean\n}\n```\n\n### `ReplyEmailActionConfig`\n\n```ts\ntype ReplyEmailActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "reply-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `ReplyEmailAction`\n\n```ts\ntype ReplyEmailAction = {\n type?: "reply-email"\n config?: {\n email_template_id?: string\n language_code?: "de" | "en"\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n }\n}\n```\n\n### `ReplyEmailConfig`\n\n```ts\ntype ReplyEmailConfig = {\n email_template_id?: string\n language_code?: "de" | "en"\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n}\n```\n\n### `SendEmailConfig`\n\n```ts\ntype SendEmailConfig = {\n email_template_id?: string\n language_code?: "de" | "en"\n notify_portal_user_only?: boolean\n skip_creating_entities?: boolean\n wait_for_confirmation?: boolean\n reply_to_sender?: boolean\n reply_mode?: "reply_in_thread" | "new_email"\n mark_as_done?: boolean\n attachments?: Array<{\n source_filter?: {\n limit?: { ... }\n filename_regex?: { ... }\n attribute?: { ... }\n relation_tag?: { ... }\n tag?: { ... }\n document_type?: { ... }\n self?: { ... }\n }\n }>\n conditions?: Array<{\n _equals?: {\n source?: { ... }\n value?: { ... }\n }\n }>\n}\n```\n\n### `SendEmailCondition`\n\n```ts\ntype SendEmailCondition = {\n _equals?: {\n source?: string\n value?: string\n }\n}\n```\n\n### `CreateDocumentActionConfig`\n\n```ts\ntype CreateDocumentActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "create-document"\n config?: {\n template_id?: string\n filename?: string\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `CreateDocumentAction`\n\n```ts\ntype CreateDocumentAction = {\n type?: "create-document"\n config?: {\n template_id?: string\n filename?: string\n }\n}\n```\n\n### `CreateDocumentConfig`\n\n```ts\ntype CreateDocumentConfig = {\n template_id?: string\n filename?: string\n}\n```\n\n### `TriggerWorkflowActionConfig`\n\n```ts\ntype TriggerWorkflowActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerWorkflowAction`\n\n```ts\ntype TriggerWorkflowAction = {\n type?: "trigger-workflow"\n config?: {\n target_workflow?: string\n conditions?: Array<{\n source: { ... }\n comparison: { ... }\n value?: { ... }\n schema?: { ... }\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: { ... }\n step_name?: { ... }\n user_ids?: { ... }\n }>\n filter_with_purposes?: boolean\n }\n}\n```\n\n### `TriggerWorkflowConfig`\n\n```ts\ntype TriggerWorkflowConfig = {\n target_workflow?: string\n conditions?: Array<{\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n schema?: string\n }>\n assignees?: string[]\n assign_steps?: Array<{\n step_id?: string\n step_name?: string\n user_ids?: number[]\n }>\n filter_with_purposes?: boolean\n}\n```\n\n### `TriggerWorkflowCondition`\n\n```ts\ntype TriggerWorkflowCondition = {\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n schema?: string\n}\n```\n\n### `TriggerShareEntityActionConfig`\n\n```ts\ntype TriggerShareEntityActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-workflow"\n config?: {\n partner_org_ids?: string[]\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerShareEntityAction`\n\n```ts\ntype TriggerShareEntityAction = {\n type?: "trigger-share-entity"\n config?: {\n partner_org_ids?: string[]\n }\n}\n```\n\n### `TriggerShareEntityConfig`\n\n```ts\ntype TriggerShareEntityConfig = {\n partner_org_ids?: string[]\n}\n```\n\n### `AssignUsersToStep`\n\n```ts\ntype AssignUsersToStep = {\n step_id?: string\n step_name?: string\n user_ids?: number[]\n}\n```\n\n### `CustomAction`\n\n```ts\ntype CustomAction = {\n type?: "custom-action"\n config?: {\n name?: string\n description?: string\n app_id?: string\n component_id?: string\n wait_for_callback?: boolean\n }\n}\n```\n\n### `TriggerWebhookActionConfig`\n\n```ts\ntype TriggerWebhookActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-webhook"\n config?: {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerWebhookAction`\n\n```ts\ntype TriggerWebhookAction = {\n type?: "trigger-webhook"\n config?: {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n}\n```\n\n### `TriggerWebhookConfig`\n\n```ts\ntype TriggerWebhookConfig = {\n event_id?: string\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n}\n```\n\n### `InformERPActionConfig`\n\n```ts\ntype InformERPActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "inform-erp"\n config?: {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `InformERPAction`\n\n```ts\ntype InformERPAction = {\n type?: "inform-erp"\n config?: {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n }\n}\n```\n\n### `InformERPConfig`\n\n```ts\ntype InformERPConfig = {\n entity_sources?: string[]\n target_webhook_id?: string\n sync?: boolean\n}\n```\n\n### `TriggerEventActionConfig`\n\n```ts\ntype TriggerEventActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "trigger-event"\n config?: {\n event_name: string\n event_inputs?: Record<string, unknown>\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `TriggerEventAction`\n\n```ts\ntype TriggerEventAction = {\n type?: "trigger-event"\n config?: {\n event_name: string\n event_inputs?: Record<string, unknown>\n }\n}\n```\n\n### `TriggerEventConfig`\n\nConfiguration for triggering an event catalog event\n\n```ts\ntype TriggerEventConfig = {\n event_name: string\n event_inputs?: Record<string, unknown>\n}\n```\n\n### `FlowExecutionCancelActionConfig`\n\n```ts\ntype FlowExecutionCancelActionConfig = {\n id?: string\n flow_action_id?: string\n name?: string\n type?: "cancel-flow-execution"\n config?: {\n selected_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n extra_description?: string\n }\n allow_failure?: boolean\n created_automatically?: boolean\n is_bulk_action?: boolean\n reason?: {\n message?: string\n payload?: Record<string, unknown>\n }\n condition_id?: string\n schedule_id?: string\n}\n```\n\n### `FlowExecutionCancelAction`\n\n```ts\ntype FlowExecutionCancelAction = {\n type?: "cancel-flow-execution"\n config?: {\n selected_reasons?: Array<{\n id: { ... }\n title: { ... }\n }>\n extra_description?: string\n }\n}\n```\n\n### `FlowExecutionCancelConfig`\n\nConfiguration for cancelling a flow execution with selected reasons\n\n```ts\ntype FlowExecutionCancelConfig = {\n selected_reasons?: Array<{\n id: string\n title: string\n }>\n extra_description?: string\n}\n```\n\n### `CancellationReason`\n\nA reason for cancelling a flow execution\n\n```ts\ntype CancellationReason = {\n id: string\n title: string\n}\n```\n\n### `ConditionStatement`\n\n```ts\ntype ConditionStatement = {\n id?: string // uuid\n source?: {\n id?: string\n origin?: "trigger" | "action"\n originType?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "payment" | "relation_payment_method"\n attributeRepeatable?: boolean\n repeatableItemOp?: boolean\n attributeOperation?: "all" | "updated" | "added" | "deleted"\n }\n operation?: "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" | "entity_exists" | "entity_does_not_exist"\n values?: string[]\n}\n```\n\n### `ActionCondition`\n\n```ts\ntype ActionCondition = {\n id?: string\n schedule_id?: string\n evaluationResult?: boolean\n statements?: Array<{\n id?: string // uuid\n source?: {\n id?: { ... }\n origin?: { ... }\n originType?: { ... }\n schema?: { ... }\n attribute?: { ... }\n attributeType?: { ... }\n attributeRepeatable?: { ... }\n repeatableItemOp?: { ... }\n attributeOperation?: { ... }\n }\n operation?: "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" | "entity_exists" | "entity_does_not_exist"\n values?: string[]\n }>\n}\n```\n\n### `ActionScheduleSource`\n\nThe source of the schedule_at timestamp that will be used to schedule the action\n\n```ts\ntype ActionScheduleSource = {\n id: string\n origin: "trigger" | "action" | "action_task" | "automation"\n schema?: string\n attribute?: string\n}\n```\n\n### `ActionSchedule`\n\n```ts\ntype ActionSchedule = {\n id: string\n scheduleApiId?: string\n numberOfUnits?: number\n timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"\n timeRelation?: "after" | "before"\n source: {\n id: string\n origin: "trigger" | "action" | "action_task" | "automation"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `AutomationExecutionId`\n\n```ts\ntype AutomationExecutionId = string\n```\n\n### `AutomationExecution`\n\n```ts\ntype AutomationExecution = {\n id: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n entity_id: string\n activity_id?: string\n entity_snapshot?: {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n }\n org_id: string\n flow_id: string\n flow_name?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n current_action_id?: string\n conditions?: Array<{\n id?: string\n schedule_id?: string\n evaluationResult?: boolean\n statements?: Array<{\n id?: { ... }\n source?: { ... }\n operation?: { ... }\n values?: { ... }\n }>\n }>\n schedules?: Array<{\n id: string\n scheduleApiId?: string\n numberOfUnits?: number\n timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"\n timeRelation?: "after" | "before"\n source: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n }>\n actions: Array<{\n type?: "map-entity"\n config?: {\n mapping_config?: { ... }\n target_schema: { ... }\n target_unique?: { ... }\n mapping_attributes?: { ... }\n relation_attributes?: { ... }\n linkback_relation_attribute?: { ... }\n linkback_relation_tags?: { ... }\n }\n } | {\n type?: "trigger-workflow"\n config?: {\n target_workflow?: { ... }\n conditions?: { ... }\n assignees?: { ... }\n assign_steps?: { ... }\n filter_with_purposes?: { ... }\n }\n } | {\n type?: "trigger-share-entity"\n config?: {\n partner_org_ids?: { ... }\n }\n } | {\n type?: "trigger-webhook"\n config?: {\n event_id?: { ... }\n entity_sources?: { ... }\n target_webhook_id?: { ... }\n sync?: { ... }\n }\n } | {\n type?: "inform-erp"\n config?: {\n entity_sources?: { ... }\n target_webhook_id?: { ... }\n sync?: { ... }\n }\n } | {\n type?: "trigger-event"\n config?: {\n event_name: { ... }\n event_inputs?: { ... }\n }\n } | {\n type?: "create-document"\n config?: {\n template_id?: { ... }\n filename?: { ... }\n }\n } | {\n type?: "send-email"\n config?: {\n email_template_id?: { ... }\n // ...\n}\n```\n\n### `WorkflowExecutionContext`\n\n```ts\ntype WorkflowExecutionContext = {\n workflow_exec_id: string\n workflow_exec_task_id?: string\n workflow_role: "trigger_workflow" | "run_task_automation"\n _execution_chain?: {\n parent_execution_id?: string\n parent_task_id?: string\n depth?: number\n }\n}\n```\n\n### `ExecutionChain`\n\n[Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers.\n\n```ts\ntype ExecutionChain = {\n parent_execution_id?: string\n parent_task_id?: string\n depth?: number\n}\n```\n\n### `TriggerEventManual`\n\n```ts\ntype TriggerEventManual = {\n type?: "manual"\n org_id: string\n entity_id: string\n caller?: {\n EpilotAuth?: {\n claims?: { ... }\n userId?: { ... }\n organizationId?: { ... }\n token?: { ... }\n }\n }\n}\n```\n\n### `TriggerEventFlowAutomationTask`\n\n```ts\ntype TriggerEventFlowAutomationTask = {\n type?: "flow_automation_task"\n org_id: string\n entity_id: string\n flow_execution_id: string\n flow_automation_task_id: string // UUID\n caller?: {\n EpilotAuth?: {\n claims?: { ... }\n userId?: { ... }\n organizationId?: { ... }\n token?: { ... }\n }\n }\n}\n```\n\n### `TriggerEventEntityActivity`\n\n```ts\ntype TriggerEventEntityActivity = {\n type?: "entity_activity"\n org_id: string\n activity_id: string\n activity_type: string\n entity_id?: string\n}\n```\n\n### `TriggerEventMessaging`\n\n```ts\ntype TriggerEventMessaging = {\n type?: "new_email_thread"\n org_id: string\n thread_id: string\n message_id: string\n entity_id: string\n}\n```\n\n### `TriggerEventEntityOperation`\n\n```ts\ntype TriggerEventEntityOperation = {\n type?: "entity_operation"\n entity_id: string\n org_id: string\n activity_id: string\n operation_type: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"\n}\n```\n\n### `ApiCallerContext`\n\n```ts\ntype ApiCallerContext = {\n EpilotAuth?: {\n claims?: {\n userId?: { ... }\n sub?: { ... }\n email?: { ... }\n cognito:username?: { ... }\n custom:ivy_user_id?: { ... }\n }\n userId?: string\n organizationId?: string\n token?: string\n }\n}\n```\n\n### `ExecutionStatus`\n\n```ts\ntype ExecutionStatus = "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n```\n\n### `GetExecutionsResp`\n\n```ts\ntype GetExecutionsResp = {\n total: number\n results: Array<{\n id: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n entity_id: string\n activity_id?: string\n entity_snapshot?: {\n _id: { ... }\n _title: { ... }\n _org: { ... }\n _schema: { ... }\n _tags?: { ... }\n _created_at: { ... }\n _updated_at: { ... }\n }\n org_id: string\n flow_id: string\n flow_name?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n current_action_id?: string\n conditions?: Array<{\n id?: { ... }\n schedule_id?: { ... }\n evaluationResult?: { ... }\n statements?: { ... }\n }>\n schedules?: Array<{\n id: { ... }\n scheduleApiId?: { ... }\n numberOfUnits?: { ... }\n timePeriod?: { ... }\n timeRelation?: { ... }\n source: { ... }\n }>\n actions: Array<{\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n id?: { ... }\n flow_action_id?: { ... }\n name?: { ... }\n type?: { ... }\n config?: { ... }\n allow_failure?: { ... }\n created_automatically?: { ... }\n is_bulk_action?: { ... }\n reason?: { ... }\n condition_id?: { ... }\n schedule_id?: { ... }\n execution_status?: { ... }\n started_at?: { ... }\n updated_at?: { ... }\n outputs?: { ... }\n error_output?: { ... }\n retry_strategy?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n }>\n resume_token?: string\n trigger_context?: Record<string, string>\n version?: number\n trigger_event?: {\n type?: { ... }\n org_id: { ... }\n // ...\n}\n```\n\n### `StartExecutionRequest`\n\n```ts\ntype StartExecutionRequest = {\n entity_id: string\n flow_id: string\n workflow_context?: {\n workflow_exec_id: string\n workflow_exec_task_id?: string\n workflow_role: "trigger_workflow" | "run_task_automation"\n _execution_chain?: {\n parent_execution_id?: { ... }\n parent_task_id?: { ... }\n depth?: { ... }\n }\n }\n flow_execution_id?: string\n flow_automation_task_id?: string\n}\n```\n\n### `PatchBulkJobRequest`\n\n```ts\ntype PatchBulkJobRequest = {\n action: "APPROVE" | "CANCEL"\n task_token: string\n}\n```\n\n### `BulkTriggerRequest`\n\n```ts\ntype BulkTriggerRequest = {\n flow_id: string\n entities_refs: Array<{\n entity_id: string\n entity_schema: string\n }>\n trigger_context?: Record<string, string>\n} | {\n flow_id: string\n entities_query: string\n trigger_context?: Record<string, string>\n} | {\n flow_id: string\n entities_filter: Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: { ... }\n }\n range?: Record<string, {\n gt?: { ... }\n gte?: { ... }\n lt?: { ... }\n lte?: { ... }\n format?: { ... }\n relation?: { ... }\n time_zone?: { ... }\n }>\n exists?: {\n field: { ... }\n }\n $and?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $or?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $not?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n }>\n trigger_context?: Record<string, string>\n}\n```\n\n### `EntityRef`\n\n```ts\ntype EntityRef = {\n entity_id: string\n entity_schema: string\n}\n```\n\n### `BulkTriggerJob`\n\n```ts\ntype BulkTriggerJob = {\n job_id: string\n org_id: string\n flow_id: string\n status: "approval" | "querying_entities" | "entities_loaded" | "executing" | "monitoring" | "send_report" | "finished" | "failed" | "cancelled"\n created_by: string\n created_at: string // date-time\n updated_at: string // date-time\n approved_at?: string // date-time\n trigger_context?: Record<string, string>\n task_token?: string\n report_file_entity_id?: string\n entity_query?: {\n type: "refs" | "query" | "filter"\n data: Array<{\n entity_id: { ... }\n entity_schema: { ... }\n }> | string | Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n }\n pagination_state?: {\n page_size?: number\n pages_processed?: number\n total_processed?: number\n stable_query_id?: string\n search_after?: string | number[]\n has_more?: boolean\n }\n execution_summary?: Array<{\n entity_id: string\n entity_schema?: string\n execution_id?: string\n execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n timestamp?: string // date-time\n error?: string\n }>\n}\n```\n\n### `ExecItem`\n\nExecution item for bulk trigger automation. It maps each entity to its automation execution id & status\n\n```ts\ntype ExecItem = {\n entity_id: string\n entity_schema?: string\n execution_id?: string\n execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n timestamp?: string // date-time\n error?: string\n}\n```\n\n### `JobId`\n\nJob ID for tracking the status of bulk trigger automation executions\n\n```ts\ntype JobId = string\n```\n\n### `EntityId`\n\n```ts\ntype EntityId = string\n```\n\n### `ActivityId`\n\n```ts\ntype ActivityId = string\n```\n\n### `OrganizationId`\n\n```ts\ntype OrganizationId = string\n```\n\n### `TriggerContext`\n\nAdditional contextual data for a bulk trigger automation. This would normally include additional entity IDs you\'d need after a listener picks up an event.\n\n```ts\ntype TriggerContext = Record<string, string>\n```\n\n### `AutomationTrigger`\n\n```ts\ntype AutomationTrigger = {\n id?: string // uuid\n}\n```\n\n### `FlowsTrigger`\n\n```ts\ntype FlowsTrigger = {\n id?: string // uuid\n type: "flows_trigger"\n configuration?: {\n journey_id?: string // uuid\n }\n}\n```\n\n### `JourneySubmitTrigger`\n\n```ts\ntype JourneySubmitTrigger = {\n id?: string // uuid\n type: "journey_submission"\n configuration: {\n source_id: string // uuid\n }\n}\n```\n\n### `FrontendSubmitTrigger`\n\n```ts\ntype FrontendSubmitTrigger = {\n id?: string // uuid\n type: "frontend_submission"\n configuration: {\n source_id?: string\n }\n}\n```\n\n### `ApiSubmissionTrigger`\n\n```ts\ntype ApiSubmissionTrigger = {\n id?: string // uuid\n type: "api_submission"\n configuration: {\n source_id?: string\n }\n}\n```\n\n### `NewEmailThreadTrigger`\n\n```ts\ntype NewEmailThreadTrigger = {\n id?: string // uuid\n type: "new_email_thread"\n configuration: {\n shared_inbox_ids?: string[]\n direction: "INBOUND" | "OUTBOUND" | "BOTH"\n }\n}\n```\n\n### `ReceivedEmailTrigger`\n\n```ts\ntype ReceivedEmailTrigger = {\n id?: string // uuid\n type: "received_email"\n configuration: {\n message_type?: "RECEIVED"\n }\n}\n```\n\n### `EntityOperationTrigger`\n\n- If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.\n- The conditions on a filter follows the event bridge patterns - `https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html`\n | Comparison | Example\n\n```ts\ntype EntityOperationTrigger = {\n id?: string // uuid\n type: "entity_operation"\n configuration: {\n schema?: string\n operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"[]\n include_activities?: string[]\n exclude_activities?: string[]\n filter_config?: {\n operation?: { ... }\n activity?: { ... }\n }\n ecp_config?: {\n origin?: { ... }\n portal_id?: { ... }\n file_config?: { ... }\n }\n }\n}\n```\n\n### `ActivityTrigger`\n\n```ts\ntype ActivityTrigger = {\n id?: string // uuid\n type: "activity"\n configuration: {\n schema?: string\n types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]\n }\n}\n```\n\n### `EntityOperation`\n\n```ts\ntype EntityOperation = "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"\n```\n\n### `EntitySearchFilter`\n\nA subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.\n\n```ts\ntype EntitySearchFilter = Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: string[]\n }\n range?: Record<string, {\n gt?: string | number | boolean\n gte?: string | number | boolean\n lt?: string | number | boolean\n lte?: string | number | boolean\n format?: string\n relation?: "INTERSECTS" | "CONTAINS" | "WITHIN"\n time_zone?: string\n }>\n exists?: {\n field: string\n }\n $and?: Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: { ... }\n }\n range?: Record<string, {\n gt?: { ... }\n gte?: { ... }\n lt?: { ... }\n lte?: { ... }\n format?: { ... }\n relation?: { ... }\n time_zone?: { ... }\n }>\n exists?: {\n field: { ... }\n }\n $and?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $or?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $not?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n }>\n $or?: Array<{\n term?: Record<string, string | number | boolean>\n terms?: Record<string, string | number | boolean[]>\n ids?: {\n values?: { ... }\n }\n range?: Record<string, {\n gt?: { ... }\n gte?: { ... }\n lt?: { ... }\n lte?: { ... }\n format?: { ... }\n relation?: { ... }\n time_zone?: { ... }\n }>\n exists?: {\n field: { ... }\n }\n $and?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n exists?: { ... }\n $and?: { ... }\n $or?: { ... }\n $not?: { ... }\n }>\n $or?: Array<{\n term?: { ... }\n terms?: { ... }\n ids?: { ... }\n range?: { ... }\n // ...\n}\n```\n\n### `EntitySearchFilterValue`\n\nA filter field value.\n\n```ts\ntype EntitySearchFilterValue = string | number | boolean\n```\n\n### `EntityManualTrigger`\n\n```ts\ntype EntityManualTrigger = {\n id?: string // uuid\n type: "entity_manual"\n configuration: {\n schema?: string\n }\n}\n```\n\n### `TriggerCondition`\n\n```ts\ntype TriggerCondition = {\n source: string\n comparison: "equals" | "any_of" | "not_empty" | "is_empty"\n value?: string | number | string[] | number[]\n}\n```\n\n### `Comparison`\n\n```ts\ntype Comparison = "equals" | "any_of" | "not_empty" | "is_empty"\n```\n\n### `FilterConditionOnEvent`\n\n```ts\ntype FilterConditionOnEvent = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `EqualsIgnoreCaseCondition`\n\n```ts\ntype EqualsIgnoreCaseCondition = {\n equals-ignore-case?: string\n}\n```\n\n### `AnythingButCondition`\n\n```ts\ntype AnythingButCondition = {\n anything-but?: string[]\n}\n```\n\n### `NumericCondition`\n\n```ts\ntype NumericCondition = {\n numeric?: string | number[]\n}\n```\n\n### `ExistsCondition`\n\n```ts\ntype ExistsCondition = {\n exists?: boolean\n}\n```\n\n### `PrefixCondition`\n\n```ts\ntype PrefixCondition = {\n prefix?: string\n}\n```\n\n### `SuffixCondition`\n\n```ts\ntype SuffixCondition = {\n suffix?: string\n}\n```\n\n### `WildcardCondition`\n\n```ts\ntype WildcardCondition = {\n wildcard?: string\n}\n```\n\n### `OrCondition`\n\n```ts\ntype OrCondition = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n}\n```\n\n### `DiffAdded`\n\n```ts\ntype DiffAdded = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `DiffUpdated`\n\n```ts\ntype DiffUpdated = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `DiffDeleted`\n\n```ts\ntype DiffDeleted = {\n $or?: Array<{\n $or?: Array<{\n $or?: { ... }\n } | Record<string, Array<string | {\n equals-ignore-case?: { ... }\n } | {\n anything-but?: { ... }\n } | {\n numeric?: { ... }\n } | {\n exists?: { ... }\n } | {\n prefix?: { ... }\n } | {\n suffix?: { ... }\n } | {\n wildcard?: { ... }\n }>>>\n } | Record<string, Array<string | {\n equals-ignore-case?: string\n } | {\n anything-but?: string[]\n } | {\n numeric?: string | number[]\n } | {\n exists?: boolean\n } | {\n prefix?: string\n } | {\n suffix?: string\n } | {\n wildcard?: string\n }>>>\n} | Record<string, Array<string | {\n equals-ignore-case?: string\n} | {\n anything-but?: string[]\n} | {\n numeric?: string | number[]\n} | {\n exists?: boolean\n} | {\n prefix?: string\n} | {\n suffix?: string\n} | {\n wildcard?: string\n}>>\n```\n\n### `OrConditionForDiff`\n\n```ts\ntype OrConditionForDiff = {\n $or?: unknown | unknown | unknown[]\n}\n```\n\n### `EntityItemSnapshot`\n\n```ts\ntype EntityItemSnapshot = {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n}\n```\n\n### `RetryReq`\n\n```ts\ntype RetryReq = {\n condition_id?: string\n retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"\n}\n```\n\n### `ResumeToken`\n\nA unique token to resume a paused automation execution\n\n```ts\ntype ResumeToken = string\n```\n\n### `ResumeReq`\n\n```ts\ntype ResumeReq = {\n resume_token: string\n}\n```\n\n### `ResumeResp`\n\n```ts\ntype ResumeResp = {\n execution: {\n id: string\n execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"\n entity_id: string\n activity_id?: string\n entity_snapshot?: {\n _id: { ... }\n _title: { ... }\n _org: { ... }\n _schema: { ... }\n _tags?: { ... }\n _created_at: { ... }\n _updated_at: { ... }\n }\n org_id: string\n flow_id: string\n flow_name?: string\n created_at?: string // date-time\n updated_at?: string // date-time\n current_action_id?: string\n conditions?: Array<{\n id?: { ... }\n schedule_id?: { ... }\n evaluationResult?: { ... }\n statements?: { ... }\n }>\n schedules?: Array<{\n id: { ... }\n scheduleApiId?: { ... }\n numberOfUnits?: { ... }\n timePeriod?: { ... }\n timeRelation?: { ... }\n source: { ... }\n }>\n actions: Array<{\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n id?: { ... }\n flow_action_id?: { ... }\n name?: { ... }\n type?: { ... }\n config?: { ... }\n allow_failure?: { ... }\n created_automatically?: { ... }\n is_bulk_action?: { ... }\n reason?: { ... }\n condition_id?: { ... }\n schedule_id?: { ... }\n execution_status?: { ... }\n started_at?: { ... }\n updated_at?: { ... }\n outputs?: { ... }\n error_output?: { ... }\n retry_strategy?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n } | {\n type?: { ... }\n config?: { ... }\n }>\n resume_token?: string\n trigger_context?: Record<string, string>\n version?: number\n trigger_event?: {\n type?: { ... }\n org_id: { ... }\n entity_id: { ... }\n // ...\n}\n```\n\n### `ErrorObject`\n\n```ts\ntype ErrorObject = {\n status?: number\n error?: string\n}\n```\n';
5
-
6
-
7
- exports.default = automation_default;