@epilot/sdk 2.2.3 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/definitions/data-management-runtime.json +1 -1
  2. package/definitions/data-management.json +11 -5
  3. package/definitions/workflow-definition-runtime.json +1 -1
  4. package/definitions/workflow-definition.json +72 -201
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/consent.cjs +6 -6
  24. package/dist/apis/consent.js +1 -1
  25. package/dist/apis/customer-portal.cjs +6 -6
  26. package/dist/apis/customer-portal.js +1 -1
  27. package/dist/apis/dashboard.cjs +6 -6
  28. package/dist/apis/dashboard.js +1 -1
  29. package/dist/apis/data-management.cjs +8 -8
  30. package/dist/apis/data-management.d.cts +2 -2
  31. package/dist/apis/data-management.d.ts +2 -2
  32. package/dist/apis/data-management.js +2 -2
  33. package/dist/apis/deduplication.cjs +6 -6
  34. package/dist/apis/deduplication.js +1 -1
  35. package/dist/apis/design.cjs +6 -6
  36. package/dist/apis/design.js +1 -1
  37. package/dist/apis/document.cjs +6 -6
  38. package/dist/apis/document.js +1 -1
  39. package/dist/apis/email-settings.cjs +6 -6
  40. package/dist/apis/email-settings.js +1 -1
  41. package/dist/apis/email-template.cjs +6 -6
  42. package/dist/apis/email-template.js +1 -1
  43. package/dist/apis/entity-mapping.cjs +6 -6
  44. package/dist/apis/entity-mapping.js +1 -1
  45. package/dist/apis/entity.cjs +6 -6
  46. package/dist/apis/entity.js +1 -1
  47. package/dist/apis/environments.cjs +6 -6
  48. package/dist/apis/environments.js +1 -1
  49. package/dist/apis/erp-integration.cjs +6 -6
  50. package/dist/apis/erp-integration.js +1 -1
  51. package/dist/apis/event-catalog.cjs +6 -6
  52. package/dist/apis/event-catalog.js +1 -1
  53. package/dist/apis/file.cjs +6 -6
  54. package/dist/apis/file.js +1 -1
  55. package/dist/apis/iban.cjs +6 -6
  56. package/dist/apis/iban.js +1 -1
  57. package/dist/apis/journey.cjs +6 -6
  58. package/dist/apis/journey.js +1 -1
  59. package/dist/apis/kanban.cjs +6 -6
  60. package/dist/apis/kanban.js +1 -1
  61. package/dist/apis/message.cjs +6 -6
  62. package/dist/apis/message.js +1 -1
  63. package/dist/apis/metering.cjs +6 -6
  64. package/dist/apis/metering.js +1 -1
  65. package/dist/apis/notes.cjs +6 -6
  66. package/dist/apis/notes.js +1 -1
  67. package/dist/apis/notification.cjs +6 -6
  68. package/dist/apis/notification.js +1 -1
  69. package/dist/apis/organization.cjs +6 -6
  70. package/dist/apis/organization.js +1 -1
  71. package/dist/apis/partner-directory.cjs +6 -6
  72. package/dist/apis/partner-directory.js +1 -1
  73. package/dist/apis/permissions.cjs +6 -6
  74. package/dist/apis/permissions.js +1 -1
  75. package/dist/apis/pricing-tier.cjs +6 -6
  76. package/dist/apis/pricing-tier.js +1 -1
  77. package/dist/apis/pricing.cjs +6 -6
  78. package/dist/apis/pricing.js +1 -1
  79. package/dist/apis/purpose.cjs +6 -6
  80. package/dist/apis/purpose.js +1 -1
  81. package/dist/apis/sandbox.cjs +6 -6
  82. package/dist/apis/sandbox.js +1 -1
  83. package/dist/apis/submission.cjs +6 -6
  84. package/dist/apis/submission.js +1 -1
  85. package/dist/apis/targeting.cjs +6 -6
  86. package/dist/apis/targeting.js +1 -1
  87. package/dist/apis/template-variables.cjs +6 -6
  88. package/dist/apis/template-variables.js +1 -1
  89. package/dist/apis/user.cjs +6 -6
  90. package/dist/apis/user.js +1 -1
  91. package/dist/apis/validation-rules.cjs +6 -6
  92. package/dist/apis/validation-rules.js +1 -1
  93. package/dist/apis/webhooks.cjs +6 -6
  94. package/dist/apis/webhooks.js +1 -1
  95. package/dist/apis/workflow-definition.cjs +8 -8
  96. package/dist/apis/workflow-definition.d.cts +2 -2
  97. package/dist/apis/workflow-definition.d.ts +2 -2
  98. package/dist/apis/workflow-definition.js +2 -2
  99. package/dist/apis/workflow.cjs +6 -6
  100. package/dist/apis/workflow.js +1 -1
  101. package/dist/chunk-43GJY2EB.js +14 -0
  102. package/dist/chunk-4BCQGZJB.cjs +14 -0
  103. package/dist/chunk-6GC363VV.js +14 -0
  104. package/dist/chunk-CYS6QBW6.cjs +14 -0
  105. package/dist/{chunk-TUSCE6W2.js → chunk-OTSGPLDM.js} +4 -4
  106. package/dist/{chunk-EH7KVFLO.cjs → chunk-ZXLTSQYE.cjs} +4 -4
  107. package/dist/data-management-3N3A3XBM.js +7 -0
  108. package/dist/data-management-YXFLQWLV.cjs +7 -0
  109. package/dist/{data-management-runtime-XZ347IUB.js → data-management-runtime-DN7FGK7G.js} +1 -1
  110. package/dist/{data-management-runtime-PAC7UFGT.cjs → data-management-runtime-J5IS7T47.cjs} +2 -2
  111. package/dist/{data-management.d-CkDmJwpx.d.cts → data-management.d-BXS5jbJY.d.cts} +1 -0
  112. package/dist/{data-management.d-CkDmJwpx.d.ts → data-management.d-BXS5jbJY.d.ts} +1 -0
  113. package/dist/index.cjs +12 -12
  114. package/dist/index.d.cts +2 -2
  115. package/dist/index.d.ts +2 -2
  116. package/dist/index.js +3 -3
  117. package/dist/workflow-definition-MBOMPMCG.js +7 -0
  118. package/dist/workflow-definition-SPAHD3HS.cjs +7 -0
  119. package/dist/{workflow-definition-runtime-VRND6VQR.cjs → workflow-definition-runtime-GACBV4WM.cjs} +2 -2
  120. package/dist/{workflow-definition-runtime-S7AZHOU7.js → workflow-definition-runtime-OVXRSE34.js} +1 -1
  121. package/dist/{workflow-definition.d-CE3kk9gl.d.cts → workflow-definition.d-CtmE-ymB.d.cts} +52 -211
  122. package/dist/{workflow-definition.d-CE3kk9gl.d.ts → workflow-definition.d-CtmE-ymB.d.ts} +52 -211
  123. package/docs/data-management.md +15 -6
  124. package/docs/workflow-definition.md +121 -487
  125. package/package.json +1 -1
  126. package/dist/chunk-46HU6232.cjs +0 -14
  127. package/dist/chunk-5JPM6YUD.js +0 -14
  128. package/dist/chunk-JICWF5VI.cjs +0 -14
  129. package/dist/chunk-QT44OHHL.js +0 -14
  130. package/dist/data-management-QH2IJ5QV.js +0 -7
  131. package/dist/data-management-TEFRLGSU.cjs +0 -7
  132. package/dist/workflow-definition-B6ELOZUR.cjs +0 -7
  133. package/dist/workflow-definition-D24CRCK2.js +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,14 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
