@epilot/sdk 2.2.4 → 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.
- package/definitions/workflow-definition-runtime.json +1 -1
- package/definitions/workflow-definition.json +72 -201
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-management.cjs +6 -6
- package/dist/apis/data-management.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/erp-integration.cjs +6 -6
- package/dist/apis/erp-integration.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +8 -8
- package/dist/apis/workflow-definition.d.cts +2 -2
- package/dist/apis/workflow-definition.d.ts +2 -2
- package/dist/apis/workflow-definition.js +2 -2
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/chunk-43GJY2EB.js +14 -0
- package/dist/chunk-CYS6QBW6.cjs +14 -0
- package/dist/{chunk-I3TEIPPB.js → chunk-OTSGPLDM.js} +2 -2
- package/dist/{chunk-KLVWUQMJ.cjs → chunk-ZXLTSQYE.cjs} +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/workflow-definition-MBOMPMCG.js +7 -0
- package/dist/workflow-definition-SPAHD3HS.cjs +7 -0
- package/dist/{workflow-definition-runtime-VRND6VQR.cjs → workflow-definition-runtime-GACBV4WM.cjs} +2 -2
- package/dist/{workflow-definition-runtime-S7AZHOU7.js → workflow-definition-runtime-OVXRSE34.js} +1 -1
- package/dist/{workflow-definition.d-CE3kk9gl.d.cts → workflow-definition.d-CtmE-ymB.d.cts} +52 -211
- package/dist/{workflow-definition.d-CE3kk9gl.d.ts → workflow-definition.d-CtmE-ymB.d.ts} +52 -211
- package/docs/workflow-definition.md +121 -487
- package/package.json +1 -1
- package/dist/chunk-46HU6232.cjs +0 -14
- package/dist/chunk-5JPM6YUD.js +0 -14
- package/dist/workflow-definition-B6ELOZUR.cjs +0 -7
- package/dist/workflow-definition-D24CRCK2.js +0 -7
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCYS6QBW6cjs = require('../chunk-CYS6QBW6.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZXLTSQYEcjs = require('../chunk-ZXLTSQYE.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/workflow-definition.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
|
-
const mod =
|
|
15
|
-
return
|
|
14
|
+
const mod = _chunkCYS6QBW6cjs.require_workflow_definition_runtime.call(void 0, );
|
|
15
|
+
return _chunkZXLTSQYEcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkZXLTSQYEcjs.createApiClient.call(void 0, { definition: def, apiName: "workflowDefinition" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkZXLTSQYEcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkZXLTSQYEcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "workflowDefinition" }),
|
|
28
28
|
apiName: "workflowDefinition"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var workflowDefinition = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.authorize =
|
|
38
|
+
exports.authorize = _chunkZXLTSQYEcjs.authorize; exports.createClient = createClient; exports.getClient = getClient; exports.workflowDefinition = workflowDefinition;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as ApiHandle } from '../types-ChU9Acbv.cjs';
|
|
2
2
|
export { T as TokenArg, a as authorize } from '../types-ChU9Acbv.cjs';
|
|
3
|
-
import { C as Client } from '../workflow-definition.d-
|
|
4
|
-
export { A as ActionSchedule, c as AgentConfig, d as AiAgentTask, e as AutomationConfig, f as AutomationTask, g as AutomationTrigger, h as ChangeReasonStatusReq, i as ClosingReason, j as ClosingReasonId, k as ClosingReasonNotFoundResp, l as ClosingReasons, m as ClosingReasonsIds, n as ClosingReasonsStatus, a as Components, o as Condition, p as CreateFlowTemplate, D as DecisionTask, q as DefinitionNotFoundResp, r as DelayedSchedule, s as DueDateConfig, t as DynamicDueDate, E as ECPDetails, u as Edge, v as EnableRequirement, w as EntitySync, x as ErrorResp, y as EvaluationSource, F as FlowTemplate, z as FlowTemplateBase, B as
|
|
3
|
+
import { C as Client } from '../workflow-definition.d-CtmE-ymB.cjs';
|
|
4
|
+
export { A as ActionSchedule, c as AgentConfig, d as AiAgentTask, e as AutomationConfig, f as AutomationTask, g as AutomationTrigger, h as ChangeReasonStatusReq, i as ClosingReason, j as ClosingReasonId, k as ClosingReasonNotFoundResp, l as ClosingReasons, m as ClosingReasonsIds, n as ClosingReasonsStatus, a as Components, o as Condition, p as CreateFlowTemplate, D as DecisionTask, q as DefinitionNotFoundResp, r as DelayedSchedule, s as DueDateConfig, t as DynamicDueDate, E as ECPDetails, u as Edge, v as EnableRequirement, w as EntitySync, x as ErrorResp, y as EvaluationSource, F as FlowTemplate, z as FlowTemplateBase, B as FlowTemplateId, G as FlowTemplatesList, I as ImmediateSchedule, H as ItemType, J as JourneyAutomationTrigger, K as JourneySubmissionTrigger, M as ManualTask, L as ManualTrigger, N as MaxAllowedLimit, O as OperationMethods, Q as Operator, R as PartnerDetails, P as Paths, b as PathsDictionary, S as Phase, T as RelativeSchedule, U as SearchFlowTemplates, V as Section, W as Statement, X as Step, Y as StepDescription, Z as StepJourney, _ as StepRequirement, $ as StepType, a0 as Task, a1 as TaskBase, a2 as TaskType, a3 as TimeUnit, a4 as Trigger, a5 as TriggerMode, a6 as TriggerType, a7 as UpdateEntityAttributes, a8 as VariableAssignment, a9 as Version, aa as WorkflowDefinition } from '../workflow-definition.d-CtmE-ymB.cjs';
|
|
5
5
|
export { OpenAPIClient } from 'openapi-client-axios';
|
|
6
6
|
import 'axios';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as ApiHandle } from '../types-ChU9Acbv.js';
|
|
2
2
|
export { T as TokenArg, a as authorize } from '../types-ChU9Acbv.js';
|
|
3
|
-
import { C as Client } from '../workflow-definition.d-
|
|
4
|
-
export { A as ActionSchedule, c as AgentConfig, d as AiAgentTask, e as AutomationConfig, f as AutomationTask, g as AutomationTrigger, h as ChangeReasonStatusReq, i as ClosingReason, j as ClosingReasonId, k as ClosingReasonNotFoundResp, l as ClosingReasons, m as ClosingReasonsIds, n as ClosingReasonsStatus, a as Components, o as Condition, p as CreateFlowTemplate, D as DecisionTask, q as DefinitionNotFoundResp, r as DelayedSchedule, s as DueDateConfig, t as DynamicDueDate, E as ECPDetails, u as Edge, v as EnableRequirement, w as EntitySync, x as ErrorResp, y as EvaluationSource, F as FlowTemplate, z as FlowTemplateBase, B as
|
|
3
|
+
import { C as Client } from '../workflow-definition.d-CtmE-ymB.js';
|
|
4
|
+
export { A as ActionSchedule, c as AgentConfig, d as AiAgentTask, e as AutomationConfig, f as AutomationTask, g as AutomationTrigger, h as ChangeReasonStatusReq, i as ClosingReason, j as ClosingReasonId, k as ClosingReasonNotFoundResp, l as ClosingReasons, m as ClosingReasonsIds, n as ClosingReasonsStatus, a as Components, o as Condition, p as CreateFlowTemplate, D as DecisionTask, q as DefinitionNotFoundResp, r as DelayedSchedule, s as DueDateConfig, t as DynamicDueDate, E as ECPDetails, u as Edge, v as EnableRequirement, w as EntitySync, x as ErrorResp, y as EvaluationSource, F as FlowTemplate, z as FlowTemplateBase, B as FlowTemplateId, G as FlowTemplatesList, I as ImmediateSchedule, H as ItemType, J as JourneyAutomationTrigger, K as JourneySubmissionTrigger, M as ManualTask, L as ManualTrigger, N as MaxAllowedLimit, O as OperationMethods, Q as Operator, R as PartnerDetails, P as Paths, b as PathsDictionary, S as Phase, T as RelativeSchedule, U as SearchFlowTemplates, V as Section, W as Statement, X as Step, Y as StepDescription, Z as StepJourney, _ as StepRequirement, $ as StepType, a0 as Task, a1 as TaskBase, a2 as TaskType, a3 as TimeUnit, a4 as Trigger, a5 as TriggerMode, a6 as TriggerType, a7 as UpdateEntityAttributes, a8 as VariableAssignment, a9 as Version, aa as WorkflowDefinition } from '../workflow-definition.d-CtmE-ymB.js';
|
|
5
5
|
export { OpenAPIClient } from 'openapi-client-axios';
|
|
6
6
|
import 'axios';
|
|
7
7
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_workflow_definition_runtime
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-43GJY2EB.js";
|
|
4
4
|
import {
|
|
5
5
|
authorize,
|
|
6
6
|
createApiClient,
|
|
7
7
|
createApiHandle,
|
|
8
8
|
expand
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-OTSGPLDM.js";
|
|
10
10
|
import "../chunk-YPSWSI3M.js";
|
|
11
11
|
|
|
12
12
|
// src/apis/workflow-definition.ts
|
package/dist/apis/workflow.cjs
CHANGED
|
@@ -6,25 +6,25 @@ var _chunkZI33AJQ5cjs = require('../chunk-ZI33AJQ5.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZXLTSQYEcjs = require('../chunk-ZXLTSQYE.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/workflow.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkZI33AJQ5cjs.require_workflow_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkZXLTSQYEcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkZXLTSQYEcjs.createApiClient.call(void 0, { definition: def, apiName: "workflow" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkZXLTSQYEcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkZXLTSQYEcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "workflow" }),
|
|
28
28
|
apiName: "workflow"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var workflow = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.authorize =
|
|
38
|
+
exports.authorize = _chunkZXLTSQYEcjs.authorize; exports.createClient = createClient; exports.getClient = getClient; exports.workflow = workflow;
|
package/dist/apis/workflow.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
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]]], ["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
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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]]], ["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;
|
|
@@ -64,7 +64,7 @@ var globImport_docs = __glob({
|
|
|
64
64
|
"./docs/user.json": () => import("./user-EIEOI3OG.js"),
|
|
65
65
|
"./docs/validation-rules.json": () => import("./validation-rules-P6F5P73P.js"),
|
|
66
66
|
"./docs/webhooks.json": () => import("./webhooks-RTOU3MS5.js"),
|
|
67
|
-
"./docs/workflow-definition.json": () => import("./workflow-definition-
|
|
67
|
+
"./docs/workflow-definition.json": () => import("./workflow-definition-MBOMPMCG.js"),
|
|
68
68
|
"./docs/workflow.json": () => import("./workflow-3LLURW3H.js")
|
|
69
69
|
});
|
|
70
70
|
|
|
@@ -172,7 +172,7 @@ var globImport_definitions_json = __glob({
|
|
|
172
172
|
"./definitions/validation-rules.json": () => import("./validation-rules-GCI64B57.js"),
|
|
173
173
|
"./definitions/webhooks-runtime.json": () => import("./webhooks-runtime-XCQYIGQK.js"),
|
|
174
174
|
"./definitions/webhooks.json": () => import("./webhooks-XXLU2KWP.js"),
|
|
175
|
-
"./definitions/workflow-definition-runtime.json": () => import("./workflow-definition-runtime-
|
|
175
|
+
"./definitions/workflow-definition-runtime.json": () => import("./workflow-definition-runtime-OVXRSE34.js"),
|
|
176
176
|
"./definitions/workflow-definition.json": () => import("./workflow-definition-VFYWBQQ3.js"),
|
|
177
177
|
"./definitions/workflow-runtime.json": () => import("./workflow-runtime-RLZO2OQB.js"),
|
|
178
178
|
"./definitions/workflow.json": () => import("./workflow-VLNZNE3S.js")
|
|
@@ -64,7 +64,7 @@ var globImport_docs = _chunkNJK5F5TFcjs.__glob.call(void 0, {
|
|
|
64
64
|
"./docs/user.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./user-NJJ7XVKB.cjs"))),
|
|
65
65
|
"./docs/validation-rules.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./validation-rules-VDU3CIZV.cjs"))),
|
|
66
66
|
"./docs/webhooks.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./webhooks-H3RT33BF.cjs"))),
|
|
67
|
-
"./docs/workflow-definition.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-definition-
|
|
67
|
+
"./docs/workflow-definition.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-definition-SPAHD3HS.cjs"))),
|
|
68
68
|
"./docs/workflow.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-RAGQDYXT.cjs")))
|
|
69
69
|
});
|
|
70
70
|
|
|
@@ -172,7 +172,7 @@ var globImport_definitions_json = _chunkNJK5F5TFcjs.__glob.call(void 0, {
|
|
|
172
172
|
"./definitions/validation-rules.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./validation-rules-AYCAOVDZ.cjs"))),
|
|
173
173
|
"./definitions/webhooks-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./webhooks-runtime-EBM4M3SU.cjs"))),
|
|
174
174
|
"./definitions/webhooks.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./webhooks-L3FXPRKT.cjs"))),
|
|
175
|
-
"./definitions/workflow-definition-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-definition-runtime-
|
|
175
|
+
"./definitions/workflow-definition-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-definition-runtime-GACBV4WM.cjs"))),
|
|
176
176
|
"./definitions/workflow-definition.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-definition-7BA4H6W3.cjs"))),
|
|
177
177
|
"./definitions/workflow-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-runtime-WCJ7NRTH.cjs"))),
|
|
178
178
|
"./definitions/workflow.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-YJHUCGVK.cjs")))
|
package/dist/index.cjs
CHANGED
|
@@ -15,7 +15,7 @@ var _chunkJIUTCNTBcjs = require('./chunk-JIUTCNTB.cjs');
|
|
|
15
15
|
var _chunkHHMXS5NCcjs = require('./chunk-HHMXS5NC.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkCYS6QBW6cjs = require('./chunk-CYS6QBW6.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkZI33AJQ5cjs = require('./chunk-ZI33AJQ5.cjs');
|
|
@@ -143,7 +143,7 @@ var _chunkRXMOHUBPcjs = require('./chunk-RXMOHUBP.cjs');
|
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
var
|
|
146
|
+
var _chunkZXLTSQYEcjs = require('./chunk-ZXLTSQYE.cjs');
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
|
|
@@ -210,7 +210,7 @@ var resolveClient = (params) => {
|
|
|
210
210
|
}
|
|
211
211
|
if (!entry.instance) {
|
|
212
212
|
const definition = entry.loader();
|
|
213
|
-
entry.instance =
|
|
213
|
+
entry.instance = _chunkZXLTSQYEcjs.createApiClient.call(void 0, {
|
|
214
214
|
definition,
|
|
215
215
|
token: state.token,
|
|
216
216
|
headers: state.globalHeaders,
|
|
@@ -243,7 +243,7 @@ var resetAllClients = (registry) => {
|
|
|
243
243
|
};
|
|
244
244
|
|
|
245
245
|
// src/apis/_registry.ts
|
|
246
|
-
var expandDef = (mod) =>
|
|
246
|
+
var expandDef = (mod) => _chunkZXLTSQYEcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
247
247
|
var registerBuiltinApis = (registry) => {
|
|
248
248
|
registerApi({
|
|
249
249
|
registry,
|
|
@@ -473,7 +473,7 @@ var registerBuiltinApis = (registry) => {
|
|
|
473
473
|
registerApi({
|
|
474
474
|
registry,
|
|
475
475
|
name: "workflowDefinition",
|
|
476
|
-
loader: () => expandDef(
|
|
476
|
+
loader: () => expandDef(_chunkCYS6QBW6cjs.require_workflow_definition_runtime.call(void 0, ))
|
|
477
477
|
});
|
|
478
478
|
};
|
|
479
479
|
|
|
@@ -545,9 +545,9 @@ var createSDK = () => {
|
|
|
545
545
|
const available = [...registry.keys()].join(", ");
|
|
546
546
|
throw new Error(`Unknown API: "${name}". Available: ${available}`);
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return _chunkZXLTSQYEcjs.createApiHandle.call(void 0, {
|
|
549
549
|
resolveClient: () => resolveClient({ registry, name, state }),
|
|
550
|
-
createClient: () =>
|
|
550
|
+
createClient: () => _chunkZXLTSQYEcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
|
|
551
551
|
apiName: name
|
|
552
552
|
});
|
|
553
553
|
};
|
|
@@ -595,9 +595,9 @@ var createSDK = () => {
|
|
|
595
595
|
return interceptorUse;
|
|
596
596
|
}
|
|
597
597
|
case "help":
|
|
598
|
-
return (apiName) =>
|
|
598
|
+
return (apiName) => _chunkZXLTSQYEcjs.help.call(void 0, apiName);
|
|
599
599
|
case "openapi":
|
|
600
|
-
return (apiName) =>
|
|
600
|
+
return (apiName) => _chunkZXLTSQYEcjs.openapi.call(void 0, apiName);
|
|
601
601
|
case "then":
|
|
602
602
|
case "catch":
|
|
603
603
|
case "finally":
|
|
@@ -624,4 +624,4 @@ var epilot = createSDK();
|
|
|
624
624
|
|
|
625
625
|
|
|
626
626
|
|
|
627
|
-
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize =
|
|
627
|
+
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkZXLTSQYEcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkZXLTSQYEcjs.help; exports.openapi = _chunkZXLTSQYEcjs.openapi;
|
package/dist/index.d.cts
CHANGED
|
@@ -48,7 +48,7 @@ import { C as Client$F } from './user.d-CXqM751M.cjs';
|
|
|
48
48
|
import { C as Client$G } from './validation-rules.d-Db5c5zTf.cjs';
|
|
49
49
|
import { C as Client$H } from './webhooks.d-pLHIL_io.cjs';
|
|
50
50
|
import { C as Client$I } from './workflow.d-DvhTpEtU.cjs';
|
|
51
|
-
import { C as Client$J } from './workflow-definition.d-
|
|
51
|
+
import { C as Client$J } from './workflow-definition.d-CtmE-ymB.cjs';
|
|
52
52
|
|
|
53
53
|
type SDKClientMap = {
|
|
54
54
|
accessToken: Client;
|
package/dist/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ import { C as Client$F } from './user.d-CXqM751M.js';
|
|
|
48
48
|
import { C as Client$G } from './validation-rules.d-Db5c5zTf.js';
|
|
49
49
|
import { C as Client$H } from './webhooks.d-pLHIL_io.js';
|
|
50
50
|
import { C as Client$I } from './workflow.d-DvhTpEtU.js';
|
|
51
|
-
import { C as Client$J } from './workflow-definition.d-
|
|
51
|
+
import { C as Client$J } from './workflow-definition.d-CtmE-ymB.js';
|
|
52
52
|
|
|
53
53
|
type SDKClientMap = {
|
|
54
54
|
accessToken: Client;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-A7AAVJGM.js";
|
|
16
16
|
import {
|
|
17
17
|
require_workflow_definition_runtime
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-43GJY2EB.js";
|
|
19
19
|
import {
|
|
20
20
|
require_workflow_runtime
|
|
21
21
|
} from "./chunk-PSQMDY3B.js";
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
expand,
|
|
144
144
|
help,
|
|
145
145
|
openapi
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-OTSGPLDM.js";
|
|
147
147
|
import {
|
|
148
148
|
__require
|
|
149
149
|
} from "./chunk-YPSWSI3M.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/workflow-definition.json
|
|
4
|
+
var workflow_definition_default = '# Workflows Definitions\n\n- **Base URL:** `https://workflows-definition.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/workflow-definition](https://docs.epilot.io/api/workflow-definition)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.workflowDefinition.getMaxAllowedLimit(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/workflow-definition\'\n\nconst workflowDefinitionClient = getClient()\nauthorize(workflowDefinitionClient, () => \'<token>\')\nconst { data } = await workflowDefinitionClient.getMaxAllowedLimit(...)\n```\n\n## Operations\n\n**Workflows**\n- [`getMaxAllowedLimit`](#getmaxallowedlimit)\n- [`getDefinitions`](#getdefinitions)\n- [`createDefinition`](#createdefinition)\n- [`getDefinition`](#getdefinition)\n- [`updateDefinition`](#updatedefinition)\n- [`deleteDefinition`](#deletedefinition)\n- [`getWorkflowClosingReasons`](#getworkflowclosingreasons)\n- [`setWorkflowClosingReasons`](#setworkflowclosingreasons)\n\n**Flows V2**\n- [`listFlowTemplates`](#listflowtemplates)\n- [`createFlowTemplate`](#createflowtemplate)\n- [`searchFlowTemplates`](#searchflowtemplates)\n- [`getFlowTemplate`](#getflowtemplate)\n- [`updateFlowTemplate`](#updateflowtemplate)\n- [`deleteFlowTemplate`](#deleteflowtemplate)\n- [`duplicateFlowTemplate`](#duplicateflowtemplate)\n\n**Closing Reason**\n- [`getAllClosingReasons`](#getallclosingreasons)\n- [`createClosingReason`](#createclosingreason)\n- [`getClosingReason`](#getclosingreason)\n- [`updateClosingReason`](#updateclosingreason)\n- [`deleteClosingReason`](#deleteclosingreason)\n- [`changeReasonStatus`](#changereasonstatus)\n\n**Schemas**\n- [`FlowTemplateBase`](#flowtemplatebase)\n- [`FlowTemplate`](#flowtemplate)\n- [`Version`](#version)\n- [`Trigger`](#trigger)\n- [`ManualTrigger`](#manualtrigger)\n- [`AutomationTrigger`](#automationtrigger)\n- [`JourneyAutomationTrigger`](#journeyautomationtrigger)\n- [`JourneySubmissionTrigger`](#journeysubmissiontrigger)\n- [`CreateFlowTemplate`](#createflowtemplate)\n- [`SearchFlowTemplates`](#searchflowtemplates)\n- [`FlowTemplatesList`](#flowtemplateslist)\n- [`FlowTemplateId`](#flowtemplateid)\n- [`Task`](#task)\n- [`ManualTask`](#manualtask)\n- [`AutomationTask`](#automationtask)\n- [`AutomationConfig`](#automationconfig)\n- [`AiAgentTask`](#aiagenttask)\n- [`AgentConfig`](#agentconfig)\n- [`TriggerMode`](#triggermode)\n- [`ActionSchedule`](#actionschedule)\n- [`ImmediateSchedule`](#immediateschedule)\n- [`DelayedSchedule`](#delayedschedule)\n- [`RelativeSchedule`](#relativeschedule)\n- [`DecisionTask`](#decisiontask)\n- [`TaskBase`](#taskbase)\n- [`Phase`](#phase)\n- [`VariableAssignment`](#variableassignment)\n- [`TaskType`](#tasktype)\n- [`Edge`](#edge)\n- [`Condition`](#condition)\n- [`Statement`](#statement)\n- [`EvaluationSource`](#evaluationsource)\n- [`Operator`](#operator)\n- [`DueDateConfig`](#duedateconfig)\n- [`TimeUnit`](#timeunit)\n- [`EnableRequirement`](#enablerequirement)\n- [`WorkflowDefinition`](#workflowdefinition)\n- [`Step`](#step)\n- [`Section`](#section)\n- [`TriggerType`](#triggertype)\n- [`ItemType`](#itemtype)\n- [`StepType`](#steptype)\n- [`StepJourney`](#stepjourney)\n- [`ECPDetails`](#ecpdetails)\n- [`PartnerDetails`](#partnerdetails)\n- [`StepDescription`](#stepdescription)\n- [`MaxAllowedLimit`](#maxallowedlimit)\n- [`DefinitionNotFoundResp`](#definitionnotfoundresp)\n- [`ClosingReasonNotFoundResp`](#closingreasonnotfoundresp)\n- [`ChangeReasonStatusReq`](#changereasonstatusreq)\n- [`ClosingReasons`](#closingreasons)\n- [`ClosingReason`](#closingreason)\n- [`ClosingReasonsStatus`](#closingreasonsstatus)\n- [`ClosingReasonsIds`](#closingreasonsids)\n- [`ClosingReasonId`](#closingreasonid)\n- [`ErrorResp`](#errorresp)\n- [`UpdateEntityAttributes`](#updateentityattributes)\n- [`EntitySync`](#entitysync)\n- [`DynamicDueDate`](#dynamicduedate)\n- [`StepRequirement`](#steprequirement)\n\n### `getMaxAllowedLimit`\n\nGet limits and number of created executions for an Organization.\n\n`GET /v1/workflows/limits/max-allowed`\n\n```ts\nconst { data } = await client.getMaxAllowedLimit()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "currentNoOfWorkflows": 0,\n "maxAllowed": 0\n}\n```\n\n</details>\n\n---\n\n### `getDefinitions`\n\nRetrieve all Workflow Definitions from an Organization\n\n`GET /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.getDefinitions()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {},\n {}\n ],\n "closingReasons": [\n {}\n ],\n "updateEntityAttributes": [\n {}\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n }\n]\n```\n\n</details>\n\n---\n\n### `createDefinition`\n\nCreate a Workflow Definition.\n\n`POST /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.createDefinition(\n null,\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\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 partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\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 "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\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 "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\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 partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\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 "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\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 "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `getDefinition`\n\nGet specific Definition by id from the Organization.\n\n`GET /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.getDefinition({\n definitionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\n```\n\n</details>\n\n---\n\n### `updateDefinition`\n\nUpdate Workflow Definition.\n\n`PUT /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.updateDefinition(\n {\n definitionId: \'example\',\n },\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true\n}\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" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n 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" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n 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 (co\n\n```ts\ntype Version = "v1" | "v2" | "v3"\n```\n\n### `Trigger`\n\n```ts\ntype Trigger = {\n id?: string\n type: "manual"\n entity_schema?: string\n} | {\n id?: string\n type: "automation"\n automation_id?: string\n 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" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n 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 partner?: { ... }\n taxonomies?: { ... }\n phase_id?: { ... }\n task_type: { ... }\n } | {\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n taxonomies?: { ... }\n phase_id?: { ... }\n // ...\n}\n```\n\n### `FlowTemplateId`\n\nShort unique id (length 8) to identify the Flow Template.\n\n```ts\ntype FlowTemplateId = string\n```\n\n### `Task`\n\n```ts\ntype Task = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n} | {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n // ...\n}\n```\n\n### `ManualTask`\n\n```ts\ntype ManualTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `AutomationTask`\n\n```ts\ntype AutomationTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n automation_config: {\n flow_id?: string\n action_config?: {\n type: { ... }\n config?: { ... }\n }\n }\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" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n agent_config?: {\n agent_id: string\n }\n}\n```\n\n### `AgentConfig`\n\nConfiguration for AI Agent to run\n\n```ts\ntype AgentConfig = {\n agent_id: string\n}\n```\n\n### `TriggerMode`\n\n```ts\ntype TriggerMode = "manual" | "automatic"\n```\n\n### `ActionSchedule`\n\n```ts\ntype ActionSchedule = {\n mode?: "immediate"\n} | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n} | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `ImmediateSchedule`\n\n```ts\ntype ImmediateSchedule = {\n mode?: "immediate"\n}\n```\n\n### `DelayedSchedule`\n\n```ts\ntype DelayedSchedule = {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n}\n```\n\n### `RelativeSchedule`\n\n```ts\ntype RelativeSchedule = {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `DecisionTask`\n\n```ts\ntype DecisionTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n trigger_mode: "manual" | "automatic"\n conditions: Array<{\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: { ... }\n source: { ... }\n operator: { ... }\n values: { ... }\n value_type?: { ... }\n }>\n }>\n schedule?: {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n } | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n reference: {\n id: { ... }\n origin: { ... }\n schema?: { ... }\n attribute?: { ... }\n }\n }\n loop_config?: {\n loop_branch_id: string\n exit_branch_id: string\n max_iterations: number\n }\n}\n```\n\n### `TaskBase`\n\n```ts\ntype TaskBase = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `Phase`\n\n```ts\ntype Phase = {\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `VariableAssignment`\n\nRepresents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.\n\n```ts\ntype VariableAssignment = {\n variable: string\n value?: string[]\n}\n```\n\n### `TaskType`\n\n```ts\ntype TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n```\n\n### `Edge`\n\n```ts\ntype Edge = {\n id: string\n from_id: string\n to_id?: string\n condition_id?: string\n none_met?: boolean\n}\n```\n\n### `Condition`\n\n```ts\ntype Condition = {\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: string\n source: {\n id?: { ... }\n origin?: { ... }\n origin_type?: { ... }\n schema?: { ... }\n attribute?: { ... }\n attribute_type?: { ... }\n attribute_repeatable?: { ... }\n attribute_operation?: { ... }\n attribute_sub_field?: { ... }\n date_offset?: { ... }\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n value_type?: "static" | "relative_date"\n }>\n}\n```\n\n### `Statement`\n\n```ts\ntype Statement = {\n id: string\n source: {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n date_offset?: {\n amount?: { ... }\n unit?: { ... }\n }\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n value_type?: "static" | "relative_date"\n}\n```\n\n### `EvaluationSource`\n\n```ts\ntype EvaluationSource = {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attribute_sub_field?: string\n date_offset?: {\n amount?: number\n unit?: "days" | "months" | "years"\n }\n}\n```\n\n### `Operator`\n\n```ts\ntype Operator = "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n```\n\n### `DueDateConfig`\n\nSet due date for the task based on a dynamic condition\n\n```ts\ntype DueDateConfig = {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n}\n```\n\n### `TimeUnit`\n\n```ts\ntype TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months"\n```\n\n### `EnableRequirement`\n\ndescribe the requirement for a task to be enabled\n\n```ts\ntype EnableRequirement = {\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n}\n```\n\n### `WorkflowDefinition`\n\n```ts\ntype WorkflowDefinition = {\n id?: string\n name: string\n description?: string\n creationTime?: string\n enabled?: boolean\n lastUpdateTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n assignedTo?: string[]\n enableECPWorkflow?: boolean\n flow: Array<{\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n assignedTo?: string[]\n steps: Array<{\n id?: { ... }\n name: { ... }\n description?: { ... }\n executionType?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n order: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n userIds?: { ... }\n requirements?: { ... }\n assignedTo?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n // ...\n}\n```\n\n### `Step`\n\nAction that needs to be done in a Workflow\n\n```ts\ntype Step = {\n id?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n}\n```\n\n### `Section`\n\nA group of Steps that define the progress of the Workflow\n\n```ts\ntype Section = {\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n assignedTo?: string[]\n steps: Array<{\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n complete_task_automatically?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n }\n taxonomies?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `TriggerType`\n\n```ts\ntype TriggerType = "MANUAL" | "AUTOMATIC"\n```\n\n### `ItemType`\n\n```ts\ntype ItemType = "STEP" | "SECTION"\n```\n\n### `StepType`\n\n```ts\ntype StepType = "MANUAL" | "AUTOMATION"\n```\n\n### `StepJourney`\n\n```ts\ntype StepJourney = {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n}\n```\n\n### `ECPDetails`\n\nDetails regarding ECP for the workflow step\n\n```ts\ntype ECPDetails = {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n complete_task_automatically?: boolean\n }\n}\n```\n\n### `PartnerDetails`\n\nDetails regarding partner for the workflow step\n\n```ts\ntype PartnerDetails = {\n enabled?: boolean\n label?: string\n description?: string\n}\n```\n\n### `StepDescription`\n\nLonger information regarding Task\n\n```ts\ntype StepDescription = {\n enabled?: boolean\n value?: string\n}\n```\n\n### `MaxAllowedLimit`\n\n```ts\ntype MaxAllowedLimit = {\n currentNoOfWorkflows?: number\n maxAllowed?: number\n}\n```\n\n### `DefinitionNotFoundResp`\n\nDefinition could be not found\n\n```ts\ntype DefinitionNotFoundResp = {\n message?: string\n}\n```\n\n### `ClosingReasonNotFoundResp`\n\nClosing reason could be not found\n\n```ts\ntype ClosingReasonNotFoundResp = {\n message?: string\n}\n```\n\n### `ChangeReasonStatusReq`\n\n```ts\ntype ChangeReasonStatusReq = {\n status: "ACTIVE" | "INACTIVE"\n}\n```\n\n### `ClosingReasons`\n\n```ts\ntype ClosingReasons = {\n reasons: Array<{\n id?: string\n title?: string\n status?: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n }>\n}\n```\n\n### `ClosingReason`\n\nOne Closing reason for a workflow\n\n```ts\ntype ClosingReason = {\n id?: string\n title?: string\n status?: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n}\n```\n\n### `ClosingReasonsStatus`\n\n```ts\ntype ClosingReasonsStatus = "ACTIVE" | "INACTIVE"\n```\n\n### `ClosingReasonsIds`\n\n```ts\ntype ClosingReasonsIds = {\n reasons: Array<{\n id: string\n }>\n}\n```\n\n### `ClosingReasonId`\n\n```ts\ntype ClosingReasonId = {\n id: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `UpdateEntityAttributes`\n\n```ts\ntype UpdateEntityAttributes = {\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `EntitySync`\n\n```ts\ntype EntitySync = {\n trigger: {\n event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress"\n filter?: {\n task_template_id?: { ... }\n phase_template_id?: { ... }\n }\n }\n value: {\n source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value"\n value?: string\n }\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `DynamicDueDate`\n\nset a Duedate for a step then a specific\n\n```ts\ntype DynamicDueDate = {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n}\n```\n\n### `StepRequirement`\n\ndescribe the requirement for step enablement\n\n```ts\ntype StepRequirement = {\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
workflow_definition_default as default
|
|
7
|
+
};
|