4
-
5
- // src/definitions/workflow-definition-runtime.json
6
- var require_workflow_definition_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
7
- "src/definitions/workflow-definition-runtime.json"(exports, module) {
8
- module.exports = { s: "https://workflows-definition.sls.epilot.io", o: [["getMaxAllowedLimit", "get", "/v1/workflows/limits/max-allowed"], ["getDefinitions", "get", "/v1/workflows/definitions"], ["createDefinition", "post", "/v1/workflows/definitions", null, 1], ["listFlowTemplates", "get", "/v2/flows/templates", [["trigger_type", "q"], ["trigger_source_id", "q"], ["trigger_schema", "q"]]], ["createFlowTemplate", "post", "/v2/flows/templates", null, 1], ["searchFlowTemplates", "post", "/v2/flows/templates:search", null, 1], ["getFlowTemplate", "get", "/v2/flows/templates/{flowId}", [["flowId", "p", true]]], ["updateFlowTemplate", "put", "/v2/flows/templates/{flowId}", [["flowId", "p", true]], 1], ["deleteFlowTemplate", "delete", "/v2/flows/templates/{flowId}", [["flowId", "p", true]]], ["duplicateFlowTemplate", "post", "/v2/flows/templates/{flowId}/duplicate", [["flowId", "p", true]]], ["exportFlowTemplate", "get", "/v2/flows/templates/{flowId}/export", [["flowId", "p", true]]], ["importFlowTemplate", "post", "/v2/flows/templates/import", null, 1], ["getDefinition", "get", "/v1/workflows/definitions/{definitionId}", [["definitionId", "p", true]]], ["updateDefinition", "put", "/v1/workflows/definitions/{definitionId}", [["definitionId", "p", true]], 1], ["deleteDefinition", "delete", "/v1/workflows/definitions/{definitionId}", [["definitionId", "p", true]]], ["getAllClosingReasons", "get", "/v1/workflows/closing-reasons", [["includeInactive", "q"]]], ["createClosingReason", "post", "/v1/workflows/closing-reasons", null, 1], ["getClosingReason", "get", "/v2/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]]], ["updateClosingReason", "patch", "/v2/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]], 1], ["deleteClosingReason", "delete", "/v2/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]]], ["getClosingReasonV1", "get", "/v1/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]]], ["changeReasonStatus", "patch", "/v1/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]], 1], ["getWorkflowClosingReasons", "get", "/v1/workflows/definitions/{definitionId}/closing-reasons", [["definitionId", "p", true]]], ["setWorkflowClosingReasons", "patch", "/v1/workflows/definitions/{definitionId}/closing-reasons", [["definitionId", "p", true]], 1]], v: "3.0.0" };
9
- }
10
- });
11
-
12
-
13
-
14
- exports.require_workflow_definition_runtime = require_workflow_definition_runtime;
@@ -1,14 +0,0 @@
1
- import {
2
- __commonJS
3
- } from "./chunk-YPSWSI3M.js";
4
-
5
- // src/definitions/workflow-definition-runtime.json
6
- var require_workflow_definition_runtime = __commonJS({
7
- "src/definitions/workflow-definition-runtime.json"(exports, module) {
8
- module.exports = { s: "https://workflows-definition.sls.epilot.io", o: [["getMaxAllowedLimit", "get", "/v1/workflows/limits/max-allowed"], ["getDefinitions", "get", "/v1/workflows/definitions"], ["createDefinition", "post", "/v1/workflows/definitions", null, 1], ["listFlowTemplates", "get", "/v2/flows/templates", [["trigger_type", "q"], ["trigger_source_id", "q"], ["trigger_schema", "q"]]], ["createFlowTemplate", "post", "/v2/flows/templates", null, 1], ["searchFlowTemplates", "post", "/v2/flows/templates:search", null, 1], ["getFlowTemplate", "get", "/v2/flows/templates/{flowId}", [["flowId", "p", true]]], ["updateFlowTemplate", "put", "/v2/flows/templates/{flowId}", [["flowId", "p", true]], 1], ["deleteFlowTemplate", "delete", "/v2/flows/templates/{flowId}", [["flowId", "p", true]]], ["duplicateFlowTemplate", "post", "/v2/flows/templates/{flowId}/duplicate", [["flowId", "p", true]]], ["exportFlowTemplate", "get", "/v2/flows/templates/{flowId}/export", [["flowId", "p", true]]], ["importFlowTemplate", "post", "/v2/flows/templates/import", null, 1], ["getDefinition", "get", "/v1/workflows/definitions/{definitionId}", [["definitionId", "p", true]]], ["updateDefinition", "put", "/v1/workflows/definitions/{definitionId}", [["definitionId", "p", true]], 1], ["deleteDefinition", "delete", "/v1/workflows/definitions/{definitionId}", [["definitionId", "p", true]]], ["getAllClosingReasons", "get", "/v1/workflows/closing-reasons", [["includeInactive", "q"]]], ["createClosingReason", "post", "/v1/workflows/closing-reasons", null, 1], ["getClosingReason", "get", "/v2/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]]], ["updateClosingReason", "patch", "/v2/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]], 1], ["deleteClosingReason", "delete", "/v2/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]]], ["getClosingReasonV1", "get", "/v1/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]]], ["changeReasonStatus", "patch", "/v1/workflows/closing-reasons/{reasonId}", [["reasonId", "p", true]], 1], ["getWorkflowClosingReasons", "get", "/v1/workflows/definitions/{definitionId}/closing-reasons", [["definitionId", "p", true]]], ["setWorkflowClosingReasons", "patch", "/v1/workflows/definitions/{definitionId}/closing-reasons", [["definitionId", "p", true]], 1]], v: "3.0.0" };
9
- }
10
- });
11
-
12
- export {
13
- require_workflow_definition_runtime
14
- };
@@ -1,14 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
4
-
5
- // src/definitions/data-management-runtime.json
6
- var require_data_management_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
7
- "src/definitions/data-management-runtime.json"(exports, module) {
8
- module.exports = { s: "https://data-management.sls.epilot.io", o: [["queryEntities", "post", "/data-management/v1/{entity_schema}/query", [["entity_schema", "p", true]], 1], ["createJob", "post", "/data-management/v1/{entity_schema}/jobs", [["entity_schema", "p", true]], 1], ["updateJob", "patch", "/data-management/v1/{entity_schema}/jobs/{job_id}", [["entity_schema", "p", true], ["job_id", "p", true]], 1], ["getJob", "get", "/data-management/v1/jobs/{job_id}", [["job_id", "p", true]]], ["getJobReportUrl", "get", "/data-management/v1/jobs/{job_id}/report-url", [["job_id", "p", true]]], ["getConfig", "get", "/data-management/v1/configs/{config_id}", [["config_id", "p", true]]], ["createJobForConfig", "post", "/data-management/v1/configs/{config_id}/jobs", [["config_id", "p", true]]], ["upsertConfig", "post", "/data-management/v1/{entity_schema}/configs", [["entity_schema", "p", true]], 1], ["listConfigs", "get", "/data-management/v1/configs", [["limit", "q"], ["cursor", "q"], ["entity_schema", "q"], ["type", "q"], ["next_run_at", "q"], ["enabled", "q"]]], ["listJobs", "get", "/data-management/v1/jobs", [["limit", "q"], ["cursor", "q"], ["entity_schema", "q"], ["type", "q"], ["status", "q"], ["config_id", "q"]]]], v: "3.0.3" };
9
- }
10
- });
11
-
12
-
13
-
14
- exports.require_data_management_runtime = require_data_management_runtime;
@@ -1,14 +0,0 @@
1
- import {
2
- __commonJS
3
- } from "./chunk-YPSWSI3M.js";
4
-
5
- // src/definitions/data-management-runtime.json
6
- var require_data_management_runtime = __commonJS({
7
- "src/definitions/data-management-runtime.json"(exports, module) {
8
- module.exports = { s: "https://data-management.sls.epilot.io", o: [["queryEntities", "post", "/data-management/v1/{entity_schema}/query", [["entity_schema", "p", true]], 1], ["createJob", "post", "/data-management/v1/{entity_schema}/jobs", [["entity_schema", "p", true]], 1], ["updateJob", "patch", "/data-management/v1/{entity_schema}/jobs/{job_id}", [["entity_schema", "p", true], ["job_id", "p", true]], 1], ["getJob", "get", "/data-management/v1/jobs/{job_id}", [["job_id", "p", true]]], ["getJobReportUrl", "get", "/data-management/v1/jobs/{job_id}/report-url", [["job_id", "p", true]]], ["getConfig", "get", "/data-management/v1/configs/{config_id}", [["config_id", "p", true]]], ["createJobForConfig", "post", "/data-management/v1/configs/{config_id}/jobs", [["config_id", "p", true]]], ["upsertConfig", "post", "/data-management/v1/{entity_schema}/configs", [["entity_schema", "p", true]], 1], ["listConfigs", "get", "/data-management/v1/configs", [["limit", "q"], ["cursor", "q"], ["entity_schema", "q"], ["type", "q"], ["next_run_at", "q"], ["enabled", "q"]]], ["listJobs", "get", "/data-management/v1/jobs", [["limit", "q"], ["cursor", "q"], ["entity_schema", "q"], ["type", "q"], ["status", "q"], ["config_id", "q"]]]], v: "3.0.3" };
9
- }
10
- });
11
-
12
- export {
13
- require_data_management_runtime
14
- };
@@ -1,7 +0,0 @@
1
- import "./chunk-YPSWSI3M.js";
2
-
3
- // src/docs/data-management.json
4
- var data_management_default = '# Data Management API\n\n- **Base URL:** `https://data-management.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/data-management](https://docs.epilot.io/api/data-management)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.dataManagement.queryEntities(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/data-management\'\n\nconst dataManagementClient = getClient()\nauthorize(dataManagementClient, () => \'<token>\')\nconst { data } = await dataManagementClient.queryEntities(...)\n```\n\n## Operations\n\n**Data Management**\n- [`queryEntities`](#queryentities)\n- [`createJob`](#createjob)\n- [`updateJob`](#updatejob)\n- [`getJob`](#getjob)\n- [`getJobReportUrl`](#getjobreporturl)\n- [`getConfig`](#getconfig)\n- [`createJobForConfig`](#createjobforconfig)\n- [`upsertConfig`](#upsertconfig)\n- [`listConfigs`](#listconfigs)\n- [`listJobs`](#listjobs)\n\n**Schemas**\n- [`ConfigType`](#configtype)\n- [`JobStatus`](#jobstatus)\n- [`JobTrigger`](#jobtrigger)\n- [`JobReportFormat`](#jobreportformat)\n- [`JobReport`](#jobreport)\n- [`CreateJobRequest`](#createjobrequest)\n- [`JobDetails`](#jobdetails)\n- [`UpdateJobRequest`](#updatejobrequest)\n- [`Job`](#job)\n- [`ListJobsResponse`](#listjobsresponse)\n- [`JobReportUrlResponse`](#jobreporturlresponse)\n- [`QueryFilterType`](#queryfiltertype)\n- [`QueryFilter`](#queryfilter)\n- [`QueryConfig`](#queryconfig)\n- [`QueryEntitiesRequest`](#queryentitiesrequest)\n- [`QueryEntitiesResult`](#queryentitiesresult)\n- [`ConfigSchedule`](#configschedule)\n- [`IntervalConfigSchedule`](#intervalconfigschedule)\n- [`UpsertConfigRequest`](#upsertconfigrequest)\n- [`Config`](#config)\n- [`DeletionRelationEntitySchema`](#deletionrelationentityschema)\n- [`ListConfigsResponse`](#listconfigsresponse)\n\n### `queryEntities`\n\nQuery entities using a saved view with additional data filters\n\n`POST /data-management/v1/{entity_schema}/query`\n\n```ts\nconst { data } = await client.queryEntities(\n {\n entity_schema: \'example\',\n },\n {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\']\n }\n ],\n from: 0,\n size: 0,\n hydrate: true,\n fields: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `createJob`\n\nCreate a new job run\n\n`POST /data-management/v1/{entity_schema}/jobs`\n\n```ts\nconst { data } = await client.createJob(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n config_id: \'string\',\n scheduled_for: \'1970-01-01\',\n status: \'in_progress\',\n started_at: \'1970-01-01T00:00:00.000Z\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateJob`\n\nUpdate an existing job run\n\n`PATCH /data-management/v1/{entity_schema}/jobs/{job_id}`\n\n```ts\nconst { data } = await client.updateJob(\n {\n entity_schema: \'example\',\n job_id: \'example\',\n },\n {\n status: \'in_progress\',\n details: {},\n completed_at: \'1970-01-01T00:00:00.000Z\',\n error: \'string\',\n report: {\n bucket: \'string\',\n key: \'string\',\n format: \'csv\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJob`\n\nGet a job by id\n\n`GET /data-management/v1/jobs/{job_id}`\n\n```ts\nconst { data } = await client.getJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJobReportUrl`\n\nGet report download URL for a job\n\n`GET /data-management/v1/jobs/{job_id}/report-url`\n\n```ts\nconst { data } = await client.getJobReportUrl({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "url": "string",\n "expires_in": 0\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet a config by id\n\n`GET /data-management/v1/configs/{config_id}`\n\n```ts\nconst { data } = await client.getConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "1970-01-01",\n "end_date": "1970-01-01"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "1970-01-01",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `createJobForConfig`\n\nTrigger a manual job run for a config\n\n`POST /data-management/v1/configs/{config_id}/jobs`\n\n```ts\nconst { data } = await client.createJobForConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `upsertConfig`\n\nUpsert config\n\n`POST /data-management/v1/{entity_schema}/configs`\n\n```ts\nconst { data } = await client.upsertConfig(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n query: {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\']\n }\n ]\n },\n schedule: {\n frequency: \'interval\',\n interval_days: 1,\n start_date: \'1970-01-01\',\n end_date: \'1970-01-01\'\n },\n relations_for_deletion: [\'contact\'],\n enabled: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "1970-01-01",\n "end_date": "1970-01-01"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "1970-01-01",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `listConfigs`\n\nList configs\n\n`GET /data-management/v1/configs`\n\n```ts\nconst { data } = await client.listConfigs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n next_run_at: \'example\',\n enabled: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "configs": [\n {\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "1970-01-01",\n "end_date": "1970-01-01"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "1970-01-01",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `listJobs`\n\nList jobs\n\n`GET /data-management/v1/jobs`\n\n```ts\nconst { data } = await client.listJobs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n status: \'example\',\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "jobs": [\n {\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ConfigType`\n\nType of configuration (e.g. deletion)\n\n```ts\ntype ConfigType = "deletion"\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = "in_progress" | "success" | "failed"\n```\n\n### `JobTrigger`\n\n```ts\ntype JobTrigger = "schedule" | "manual"\n```\n\n### `JobReportFormat`\n\n```ts\ntype JobReportFormat = "csv"\n```\n\n### `JobReport`\n\n```ts\ntype JobReport = {\n bucket?: string\n key?: string\n format?: "csv"\n}\n```\n\n### `CreateJobRequest`\n\n```ts\ntype CreateJobRequest = {\n type: "deletion"\n config_id: string\n scheduled_for: string // date\n status?: "in_progress" | "success" | "failed"\n started_at?: string // date-time\n}\n```\n\n### `JobDetails`\n\nGeneric, type-specific job details payload (e.g. matched count, deleted count, failed count, etc.).\n\n```ts\ntype JobDetails = Record<string, unknown>\n```\n\n### `UpdateJobRequest`\n\n```ts\ntype UpdateJobRequest = {\n status?: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n}\n```\n\n### `Job`\n\n```ts\ntype Job = {\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n}\n```\n\n### `ListJobsResponse`\n\n```ts\ntype ListJobsResponse = {\n jobs?: Array<{\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: { ... }\n key?: { ... }\n format?: { ... }\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n }>\n cursor?: string\n}\n```\n\n### `JobReportUrlResponse`\n\n```ts\ntype JobReportUrlResponse = {\n url?: string\n expires_in?: number\n}\n```\n\n### `QueryFilterType`\n\n```ts\ntype QueryFilterType = "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n```\n\n### `QueryFilter`\n\n```ts\ntype QueryFilter = {\n type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n}\n```\n\n### `QueryConfig`\n\n```ts\ntype QueryConfig = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n }>\n}\n```\n\n### `QueryEntitiesRequest`\n\n```ts\ntype QueryEntitiesRequest = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n }>\n from?: number\n size?: number\n hydrate?: boolean\n fields?: string[]\n}\n```\n\n### `QueryEntitiesResult`\n\n```ts\ntype QueryEntitiesResult = {\n hits?: number\n results?: Record<string, unknown>[]\n}\n```\n\n### `ConfigSchedule`\n\n```ts\ntype ConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `IntervalConfigSchedule`\n\n```ts\ntype IntervalConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `UpsertConfigRequest`\n\n```ts\ntype UpsertConfigRequest = {\n type: "deletion"\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n }>\n }\n schedule: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n enabled?: boolean\n}\n```\n\n### `Config`\n\n```ts\ntype Config = {\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n }>\n }\n schedule?: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n}\n```\n\n### `DeletionRelationEntitySchema`\n\n```ts\ntype DeletionRelationEntitySchema = "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"\n```\n\n### `ListConfigsResponse`\n\n```ts\ntype ListConfigsResponse = {\n configs?: Array<{\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: { ... }\n include_deleted?: { ... }\n filters?: { ... }\n }\n schedule?: {\n frequency: { ... }\n interval_days: { ... }\n start_date?: { ... }\n end_date?: { ... }\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n }>\n cursor?: string\n}\n```\n';
5
- export {
6
- data_management_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/data-management.json
4
- var data_management_default = '# Data Management API\n\n- **Base URL:** `https://data-management.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/data-management](https://docs.epilot.io/api/data-management)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.dataManagement.queryEntities(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/data-management\'\n\nconst dataManagementClient = getClient()\nauthorize(dataManagementClient, () => \'<token>\')\nconst { data } = await dataManagementClient.queryEntities(...)\n```\n\n## Operations\n\n**Data Management**\n- [`queryEntities`](#queryentities)\n- [`createJob`](#createjob)\n- [`updateJob`](#updatejob)\n- [`getJob`](#getjob)\n- [`getJobReportUrl`](#getjobreporturl)\n- [`getConfig`](#getconfig)\n- [`createJobForConfig`](#createjobforconfig)\n- [`upsertConfig`](#upsertconfig)\n- [`listConfigs`](#listconfigs)\n- [`listJobs`](#listjobs)\n\n**Schemas**\n- [`ConfigType`](#configtype)\n- [`JobStatus`](#jobstatus)\n- [`JobTrigger`](#jobtrigger)\n- [`JobReportFormat`](#jobreportformat)\n- [`JobReport`](#jobreport)\n- [`CreateJobRequest`](#createjobrequest)\n- [`JobDetails`](#jobdetails)\n- [`UpdateJobRequest`](#updatejobrequest)\n- [`Job`](#job)\n- [`ListJobsResponse`](#listjobsresponse)\n- [`JobReportUrlResponse`](#jobreporturlresponse)\n- [`QueryFilterType`](#queryfiltertype)\n- [`QueryFilter`](#queryfilter)\n- [`QueryConfig`](#queryconfig)\n- [`QueryEntitiesRequest`](#queryentitiesrequest)\n- [`QueryEntitiesResult`](#queryentitiesresult)\n- [`ConfigSchedule`](#configschedule)\n- [`IntervalConfigSchedule`](#intervalconfigschedule)\n- [`UpsertConfigRequest`](#upsertconfigrequest)\n- [`Config`](#config)\n- [`DeletionRelationEntitySchema`](#deletionrelationentityschema)\n- [`ListConfigsResponse`](#listconfigsresponse)\n\n### `queryEntities`\n\nQuery entities using a saved view with additional data filters\n\n`POST /data-management/v1/{entity_schema}/query`\n\n```ts\nconst { data } = await client.queryEntities(\n {\n entity_schema: \'example\',\n },\n {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\']\n }\n ],\n from: 0,\n size: 0,\n hydrate: true,\n fields: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `createJob`\n\nCreate a new job run\n\n`POST /data-management/v1/{entity_schema}/jobs`\n\n```ts\nconst { data } = await client.createJob(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n config_id: \'string\',\n scheduled_for: \'1970-01-01\',\n status: \'in_progress\',\n started_at: \'1970-01-01T00:00:00.000Z\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateJob`\n\nUpdate an existing job run\n\n`PATCH /data-management/v1/{entity_schema}/jobs/{job_id}`\n\n```ts\nconst { data } = await client.updateJob(\n {\n entity_schema: \'example\',\n job_id: \'example\',\n },\n {\n status: \'in_progress\',\n details: {},\n completed_at: \'1970-01-01T00:00:00.000Z\',\n error: \'string\',\n report: {\n bucket: \'string\',\n key: \'string\',\n format: \'csv\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJob`\n\nGet a job by id\n\n`GET /data-management/v1/jobs/{job_id}`\n\n```ts\nconst { data } = await client.getJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJobReportUrl`\n\nGet report download URL for a job\n\n`GET /data-management/v1/jobs/{job_id}/report-url`\n\n```ts\nconst { data } = await client.getJobReportUrl({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "url": "string",\n "expires_in": 0\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet a config by id\n\n`GET /data-management/v1/configs/{config_id}`\n\n```ts\nconst { data } = await client.getConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "1970-01-01",\n "end_date": "1970-01-01"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "1970-01-01",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `createJobForConfig`\n\nTrigger a manual job run for a config\n\n`POST /data-management/v1/configs/{config_id}/jobs`\n\n```ts\nconst { data } = await client.createJobForConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `upsertConfig`\n\nUpsert config\n\n`POST /data-management/v1/{entity_schema}/configs`\n\n```ts\nconst { data } = await client.upsertConfig(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n query: {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\']\n }\n ]\n },\n schedule: {\n frequency: \'interval\',\n interval_days: 1,\n start_date: \'1970-01-01\',\n end_date: \'1970-01-01\'\n },\n relations_for_deletion: [\'contact\'],\n enabled: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "1970-01-01",\n "end_date": "1970-01-01"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "1970-01-01",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `listConfigs`\n\nList configs\n\n`GET /data-management/v1/configs`\n\n```ts\nconst { data } = await client.listConfigs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n next_run_at: \'example\',\n enabled: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "configs": [\n {\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "1970-01-01",\n "end_date": "1970-01-01"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "1970-01-01",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `listJobs`\n\nList jobs\n\n`GET /data-management/v1/jobs`\n\n```ts\nconst { data } = await client.listJobs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n status: \'example\',\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "jobs": [\n {\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "1970-01-01",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ConfigType`\n\nType of configuration (e.g. deletion)\n\n```ts\ntype ConfigType = "deletion"\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = "in_progress" | "success" | "failed"\n```\n\n### `JobTrigger`\n\n```ts\ntype JobTrigger = "schedule" | "manual"\n```\n\n### `JobReportFormat`\n\n```ts\ntype JobReportFormat = "csv"\n```\n\n### `JobReport`\n\n```ts\ntype JobReport = {\n bucket?: string\n key?: string\n format?: "csv"\n}\n```\n\n### `CreateJobRequest`\n\n```ts\ntype CreateJobRequest = {\n type: "deletion"\n config_id: string\n scheduled_for: string // date\n status?: "in_progress" | "success" | "failed"\n started_at?: string // date-time\n}\n```\n\n### `JobDetails`\n\nGeneric, type-specific job details payload (e.g. matched count, deleted count, failed count, etc.).\n\n```ts\ntype JobDetails = Record<string, unknown>\n```\n\n### `UpdateJobRequest`\n\n```ts\ntype UpdateJobRequest = {\n status?: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n}\n```\n\n### `Job`\n\n```ts\ntype Job = {\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n}\n```\n\n### `ListJobsResponse`\n\n```ts\ntype ListJobsResponse = {\n jobs?: Array<{\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: { ... }\n key?: { ... }\n format?: { ... }\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n }>\n cursor?: string\n}\n```\n\n### `JobReportUrlResponse`\n\n```ts\ntype JobReportUrlResponse = {\n url?: string\n expires_in?: number\n}\n```\n\n### `QueryFilterType`\n\n```ts\ntype QueryFilterType = "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n```\n\n### `QueryFilter`\n\n```ts\ntype QueryFilter = {\n type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n}\n```\n\n### `QueryConfig`\n\n```ts\ntype QueryConfig = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n }>\n}\n```\n\n### `QueryEntitiesRequest`\n\n```ts\ntype QueryEntitiesRequest = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n }>\n from?: number\n size?: number\n hydrate?: boolean\n fields?: string[]\n}\n```\n\n### `QueryEntitiesResult`\n\n```ts\ntype QueryEntitiesResult = {\n hits?: number\n results?: Record<string, unknown>[]\n}\n```\n\n### `ConfigSchedule`\n\n```ts\ntype ConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `IntervalConfigSchedule`\n\n```ts\ntype IntervalConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `UpsertConfigRequest`\n\n```ts\ntype UpsertConfigRequest = {\n type: "deletion"\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n }>\n }\n schedule: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n enabled?: boolean\n}\n```\n\n### `Config`\n\n```ts\ntype Config = {\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n }>\n }\n schedule?: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n}\n```\n\n### `DeletionRelationEntitySchema`\n\n```ts\ntype DeletionRelationEntitySchema = "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"\n```\n\n### `ListConfigsResponse`\n\n```ts\ntype ListConfigsResponse = {\n configs?: Array<{\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: { ... }\n include_deleted?: { ... }\n filters?: { ... }\n }\n schedule?: {\n frequency: { ... }\n interval_days: { ... }\n start_date?: { ... }\n end_date?: { ... }\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n }>\n cursor?: string\n}\n```\n';
5
-
6
-
7
- exports.default = data_management_default;
@@ -1,7 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
-
3
- // src/docs/workflow-definition.json
4
- var workflow_definition_default = '# Workflows Definitions\n\n- **Base URL:** `https://workflows-definition.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/workflow-definition](https://docs.epilot.io/api/workflow-definition)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.workflowDefinition.getMaxAllowedLimit(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/workflow-definition\'\n\nconst workflowDefinitionClient = getClient()\nauthorize(workflowDefinitionClient, () => \'<token>\')\nconst { data } = await workflowDefinitionClient.getMaxAllowedLimit(...)\n```\n\n## Operations\n\n**Workflows**\n- [`getMaxAllowedLimit`](#getmaxallowedlimit)\n- [`getDefinitions`](#getdefinitions)\n- [`createDefinition`](#createdefinition)\n- [`getDefinition`](#getdefinition)\n- [`updateDefinition`](#updatedefinition)\n- [`deleteDefinition`](#deletedefinition)\n- [`getWorkflowClosingReasons`](#getworkflowclosingreasons)\n- [`setWorkflowClosingReasons`](#setworkflowclosingreasons)\n\n**Flows V2**\n- [`listFlowTemplates`](#listflowtemplates)\n- [`createFlowTemplate`](#createflowtemplate)\n- [`searchFlowTemplates`](#searchflowtemplates)\n- [`getFlowTemplate`](#getflowtemplate)\n- [`updateFlowTemplate`](#updateflowtemplate)\n- [`deleteFlowTemplate`](#deleteflowtemplate)\n- [`duplicateFlowTemplate`](#duplicateflowtemplate)\n- [`exportFlowTemplate`](#exportflowtemplate)\n- [`importFlowTemplate`](#importflowtemplate)\n\n**Closing Reason**\n- [`getAllClosingReasons`](#getallclosingreasons)\n- [`createClosingReason`](#createclosingreason)\n- [`getClosingReason`](#getclosingreason)\n- [`updateClosingReason`](#updateclosingreason)\n- [`deleteClosingReason`](#deleteclosingreason)\n- [`changeReasonStatus`](#changereasonstatus)\n\n**Schemas**\n- [`FlowTemplateBase`](#flowtemplatebase)\n- [`FlowTemplate`](#flowtemplate)\n- [`Version`](#version)\n- [`Trigger`](#trigger)\n- [`ManualTrigger`](#manualtrigger)\n- [`AutomationTrigger`](#automationtrigger)\n- [`JourneyAutomationTrigger`](#journeyautomationtrigger)\n- [`JourneySubmissionTrigger`](#journeysubmissiontrigger)\n- [`CreateFlowTemplate`](#createflowtemplate)\n- [`SearchFlowTemplates`](#searchflowtemplates)\n- [`FlowTemplatesList`](#flowtemplateslist)\n- [`FlowTemplateId`](#flowtemplateid)\n- [`Task`](#task)\n- [`ManualTask`](#manualtask)\n- [`AutomationTask`](#automationtask)\n- [`AutomationConfig`](#automationconfig)\n- [`AiAgentTask`](#aiagenttask)\n- [`AgentConfig`](#agentconfig)\n- [`TriggerMode`](#triggermode)\n- [`ActionSchedule`](#actionschedule)\n- [`ImmediateSchedule`](#immediateschedule)\n- [`DelayedSchedule`](#delayedschedule)\n- [`RelativeSchedule`](#relativeschedule)\n- [`DecisionTask`](#decisiontask)\n- [`TaskBase`](#taskbase)\n- [`Phase`](#phase)\n- [`VariableAssignment`](#variableassignment)\n- [`TaskType`](#tasktype)\n- [`Edge`](#edge)\n- [`Condition`](#condition)\n- [`Statement`](#statement)\n- [`EvaluationSource`](#evaluationsource)\n- [`Operator`](#operator)\n- [`DueDateConfig`](#duedateconfig)\n- [`TimeUnit`](#timeunit)\n- [`EnableRequirement`](#enablerequirement)\n- [`WorkflowDefinition`](#workflowdefinition)\n- [`Step`](#step)\n- [`Section`](#section)\n- [`TriggerType`](#triggertype)\n- [`ItemType`](#itemtype)\n- [`StepType`](#steptype)\n- [`StepJourney`](#stepjourney)\n- [`ECPDetails`](#ecpdetails)\n- [`StepDescription`](#stepdescription)\n- [`MaxAllowedLimit`](#maxallowedlimit)\n- [`DefinitionNotFoundResp`](#definitionnotfoundresp)\n- [`ClosingReasonNotFoundResp`](#closingreasonnotfoundresp)\n- [`ChangeReasonStatusReq`](#changereasonstatusreq)\n- [`ClosingReasons`](#closingreasons)\n- [`ClosingReason`](#closingreason)\n- [`ClosingReasonsStatus`](#closingreasonsstatus)\n- [`ClosingReasonsIds`](#closingreasonsids)\n- [`ClosingReasonId`](#closingreasonid)\n- [`ErrorResp`](#errorresp)\n- [`UpdateEntityAttributes`](#updateentityattributes)\n- [`EntitySync`](#entitysync)\n- [`DynamicDueDate`](#dynamicduedate)\n- [`StepRequirement`](#steprequirement)\n- [`FlowTemplateExport`](#flowtemplateexport)\n- [`FlowTemplateImportResult`](#flowtemplateimportresult)\n\n### `getMaxAllowedLimit`\n\nGet limits and number of created executions for an Organization.\n\n`GET /v1/workflows/limits/max-allowed`\n\n```ts\nconst { data } = await client.getMaxAllowedLimit()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "currentNoOfWorkflows": 0,\n "maxAllowed": 0\n}\n```\n\n</details>\n\n---\n\n### `getDefinitions`\n\nRetrieve all Workflow Definitions from an Organization\n\n`GET /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.getDefinitions()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {},\n {}\n ],\n "closingReasons": [\n {}\n ],\n "updateEntityAttributes": [\n {}\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n }\n]\n```\n\n</details>\n\n---\n\n### `createDefinition`\n\nCreate a Workflow Definition.\n\n`POST /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.createDefinition(\n null,\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `listFlowTemplates`\n\nList all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values.\n\n`GET /v2/flows/templates`\n\n```ts\nconst { data } = await client.listFlowTemplates({\n trigger_type: \'example\',\n trigger_source_id: \'example\',\n trigger_schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {},\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [],\n "phases": [],\n "tasks": [],\n "edges": [],\n "closing_reasons": [],\n "entity_sync": [],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createFlowTemplate`\n\nCreate a new Flow Template.\n\n`POST /v2/flows/templates`\n\n```ts\nconst { data } = await client.createFlowTemplate(\n null,\n {\n id: \'string\',\n org_id: \'string\',\n name: \'string\',\n description: \'string\',\n trigger: {\n type: \'automation\',\n automation_id: \'g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg\'\n },\n enabled: true,\n version: 2,\n created_at: \'2021-04-27T12:01:13.000Z\',\n updated_at: \'2021-04-27T12:01:13.000Z\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n available_in_ecp: true,\n additional_triggers: [\n {\n id: \'string\',\n type: \'manual\',\n entity_schema: \'string\'\n },\n {\n id: \'string\',\n type: \'automation\',\n automation_id: \'string\',\n trigger_config: [ /* ... */ ]\n },\n /* ... 2 more */\n ],\n phases: [\n {\n id: \'string\',\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n assigned_to: [\'string\'],\n taxonomies: [\'string\']\n }\n ],\n tasks: [\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `searchFlowTemplates`\n\nSearch for flow templates by name, trigger type, enabled status, and more.\n\n`POST /v2/flows/templates:search`\n\n```ts\nconst { data } = await client.searchFlowTemplates(\n null,\n {\n name: \'string\',\n definition_id: \'string\',\n trigger_type: \'journey_submission\',\n enabled: true,\n from: 0,\n size: 0,\n sort_by: \'updated_at\',\n sort_order: \'desc\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {},\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [],\n "phases": [],\n "tasks": [],\n "edges": [],\n "closing_reasons": [],\n "entity_sync": [],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getFlowTemplate`\n\nGet specific FLow template for a customer\n\n`GET /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.getFlowTemplate({\n flowId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `updateFlowTemplate`\n\nUpdate Flow Template.\n\n`PUT /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.updateFlowTemplate(\n {\n flowId: \'example\',\n },\n {\n id: \'string\',\n org_id: \'string\',\n name: \'string\',\n description: \'string\',\n trigger: {\n type: \'automation\',\n automation_id: \'g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg\'\n },\n enabled: true,\n version: 2,\n created_at: \'2021-04-27T12:01:13.000Z\',\n updated_at: \'2021-04-27T12:01:13.000Z\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n available_in_ecp: true,\n additional_triggers: [\n {\n id: \'string\',\n type: \'manual\',\n entity_schema: \'string\'\n },\n {\n id: \'string\',\n type: \'automation\',\n automation_id: \'string\',\n trigger_config: [ /* ... */ ]\n },\n /* ... 2 more */\n ],\n phases: [\n {\n id: \'string\',\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n assigned_to: [\'string\'],\n taxonomies: [\'string\']\n }\n ],\n tasks: [\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `deleteFlowTemplate`\n\nDelete Flow Template.\n\n`DELETE /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.deleteFlowTemplate({\n flowId: \'example\',\n})\n```\n\n---\n\n### `duplicateFlowTemplate`\n\nDuplicate a Flow Template from an existing workflow.\n\n`POST /v2/flows/templates/{flowId}/duplicate`\n\n```ts\nconst { data } = await client.duplicateFlowTemplate({\n flowId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `exportFlowTemplate`\n\nExport a Flow Template with all referenced automations resolved and bundled alongside.\n\n`GET /v2/flows/templates/{flowId}/export`\n\n```ts\nconst { data } = await client.exportFlowTemplate({\n flowId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_resolved_automations": {}\n}\n```\n\n</details>\n\n---\n\n### `importFlowTemplate`\n\nImport a Flow Template from an export payload. Creates all automations and the flow in the caller\'s organization.\n\n`POST /v2/flows/templates/import`\n\n```ts\nconst { data } = await client.importFlowTemplate(\n null,\n {\n id: \'string\',\n org_id: \'string\',\n name: \'string\',\n description: \'string\',\n trigger: {\n type: \'automation\',\n automation_id: \'g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg\'\n },\n enabled: true,\n version: 2,\n created_at: \'2021-04-27T12:01:13.000Z\',\n updated_at: \'2021-04-27T12:01:13.000Z\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n available_in_ecp: true,\n additional_triggers: [\n {\n id: \'string\',\n type: \'manual\',\n entity_schema: \'string\'\n },\n {\n id: \'string\',\n type: \'automation\',\n automation_id: \'string\',\n trigger_config: [ /* ... */ ]\n },\n /* ... 2 more */\n ],\n phases: [\n {\n id: \'string\',\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n assigned_to: [\'string\'],\n taxonomies: [\'string\']\n }\n ],\n tasks: [\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _resolved_automations: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "flow": {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {},\n {}\n ],\n "phases": [\n {}\n ],\n "tasks": [\n {},\n {}\n ],\n "edges": [\n {}\n ],\n "closing_reasons": [\n {}\n ],\n "entity_sync": [\n {}\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n },\n "_id_mappings": {\n "flow_id": {\n "old": "string",\n "new": "string"\n },\n "task_ids": {},\n "automation_ids": {}\n }\n}\n```\n\n</details>\n\n---\n\n### `getDefinition`\n\nGet specific Definition by id from the Organization.\n\n`GET /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.getDefinition({\n definitionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `updateDefinition`\n\nUpdate Workflow Definition.\n\n`PUT /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.updateDefinition(\n {\n definitionId: \'example\',\n },\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `deleteDefinition`\n\nDelete Workflow Definition.\n\n`DELETE /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.deleteDefinition({\n definitionId: \'example\',\n})\n```\n\n---\n\n### `getAllClosingReasons`\n\nGet all Closing Reasons defined in the organization by default all Active.\n\n`GET /v1/workflows/closing-reasons`\n\n```ts\nconst { data } = await client.getAllClosingReasons({\n includeInactive: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createClosingReason`\n\nA created Closing Reason is stored for the organization and will be displayed in the library of reasons.\n\n`POST /v1/workflows/closing-reasons`\n\n```ts\nconst { data } = await client.createClosingReason(\n null,\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `getClosingReason`\n\nGet specific closing reason by id from the organisation.\n\n`GET /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.getClosingReason({\n reasonId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateClosingReason`\n\nUpdate an existing closing reason\n\n`PATCH /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.updateClosingReason(\n {\n reasonId: \'example\',\n },\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteClosingReason`\n\nPermanently delete a closing reason (Using INACTIVE status is recommended instead)\n\n`DELETE /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.deleteClosingReason({\n reasonId: \'example\',\n})\n```\n\n---\n\n### `changeReasonStatus`\n\nChange the status of a Closing Reason (eg. ACTIVE to INACTIVE).\n\n`PATCH /v1/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.changeReasonStatus(\n {\n reasonId: \'example\',\n },\n {\n status: \'ACTIVE\'\n },\n)\n```\n\n---\n\n### `getWorkflowClosingReasons`\n\nReturns all closing reasons defined for the workflow.\n\n`GET /v1/workflows/definitions/{definitionId}/closing-reasons`\n\n```ts\nconst { data } = await client.getWorkflowClosingReasons({\n definitionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "x739cew"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `setWorkflowClosingReasons`\n\nSets which closing reasons are defined for this workflow, based on the entire closing reasons catalog.\n\n`PATCH /v1/workflows/definitions/{definitionId}/closing-reasons`\n\n```ts\nconst { data } = await client.setWorkflowClosingReasons(\n {\n definitionId: \'example\',\n },\n {\n reasons: [\n {\n id: \'x739cew\'\n }\n ]\n },\n)\n```\n\n---\n\n## Schemas\n\n### `FlowTemplateBase`\n\n```ts\ntype FlowTemplateBase = {\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n tasks: Array<{\n id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n due_date?: string\n due_date_config?: {\n // ...\n}\n```\n\n### `FlowTemplate`\n\n```ts\ntype FlowTemplate = {\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n tasks: Array<{\n id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n due_date?: string\n due_date_config?: {\n // ...\n}\n```\n\n### `Version`\n\nVersion of the workflow schema.\n\n- `v1` \u2013 *Deprecated*. The initial version of workflows with limited structure and automation capabilities. \n- `v2` \u2013 Linear workflows. Supports sequential task execution with basic automation triggers. \n- `v3` \u2013 Advanced workflows. Adds support for branching logic\n\n```ts\ntype Version = "v1" | "v2" | "v3"\n```\n\n### `Trigger`\n\n```ts\ntype Trigger = {\n id?: string\n type: "manual"\n entity_schema?: string\n} | {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: string\n configuration?: Record<string, unknown>\n }>\n} | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n} | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n}\n```\n\n### `ManualTrigger`\n\n```ts\ntype ManualTrigger = {\n id?: string\n type: "manual"\n entity_schema?: string\n}\n```\n\n### `AutomationTrigger`\n\n```ts\ntype AutomationTrigger = {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: string\n configuration?: Record<string, unknown>\n }>\n}\n```\n\n### `JourneyAutomationTrigger`\n\n```ts\ntype JourneyAutomationTrigger = {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n}\n```\n\n### `JourneySubmissionTrigger`\n\n```ts\ntype JourneySubmissionTrigger = {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n}\n```\n\n### `CreateFlowTemplate`\n\n```ts\ntype CreateFlowTemplate = {\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n tasks: Array<{\n id: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n due_date?: string\n due_date_config?: {\n // ...\n}\n```\n\n### `SearchFlowTemplates`\n\n```ts\ntype SearchFlowTemplates = {\n name?: string\n definition_id?: string\n trigger_type?: "journey_submission" | "manual" | "automation"\n enabled?: boolean\n from?: number\n size?: number\n sort_by?: "created_at" | "updated_at"\n sort_order?: "asc" | "desc"\n}\n```\n\n### `FlowTemplatesList`\n\n```ts\ntype FlowTemplatesList = {\n results: Array<{\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }>\n phases?: Array<{\n id: { ... }\n name: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n assigned_to?: { ... }\n taxonomies?: { ... }\n }>\n tasks: Array<{\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n taxonomies?: { ... }\n phase_id?: { ... }\n task_type: { ... }\n } | {\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n taxonomies?: { ... }\n phase_id?: { ... }\n task_type: { ... }\n automation_config: { ... }\n // ...\n}\n```\n\n### `FlowTemplateId`\n\nShort unique id (length 8) to identify the Flow Template.\n\n```ts\ntype FlowTemplateId = string\n```\n\n### `Task`\n\n```ts\ntype Task = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n} | {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n // ...\n}\n```\n\n### `ManualTask`\n\n```ts\ntype ManualTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `AutomationTask`\n\n```ts\ntype AutomationTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n automation_config: {\n flow_id?: string\n action_config?: {\n type: { ... }\n config?: { ... }\n }\n }\n trigger_mode?: "manual" | "automatic"\n schedule?: {\n mode?: "immediate"\n } | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n } | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n }\n created_automatically?: boolean\n}\n```\n\n### `AutomationConfig`\n\nConfiguration for automation execution to run\n\n```ts\ntype AutomationConfig = {\n flow_id?: string\n action_config?: {\n type: string\n config?: Record<string, unknown>\n }\n}\n```\n\n### `AiAgentTask`\n\n```ts\ntype AiAgentTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n agent_config?: {\n agent_id: string\n }\n}\n```\n\n### `AgentConfig`\n\nConfiguration for AI Agent to run\n\n```ts\ntype AgentConfig = {\n agent_id: string\n}\n```\n\n### `TriggerMode`\n\n```ts\ntype TriggerMode = "manual" | "automatic"\n```\n\n### `ActionSchedule`\n\n```ts\ntype ActionSchedule = {\n mode?: "immediate"\n} | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n} | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `ImmediateSchedule`\n\n```ts\ntype ImmediateSchedule = {\n mode?: "immediate"\n}\n```\n\n### `DelayedSchedule`\n\n```ts\ntype DelayedSchedule = {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n}\n```\n\n### `RelativeSchedule`\n\n```ts\ntype RelativeSchedule = {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `DecisionTask`\n\n```ts\ntype DecisionTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n trigger_mode: "manual" | "automatic"\n conditions: Array<{\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: { ... }\n source: { ... }\n operator: { ... }\n values: { ... }\n }>\n }>\n schedule?: {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n } | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n }\n loop_config?: {\n loop_branch_id: string\n exit_branch_id: string\n max_iterations: number\n }\n}\n```\n\n### `TaskBase`\n\n```ts\ntype TaskBase = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `Phase`\n\n```ts\ntype Phase = {\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string\n }>\n taxonomies?: string[]\n}\n```\n\n### `VariableAssignment`\n\nRepresents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.\n\n```ts\ntype VariableAssignment = {\n variable: string\n value?: string\n}\n```\n\n### `TaskType`\n\n```ts\ntype TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n```\n\n### `Edge`\n\n```ts\ntype Edge = {\n id: string\n from_id: string\n to_id: string\n condition_id?: string\n none_met?: boolean\n}\n```\n\n### `Condition`\n\n```ts\ntype Condition = {\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: string\n source: {\n id?: { ... }\n origin?: { ... }\n origin_type?: { ... }\n schema?: { ... }\n attribute?: { ... }\n attribute_type?: { ... }\n attribute_repeatable?: { ... }\n attribute_operation?: { ... }\n attribute_sub_field?: { ... }\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n }>\n}\n```\n\n### `Statement`\n\n```ts\ntype Statement = {\n id: string\n source: {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n}\n```\n\n### `EvaluationSource`\n\n```ts\ntype EvaluationSource = {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n}\n```\n\n### `Operator`\n\n```ts\ntype Operator = "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n```\n\n### `DueDateConfig`\n\nSet due date for the task based on a dynamic condition\n\n```ts\ntype DueDateConfig = {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED"\n task_id?: string\n phase_id?: string\n}\n```\n\n### `TimeUnit`\n\n```ts\ntype TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months"\n```\n\n### `EnableRequirement`\n\ndescribe the requirement for a task to be enabled\n\n```ts\ntype EnableRequirement = {\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n}\n```\n\n### `WorkflowDefinition`\n\n```ts\ntype WorkflowDefinition = {\n id?: string\n name: string\n description?: string\n creationTime?: string\n enabled?: boolean\n lastUpdateTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n assignedTo?: string[]\n enableECPWorkflow?: boolean\n flow: Array<{\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n assignedTo?: string[]\n steps: Array<{\n id?: { ... }\n name: { ... }\n description?: { ... }\n executionType?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n order: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n userIds?: { ... }\n requirements?: { ... }\n assignedTo?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n taxonomies?: string[]\n }>\n closingReasons?: Array<{\n // ...\n}\n```\n\n### `Step`\n\nAction that needs to be done in a Workflow\n\n```ts\ntype Step = {\n id?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n taxonomies?: string[]\n}\n```\n\n### `Section`\n\nA group of Steps that define the progress of the Workflow\n\n```ts\ntype Section = {\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n assignedTo?: string[]\n steps: Array<{\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n taxonomies?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `TriggerType`\n\n```ts\ntype TriggerType = "MANUAL" | "AUTOMATIC"\n```\n\n### `ItemType`\n\n```ts\ntype ItemType = "STEP" | "SECTION"\n```\n\n### `StepType`\n\n```ts\ntype StepType = "MANUAL" | "AUTOMATION"\n```\n\n### `StepJourney`\n\n```ts\ntype StepJourney = {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n}\n```\n\n### `ECPDetails`\n\nDetails regarding ECP for the workflow step\n\n```ts\ntype ECPDetails = {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n}\n```\n\n### `StepDescription`\n\nLonger information regarding Task\n\n```ts\ntype StepDescription = {\n enabled?: boolean\n value?: string\n}\n```\n\n### `MaxAllowedLimit`\n\n```ts\ntype MaxAllowedLimit = {\n currentNoOfWorkflows?: number\n maxAllowed?: number\n}\n```\n\n### `DefinitionNotFoundResp`\n\nDefinition could be not found\n\n```ts\ntype DefinitionNotFoundResp = {\n message?: string\n}\n```\n\n### `ClosingReasonNotFoundResp`\n\nClosing reason could be not found\n\n```ts\ntype ClosingReasonNotFoundResp = {\n message?: string\n}\n```\n\n### `ChangeReasonStatusReq`\n\n```ts\ntype ChangeReasonStatusReq = {\n status: "ACTIVE" | "INACTIVE"\n}\n```\n\n### `ClosingReasons`\n\n```ts\ntype ClosingReasons = {\n reasons: Array<{\n id?: string\n title: string\n status: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n }>\n}\n```\n\n### `ClosingReason`\n\nOne Closing reason for a workflow\n\n```ts\ntype ClosingReason = {\n id?: string\n title: string\n status: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n}\n```\n\n### `ClosingReasonsStatus`\n\n```ts\ntype ClosingReasonsStatus = "ACTIVE" | "INACTIVE"\n```\n\n### `ClosingReasonsIds`\n\n```ts\ntype ClosingReasonsIds = {\n reasons: Array<{\n id: string\n }>\n}\n```\n\n### `ClosingReasonId`\n\n```ts\ntype ClosingReasonId = {\n id: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `UpdateEntityAttributes`\n\n```ts\ntype UpdateEntityAttributes = {\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `EntitySync`\n\n```ts\ntype EntitySync = {\n trigger: {\n event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress"\n filter?: {\n task_template_id?: { ... }\n phase_template_id?: { ... }\n }\n }\n value: {\n source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value"\n value?: string\n }\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `DynamicDueDate`\n\nset a Duedate for a step then a specific\n\n```ts\ntype DynamicDueDate = {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n}\n```\n\n### `StepRequirement`\n\ndescribe the requirement for step enablement\n\n```ts\ntype StepRequirement = {\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n}\n```\n\n### `FlowTemplateExport`\n\n```ts\ntype FlowTemplateExport = {\n _resolved_automations?: Record<string, object>\n}\n```\n\n### `FlowTemplateImportResult`\n\n```ts\ntype FlowTemplateImportResult = {\n flow?: {\n id?: string\n org_id?: string\n name: string\n description?: string\n trigger?: {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }>\n phases?: Array<{\n id: { ... }\n name: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n assigned_to?: { ... }\n taxonomies?: { ... }\n }>\n tasks: Array<{\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n taxonomies?: { ... }\n phase_id?: { ... }\n task_type: { ... }\n } | {\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n taxonomies?: { ... }\n phase_id?: { ... }\n task_type: { ... }\n automation_config: { ... }\n // ...\n}\n```\n';
5
-
6
-
7
- exports.default = workflow_definition_default;