import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios'; /* Auto-copied from workflow-definition-client */ declare namespace Components { namespace Parameters { export type EnforceLimitsParam = boolean; } export interface QueryParameters { EnforceLimitsParam?: Parameters.EnforceLimitsParam; } namespace Schemas { export type ActionSchedule = ImmediateSchedule | DelayedSchedule | RelativeSchedule; /** * Configuration for AI Agent to run */ export interface AgentConfig { [name: string]: any; /** * Id of the configured AI Agent to run */ agent_id: string; } export interface AiAgentTask { id: string; name: string; description?: /* Longer information regarding Task */ StepDescription; journey?: StepJourney; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; /** * requirements that need to be fulfilled in order to enable the task while flow instances are running */ requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[]; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; ecp?: /* Details regarding ECP for the workflow step */ ECPDetails; installer?: /* Details regarding ECP for the workflow step */ ECPDetails; partner?: /* Details regarding partner for the workflow step */ PartnerDetails; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; phase_id?: string; task_type: TaskType; agent_config?: /* Configuration for AI Agent to run */ AgentConfig; } /** * Configuration for automation execution to run */ export interface AutomationConfig { /** * Id of the configured automation to run */ flow_id?: string; /** * Transient field. The full automation action configuration following the automation API action schema. Processed by the backend during create/update and stripped before storage. When present without a flow_id, a new automation flow is created. When present with a flow_id, the existing automation flow is updated. * */ action_config?: { [name: string]: any; /** * The action type (e.g. send-email, trigger-workflow) */ type: string; /** * Action-specific configuration */ config?: { [name: string]: any; }; }; /** * Transient field. When present, the backend clones the automation flow referenced by this ID and assigns the new flow_id to the task. Used when duplicating an automation task to give it an independent automation. Stripped before storage. * */ duplicated_flow_id?: string; input_context?: /** * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used. * */ AutomationInputContext; } /** * Optional. Source of the entity fed into this automation task. If omitted, the workflow's primary entity is used. * */ export interface AutomationInputContext { /** * `trigger` = workflow's primary (trigger) entity. `task` = entity produced by an upstream task in the graph. * */ source: "trigger" | "task"; /** * Required when source is `task`. The id of the upstream task whose output entity should feed this task. */ task_id?: string; } export interface AutomationTask { id: string; name: string; description?: /* Longer information regarding Task */ StepDescription; journey?: StepJourney; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; /** * requirements that need to be fulfilled in order to enable the task while flow instances are running */ requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[]; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; ecp?: /* Details regarding ECP for the workflow step */ ECPDetails; installer?: /* Details regarding ECP for the workflow step */ ECPDetails; partner?: /* Details regarding partner for the workflow step */ PartnerDetails; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; phase_id?: string; task_type: TaskType; automation_config: /* Configuration for automation execution to run */ AutomationConfig; trigger_mode?: TriggerMode; schedule?: ActionSchedule; /** * Indicates whether this task was created automatically by journeys or manually by an user */ created_automatically?: boolean; } export interface AutomationTrigger { id?: string; type: "automation"; /** * Id of the automation config that triggers this workflow */ automation_id?: string; /** * For email thread triggers, specifies which entity from the triggered email thread to use as the primary input for automation and decision tasks. Defaults to `thread` when not specified. * */ input_entity?: "thread" | "first_email" | "last_email"; /** * Transient field. Trigger configurations for creating or updating the trigger automation flow. Each item follows the automation API trigger schema. Processed by the backend during create/update and stripped before storage. * */ trigger_config?: { [name: string]: any; /** * The trigger type (e.g. entity_operation, activity) */ type: string; /** * Trigger-specific configuration */ configuration?: { [name: string]: any; }; }[]; } export interface ChangeReasonStatusReq { status: ClosingReasonsStatus; } /** * One Closing reason for a workflow */ export interface ClosingReason { id?: string; title?: string; status?: ClosingReasonsStatus; lastUpdateTime?: string; creationTime?: string; } export interface ClosingReasonId { /** * example: * x739cew */ id: string; } /** * Error response returned when a closing reason is not found. */ export interface ClosingReasonNotFoundResp { /** * Human-readable message indicating the closing reason was not found. * example: * Closing reason with id 'xyz789' not found */ message?: string; } export interface ClosingReasons { reasons: /* One Closing reason for a workflow */ ClosingReason[]; } export interface ClosingReasonsIds { reasons: ClosingReasonId[]; } export type ClosingReasonsStatus = "ACTIVE" | "INACTIVE"; export interface Condition { id: string; /** * The name of the branch * example: * Branch 1 */ branch_name: string; logical_operator: "AND" | "OR"; statements: Statement[] | null; } /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ export interface CreateFlowTemplate { /** * Unique identifier for the flow template, generated by the system. */ id?: string; /** * Organization identifier that owns this flow template. */ org_id?: string; /** * Display name for the workflow, shown to users in the UI. */ name: string; /** * Optional detailed description of the workflow's purpose and behavior. */ description?: string; trigger?: /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ Trigger; /** * Whether the workflow is enabled or not */ enabled?: boolean; version?: /** * Version of the workflow schema. * * - `v1` – *Deprecated*. The initial version of workflows with limited structure and automation capabilities. * - `v2` – Linear workflows. Supports sequential task execution with basic automation triggers. * - `v3` – Advanced workflows. Adds support for branching logic (conditions), parallel paths, and enhanced automation features such as dynamic triggers and flow control. * * example: * 2 */ Version; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ created_at?: string; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ updated_at?: string; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; /** * Indicates whether this workflow is available for End Customer Portal or not. By default it's not. */ available_in_ecp?: boolean; /** * Additional trigger configurations that can also start this flow. Useful for flows that should be startable via multiple methods (e.g., both automation AND manual). */ additional_triggers?: /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ Trigger[]; phases?: Phase[]; tasks: Task[]; edges: Edge[]; closing_reasons?: /* One Closing reason for a workflow */ ClosingReason[]; entity_sync?: /** * example: * { * "trigger": { * "event": "FlowStarted" * }, * "target": { * "entitySchema": "opportunity", * "entityAttribute": "title" * }, * "value": { * "source": "workflow_name" * } * } */ EntitySync[]; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; /** * Whether only a single closing reason can be selected */ singleClosingReasonSelection?: boolean; /** * The manifest IDs associated with this workflow */ _manifest?: string[]; /** * When true, this is a linear flow: task enablement is computed at runtime from the graph — a task is enabled only when all of its direct predecessor tasks in its branch are done. This fully overrides any explicit per-task requirements. */ linear?: boolean; /** * Non-blocking warnings for configuration limits the flow exceeds. Returned on read (get-flow) and on create/update responses. Size/count limits are soft: a flow exceeding them is still accepted and stored, and the violations are reported here so the UI can surface an informational banner. The flow is still fully editable and usable. */ limit_warnings?: /* A configuration limit that the flow currently exceeds. Returned by the get-flow endpoint and by create/update responses so the UI can show a non-blocking banner. Size/count limit violations never cause a 400 — only structural errors do. The flow remains fully usable; users are encouraged to bring values within the limits. */ FlowLimitWarning[]; } export interface DecisionTask { id: string; name: string; description?: /* Longer information regarding Task */ StepDescription; journey?: StepJourney; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; /** * requirements that need to be fulfilled in order to enable the task while flow instances are running */ requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[]; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; ecp?: /* Details regarding ECP for the workflow step */ ECPDetails; installer?: /* Details regarding ECP for the workflow step */ ECPDetails; partner?: /* Details regarding partner for the workflow step */ PartnerDetails; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; phase_id?: string; task_type: TaskType; trigger_mode: TriggerMode; conditions: Condition[]; /** * When true, all branches with met conditions execute in parallel. When false, only the first branch with a met condition is executed. Defaults to true for backwards compatibility. */ allow_parallel_execution?: boolean; schedule?: DelayedSchedule | RelativeSchedule; loop_config?: { /** * The id of the branch that will be looped */ loop_branch_id: string; /** * The id of the branch that will be used to exit the loop */ exit_branch_id: string; /** * Maximum number of iterations for the loop branch */ max_iterations: number; }; } /** * Error response returned when a workflow definition or flow template is not found. */ export interface DefinitionNotFoundResp { /** * Human-readable message indicating the resource was not found. * example: * Definition with id 'abc123' not found */ message?: string; } export interface DelayedSchedule { mode: "delayed"; duration: number; unit: TimeUnit; } /** * Set due date for the task based on a dynamic condition */ export interface DueDateConfig { duration: number; unit: TimeUnit; type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"; task_id?: string; phase_id?: string; } /** * Configuration for calculating a due date dynamically based on workflow events. * The due date is computed by adding a duration (numberOfUnits + timePeriod) to * a reference point defined by actionTypeCondition (e.g., when workflow started, * when a step closed, or when a phase finished). * */ export interface DynamicDueDate { /** * Number of time units to add to the reference point. */ numberOfUnits: number; timePeriod: TimeUnit; actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"; stepId?: string; phaseId?: string; } /** * Details regarding ECP for the workflow step */ export interface ECPDetails { enabled?: boolean; label?: string; description?: string; journey?: StepJourney; } export interface Edge { id: string; from_id: string; to_id?: string | null; condition_id?: string; /** * Indicates a default case for a decision task. Only decision task edges can have this field and the flow advances using this edge if no conditions are met. */ none_met?: boolean; } /** * describe the requirement for a task to be enabled */ export interface EnableRequirement { /** * The id of the task that it points to */ task_id?: string; /** * The id of the phase that it points to */ phase_id?: string; when: "TASK_FINISHED" | "PHASE_FINISHED"; } /** * example: * { * "trigger": { * "event": "FlowStarted" * }, * "target": { * "entitySchema": "opportunity", * "entityAttribute": "title" * }, * "value": { * "source": "workflow_name" * } * } */ export interface EntitySync { /** * Trigger configuration that determines when entity sync occurs. * Contains the event type and optional filter to target specific tasks/phases. * */ trigger: { /** * Event or condition that triggers the entity sync. * Direct triggers match EventBridge event names (PascalCase). * Status triggers are deduced from event + entity status combination. * */ event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress"; /** * Optional filter to target specific tasks or phases. * Specify either task_template_id OR phase_template_id (mutually exclusive). * If omitted, trigger applies to all tasks/phases. * */ filter?: { /** * Target a specific task by its template ID (stable across executions) */ task_template_id?: string; /** * Target a specific phase by its template ID (stable across executions) */ phase_template_id?: string; }; }; value: { source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value"; value?: string; }; target: { /** * example: * opportunity */ entitySchema: string; /** * example: * title */ entityAttribute: string; }; } /** * Standard error response returned when an API request fails. */ export interface ErrorResp { /** * Human-readable error message describing what went wrong. * example: * Invalid request body: name is required */ message?: string; } export interface EvaluationSource { /** * The id of the action or trigger */ id?: string; origin?: "trigger" | "action"; origin_type?: "entity" | "workflow" | "journey_block"; schema?: string; attribute?: string; 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"; attribute_repeatable?: boolean; attribute_operation?: "all" | "updated" | "added" | "deleted"; /** * Multi-attribute mode. When present and length > 1, the statement is * evaluated against every listed attribute and combined via * `attributes_match`. All listed attributes must share the same * `attribute_type`. Mutually exclusive with `attribute_sub_field`, * `date_offset`, and `attribute_operation`. When absent or length === 1, * the legacy `attribute` field is used. * */ attributes?: [ string?, string?, string?, string?, string?, string?, string?, string?, string?, string? ]; /** * Inner connector across `attributes`. `any` (default) means at least * one attribute must satisfy the operator; `all` means every attribute * must satisfy it. Ignored when `attributes` is absent or has length < 2. * */ attributes_match?: "any" | "all"; /** * For complex attribute types, specifies which sub-field to extract (e.g., "address", "name", "email_type") */ attribute_sub_field?: string; /** * Offset to apply to the source date value before comparison (e.g., +18 years for age check, +30 days for expiry) */ date_offset?: { /** * Number of units to offset */ amount?: number; /** * Unit of the offset */ unit?: "days" | "months" | "years"; }; } /** * A configuration limit that the flow currently exceeds. Returned by the get-flow endpoint and by create/update responses so the UI can show a non-blocking banner. Size/count limit violations never cause a 400 — only structural errors do. The flow remains fully usable; users are encouraged to bring values within the limits. */ export interface FlowLimitWarning { /** * i18n key identifying the exceeded limit (e.g. errors.task_max_incoming_edges). */ i18nKey: string; /** * Human-readable description of the exceeded limit. */ message: string; /** * The configured maximum for this limit. */ max: number; /** * The actual value the flow currently has for this limit (e.g. the actual number of incoming connections). */ current?: number; /** * ID of the task/node the limit applies to, when applicable. */ node_id?: string; task_name?: string; branch_name?: string; /** * Name of the AI-agent parameter the limit applies to, when applicable. */ param_name?: string; /** * JSON path within the flow to the offending value. */ path: any[]; } /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ export interface FlowTemplate { /** * Unique identifier for the flow template, generated by the system. */ id?: string; /** * Organization identifier that owns this flow template. */ org_id?: string; /** * Display name for the workflow, shown to users in the UI. */ name: string; /** * Optional detailed description of the workflow's purpose and behavior. */ description?: string; trigger?: /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ Trigger; /** * Whether the workflow is enabled or not */ enabled?: boolean; version?: /** * Version of the workflow schema. * * - `v1` – *Deprecated*. The initial version of workflows with limited structure and automation capabilities. * - `v2` – Linear workflows. Supports sequential task execution with basic automation triggers. * - `v3` – Advanced workflows. Adds support for branching logic (conditions), parallel paths, and enhanced automation features such as dynamic triggers and flow control. * * example: * 2 */ Version; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ created_at?: string; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ updated_at?: string; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; /** * Indicates whether this workflow is available for End Customer Portal or not. By default it's not. */ available_in_ecp?: boolean; /** * Additional trigger configurations that can also start this flow. Useful for flows that should be startable via multiple methods (e.g., both automation AND manual). */ additional_triggers?: /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ Trigger[]; phases?: Phase[]; tasks: Task[]; edges: Edge[]; closing_reasons?: /* One Closing reason for a workflow */ ClosingReason[]; entity_sync?: /** * example: * { * "trigger": { * "event": "FlowStarted" * }, * "target": { * "entitySchema": "opportunity", * "entityAttribute": "title" * }, * "value": { * "source": "workflow_name" * } * } */ EntitySync[]; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; /** * Whether only a single closing reason can be selected */ singleClosingReasonSelection?: boolean; /** * The manifest IDs associated with this workflow */ _manifest?: string[]; /** * When true, this is a linear flow: task enablement is computed at runtime from the graph — a task is enabled only when all of its direct predecessor tasks in its branch are done. This fully overrides any explicit per-task requirements. */ linear?: boolean; /** * Non-blocking warnings for configuration limits the flow exceeds. Returned on read (get-flow) and on create/update responses. Size/count limits are soft: a flow exceeding them is still accepted and stored, and the violations are reported here so the UI can surface an informational banner. The flow is still fully editable and usable. */ limit_warnings?: /* A configuration limit that the flow currently exceeds. Returned by the get-flow endpoint and by create/update responses so the UI can show a non-blocking banner. Size/count limit violations never cause a 400 — only structural errors do. The flow remains fully usable; users are encouraged to bring values within the limits. */ FlowLimitWarning[]; } /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ export interface FlowTemplateBase { /** * Unique identifier for the flow template, generated by the system. */ id?: string; /** * Organization identifier that owns this flow template. */ org_id?: string; /** * Display name for the workflow, shown to users in the UI. */ name: string; /** * Optional detailed description of the workflow's purpose and behavior. */ description?: string; trigger?: /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ Trigger; /** * Whether the workflow is enabled or not */ enabled?: boolean; version?: /** * Version of the workflow schema. * * - `v1` – *Deprecated*. The initial version of workflows with limited structure and automation capabilities. * - `v2` – Linear workflows. Supports sequential task execution with basic automation triggers. * - `v3` – Advanced workflows. Adds support for branching logic (conditions), parallel paths, and enhanced automation features such as dynamic triggers and flow control. * * example: * 2 */ Version; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ created_at?: string; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ updated_at?: string; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; /** * Indicates whether this workflow is available for End Customer Portal or not. By default it's not. */ available_in_ecp?: boolean; /** * Additional trigger configurations that can also start this flow. Useful for flows that should be startable via multiple methods (e.g., both automation AND manual). */ additional_triggers?: /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ Trigger[]; phases?: Phase[]; tasks: Task[]; edges: Edge[]; closing_reasons?: /* One Closing reason for a workflow */ ClosingReason[]; entity_sync?: /** * example: * { * "trigger": { * "event": "FlowStarted" * }, * "target": { * "entitySchema": "opportunity", * "entityAttribute": "title" * }, * "value": { * "source": "workflow_name" * } * } */ EntitySync[]; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; /** * Whether only a single closing reason can be selected */ singleClosingReasonSelection?: boolean; /** * The manifest IDs associated with this workflow */ _manifest?: string[]; /** * When true, this is a linear flow: task enablement is computed at runtime from the graph — a task is enabled only when all of its direct predecessor tasks in its branch are done. This fully overrides any explicit per-task requirements. */ linear?: boolean; /** * Non-blocking warnings for configuration limits the flow exceeds. Returned on read (get-flow) and on create/update responses. Size/count limits are soft: a flow exceeding them is still accepted and stored, and the violations are reported here so the UI can surface an informational banner. The flow is still fully editable and usable. */ limit_warnings?: /* A configuration limit that the flow currently exceeds. Returned by the get-flow endpoint and by create/update responses so the UI can show a non-blocking banner. Size/count limit violations never cause a 400 — only structural errors do. The flow remains fully usable; users are encouraged to bring values within the limits. */ FlowLimitWarning[]; } /** * Short unique id (length 8) to identify the Flow Template. * example: * 7hj28akg */ export type FlowTemplateId = string; export interface FlowTemplatesList { results: /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ FlowTemplate[]; } export interface ImmediateSchedule { mode?: "immediate"; } export type ItemType = "STEP" | "SECTION"; export interface JourneyAutomationTrigger { id?: string; type: "journey_automation"; /** * Schema of the main entity where flow will be triggered. The entity will be picked from automation context. */ entity_schema?: string; } export interface JourneySubmissionTrigger { id?: string; type: "journey_submission"; /** * ID of the journey that will trigger this flow */ journey_id: string; /** * Name of the journey that will trigger this flow */ journey_name?: string; automation_id?: string; } export interface ManualTask { id: string; name: string; description?: /* Longer information regarding Task */ StepDescription; journey?: StepJourney; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; /** * requirements that need to be fulfilled in order to enable the task while flow instances are running */ requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[]; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; ecp?: /* Details regarding ECP for the workflow step */ ECPDetails; installer?: /* Details regarding ECP for the workflow step */ ECPDetails; partner?: /* Details regarding partner for the workflow step */ PartnerDetails; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; phase_id?: string; task_type: TaskType; } export interface ManualTrigger { id?: string; type: "manual"; entity_schema?: string; } export interface MaxAllowedLimit { currentNoOfWorkflows?: number; maxAllowed?: number; } export type 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"; /** * Details regarding partner for the workflow step */ export interface PartnerDetails { enabled?: boolean; label?: string; description?: string; } export interface Phase { id: string; name: string; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; } export interface RelativeSchedule { mode: "relative"; direction: "before" | "after"; duration: number; unit: TimeUnit; reference: { /** * The id of the entity / workflow / task, based on the origin of the schedule. For all_preceding_tasks_completed, use the sentinel value "all_preceding_tasks_completed". */ id: string; origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"; /** * The schema of the entity */ schema?: string; /** * An entity attribute that identifies a date / datetime */ attribute?: string; }; } export interface SearchFlowTemplates { name?: string; definition_id?: string; trigger_type?: "journey_submission" | "manual" | "automation"; enabled?: boolean; from?: number; size?: number; sort_by?: "created_at" | "updated_at"; sort_order?: "asc" | "desc"; } /** * A group of Steps that define the progress of the Workflow */ export interface Section { id?: string; name: string; order: number; type: ItemType; /** * example: * 2021-04-27T12:00:00.000Z */ dueDate?: string; dynamicDueDate?: /** * Configuration for calculating a due date dynamically based on workflow events. * The due date is computed by adding a duration (numberOfUnits + timePeriod) to * a reference point defined by actionTypeCondition (e.g., when workflow started, * when a step closed, or when a phase finished). * */ DynamicDueDate; assignedTo?: string[]; steps: /* Action that needs to be done in a Workflow */ Step[]; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; } export interface Statement { id: string; source: EvaluationSource; operator: Operator; values: string[]; /** * How to interpret values. "static" (default) means literal values. "relative_date" means values[0] is a dynamic date token like "today". */ value_type?: "static" | "relative_date"; } /** * Action that needs to be done in a Workflow */ export interface Step { id?: string; name: string; description?: /* Longer information regarding Task */ StepDescription; executionType?: StepType; automationConfig?: { /** * Id of the configured automation to run */ flowId: string; }; journey?: StepJourney; order: number; /** * example: * 2021-04-27T12:00:00.000Z */ dueDate?: string; dynamicDueDate?: /** * Configuration for calculating a due date dynamically based on workflow events. * The due date is computed by adding a duration (numberOfUnits + timePeriod) to * a reference point defined by actionTypeCondition (e.g., when workflow started, * when a step closed, or when a phase finished). * */ DynamicDueDate; /** * This field is deprecated. Please use assignedTo */ userIds?: number[]; /** * requirements that need to be fulfilled in order to enable the step execution */ requirements?: /* describe the requirement for step enablement */ StepRequirement[]; assignedTo?: string[]; type: ItemType; ecp?: /* Details regarding ECP for the workflow step */ ECPDetails; installer?: /* Details regarding ECP for the workflow step */ ECPDetails; /** * Partner-specific task details shown to partner org users viewing shared resources */ partner?: /* Details regarding partner for the workflow step */ PartnerDetails; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; } /** * Longer information regarding Task */ export interface StepDescription { enabled?: boolean; value?: string; } export interface StepJourney { id?: string; journeyId?: string; name?: string; /** * If true, the task be auto completed when the journey is completed. By default it is true. */ complete_task_automatically?: boolean; } /** * describe the requirement for step enablement */ export interface StepRequirement { definitionId: string; type: ItemType; condition: "CLOSED"; } export type StepType = "MANUAL" | "AUTOMATION"; export type Task = ManualTask | AutomationTask | DecisionTask | AiAgentTask; export interface TaskBase { id: string; name: string; description?: /* Longer information regarding Task */ StepDescription; journey?: StepJourney; /** * example: * 2021-04-27T12:00:00.000Z */ due_date?: string; due_date_config?: /* Set due date for the task based on a dynamic condition */ DueDateConfig; /** * requirements that need to be fulfilled in order to enable the task while flow instances are running */ requirements?: /* describe the requirement for a task to be enabled */ EnableRequirement[]; assigned_to?: (string | /* Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ VariableAssignment)[]; ecp?: /* Details regarding ECP for the workflow step */ ECPDetails; installer?: /* Details regarding ECP for the workflow step */ ECPDetails; /** * Partner-specific task details shown to partner org users viewing shared resources */ partner?: /* Details regarding partner for the workflow step */ PartnerDetails; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; phase_id?: string; task_type: TaskType; } export type TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"; export type TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months" | "years"; /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ export type Trigger = /** * example: * { * "type": "automation", * "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg" * } */ ManualTrigger | AutomationTrigger | JourneySubmissionTrigger | JourneyAutomationTrigger; export type TriggerMode = "manual" | "automatic"; export type TriggerType = "MANUAL" | "AUTOMATIC"; export interface UpdateEntityAttributes { source: "workflow_status" | "current_section" | "current_step"; target: { /** * example: * opportunity */ entitySchema: string; /** * example: * my_status */ entityAttribute: string; }; } /** * Represents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution. */ export interface VariableAssignment { /** * The variable expression, e.g., "{{entity.owner}}" * example: * {{entity.owner}} */ variable: string; /** * The resolved values after variable evaluation (populated during execution) * example: * [ * "user_12345" * ] */ value?: string[]; } /** * Version of the workflow schema. * * - `v1` – *Deprecated*. The initial version of workflows with limited structure and automation capabilities. * - `v2` – Linear workflows. Supports sequential task execution with basic automation triggers. * - `v3` – Advanced workflows. Adds support for branching logic (conditions), parallel paths, and enhanced automation features such as dynamic triggers and flow control. * * example: * 2 */ export type Version = "v1" | "v2" | "v3"; /** * V1 workflow definition schema. Defines a linear workflow structure with sections * and steps. Sections group related steps together, and steps represent individual * tasks that need to be completed. This is the legacy workflow model; for new * implementations, consider using V2 flow templates instead. * */ export interface WorkflowDefinition { /** * Unique identifier for the workflow definition, generated by the system. */ id?: string; /** * Display name for the workflow, shown to users in the UI. */ name: string; /** * Optional detailed description of the workflow's purpose and behavior. */ description?: string; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ creationTime?: string; /** * Whether the workflow is enabled or not */ enabled?: boolean; /** * ISO String Date & Time * example: * 2021-04-27T12:01:13.000Z */ lastUpdateTime?: string; /** * example: * 2021-04-27T12:00:00.000Z */ dueDate?: string; dynamicDueDate?: /** * Configuration for calculating a due date dynamically based on workflow events. * The due date is computed by adding a duration (numberOfUnits + timePeriod) to * a reference point defined by actionTypeCondition (e.g., when workflow started, * when a step closed, or when a phase finished). * */ DynamicDueDate; /** * This field is deprecated. Please use assignedTo */ userIds?: number[]; assignedTo?: string[]; /** * Indicates whether this workflow is available for End Customer Portal or not. By default it's not. */ enableECPWorkflow?: boolean; flow: (/* A group of Steps that define the progress of the Workflow */ Section | /* Action that needs to be done in a Workflow */ Step)[]; closingReasons?: ClosingReasonId[]; updateEntityAttributes?: UpdateEntityAttributes[]; /** * Taxonomy ids that are associated with this workflow and used for filtering */ taxonomies?: string[]; /** * Whether only a single closing reason can be selected */ singleClosingReasonSelection?: boolean; /** * The manifest IDs associated with this workflow */ _manifest?: string[]; } } } declare namespace Paths { namespace ChangeReasonStatus { namespace Parameters { export type ReasonId = string; } export interface PathParameters { reasonId: Parameters.ReasonId; } export type RequestBody = Components.Schemas.ChangeReasonStatusReq; namespace Responses { export interface $202 { } export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace CreateClosingReason { export type RequestBody = /* One Closing reason for a workflow */ Components.Schemas.ClosingReason; namespace Responses { export type $201 = /* One Closing reason for a workflow */ Components.Schemas.ClosingReason; } } namespace CreateDefinition { export type RequestBody = /** * V1 workflow definition schema. Defines a linear workflow structure with sections * and steps. Sections group related steps together, and steps represent individual * tasks that need to be completed. This is the legacy workflow model; for new * implementations, consider using V2 flow templates instead. * */ Components.Schemas.WorkflowDefinition; namespace Responses { export type $201 = /** * V1 workflow definition schema. Defines a linear workflow structure with sections * and steps. Sections group related steps together, and steps represent individual * tasks that need to be completed. This is the legacy workflow model; for new * implementations, consider using V2 flow templates instead. * */ Components.Schemas.WorkflowDefinition; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace CreateFlowTemplate { namespace Parameters { export type EnforceLimits = boolean; } export interface QueryParameters { enforce_limits?: Parameters.EnforceLimits; } export type RequestBody = /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ Components.Schemas.CreateFlowTemplate; namespace Responses { export type $201 = /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ Components.Schemas.FlowTemplate; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace DeleteClosingReason { namespace Parameters { /** * example: * x739cew */ export type ReasonId = string; } export interface PathParameters { reasonId: /** * example: * x739cew */ Parameters.ReasonId; } namespace Responses { export interface $204 { } export type $403 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a closing reason is not found. */ Components.Schemas.ClosingReasonNotFoundResp; } } namespace DeleteDefinition { namespace Parameters { export type DefinitionId = string; } export interface PathParameters { definitionId: Parameters.DefinitionId; } namespace Responses { export interface $204 { } export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export interface $404 { } } } namespace DeleteFlowTemplate { namespace Parameters { export type FlowId = /** * Short unique id (length 8) to identify the Flow Template. * example: * 7hj28akg */ Components.Schemas.FlowTemplateId; } export interface PathParameters { flowId: Parameters.FlowId; } namespace Responses { export interface $204 { } export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a workflow definition or flow template is not found. */ Components.Schemas.DefinitionNotFoundResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace DuplicateFlowTemplate { namespace Parameters { export type FlowId = /** * Short unique id (length 8) to identify the Flow Template. * example: * 7hj28akg */ Components.Schemas.FlowTemplateId; } export interface PathParameters { flowId: Parameters.FlowId; } namespace Responses { export type $201 = /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ Components.Schemas.FlowTemplate; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a workflow definition or flow template is not found. */ Components.Schemas.DefinitionNotFoundResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace GetAllClosingReasons { namespace Parameters { export type IncludeInactive = boolean; } export interface QueryParameters { includeInactive?: Parameters.IncludeInactive; } namespace Responses { export type $200 = Components.Schemas.ClosingReasons; } } namespace GetClosingReason { namespace Parameters { /** * example: * x739cew */ export type ReasonId = string; } export interface PathParameters { reasonId: /** * example: * x739cew */ Parameters.ReasonId; } namespace Responses { export type $200 = /* One Closing reason for a workflow */ Components.Schemas.ClosingReason; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $403 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a closing reason is not found. */ Components.Schemas.ClosingReasonNotFoundResp; } } namespace GetClosingReasonV1 { namespace Parameters { export type ReasonId = string; } export interface PathParameters { reasonId: Parameters.ReasonId; } namespace Responses { export type $200 = /* One Closing reason for a workflow */ Components.Schemas.ClosingReason; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a closing reason is not found. */ Components.Schemas.ClosingReasonNotFoundResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace GetDefinition { namespace Parameters { export type DefinitionId = string; } export interface PathParameters { definitionId: Parameters.DefinitionId; } namespace Responses { export type $200 = /** * V1 workflow definition schema. Defines a linear workflow structure with sections * and steps. Sections group related steps together, and steps represent individual * tasks that need to be completed. This is the legacy workflow model; for new * implementations, consider using V2 flow templates instead. * */ Components.Schemas.WorkflowDefinition; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a workflow definition or flow template is not found. */ Components.Schemas.DefinitionNotFoundResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace GetDefinitions { namespace Responses { export type $200 = /** * V1 workflow definition schema. Defines a linear workflow structure with sections * and steps. Sections group related steps together, and steps represent individual * tasks that need to be completed. This is the legacy workflow model; for new * implementations, consider using V2 flow templates instead. * */ Components.Schemas.WorkflowDefinition[]; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace GetFlowTemplate { namespace Parameters { export type FlowId = /** * Short unique id (length 8) to identify the Flow Template. * example: * 7hj28akg */ Components.Schemas.FlowTemplateId; } export interface PathParameters { flowId: Parameters.FlowId; } namespace Responses { export type $200 = /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ Components.Schemas.FlowTemplate; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a workflow definition or flow template is not found. */ Components.Schemas.DefinitionNotFoundResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace GetMaxAllowedLimit { namespace Responses { export type $200 = Components.Schemas.MaxAllowedLimit; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace GetWorkflowClosingReasons { namespace Parameters { export type DefinitionId = string; } export interface PathParameters { definitionId: Parameters.DefinitionId; } namespace Responses { export type $200 = Components.Schemas.ClosingReasonsIds; } } namespace ListFlowTemplates { namespace Parameters { export type TriggerSchema = string; export type TriggerSourceId = string; export type TriggerType = "automation" | "manual" | "journey_submission"; } export interface QueryParameters { trigger_type?: Parameters.TriggerType; trigger_source_id?: Parameters.TriggerSourceId; trigger_schema?: Parameters.TriggerSchema; } namespace Responses { export type $200 = Components.Schemas.FlowTemplatesList; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace SearchFlowTemplates { export type RequestBody = Components.Schemas.SearchFlowTemplates; namespace Responses { export interface $200 { hits?: number; results?: /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ Components.Schemas.FlowTemplate[]; } export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace SetWorkflowClosingReasons { namespace Parameters { export type DefinitionId = string; } export interface PathParameters { definitionId: Parameters.DefinitionId; } export type RequestBody = Components.Schemas.ClosingReasonsIds; namespace Responses { export interface $201 { } } } namespace UpdateClosingReason { namespace Parameters { /** * example: * x739cew */ export type ReasonId = string; } export interface PathParameters { reasonId: /** * example: * x739cew */ Parameters.ReasonId; } export type RequestBody = /* One Closing reason for a workflow */ Components.Schemas.ClosingReason; namespace Responses { export type $200 = /* One Closing reason for a workflow */ Components.Schemas.ClosingReason; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $403 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a closing reason is not found. */ Components.Schemas.ClosingReasonNotFoundResp; } } namespace UpdateDefinition { namespace Parameters { export type DefinitionId = string; } export interface PathParameters { definitionId: Parameters.DefinitionId; } export type RequestBody = /** * V1 workflow definition schema. Defines a linear workflow structure with sections * and steps. Sections group related steps together, and steps represent individual * tasks that need to be completed. This is the legacy workflow model; for new * implementations, consider using V2 flow templates instead. * */ Components.Schemas.WorkflowDefinition; namespace Responses { export type $200 = /** * V1 workflow definition schema. Defines a linear workflow structure with sections * and steps. Sections group related steps together, and steps represent individual * tasks that need to be completed. This is the legacy workflow model; for new * implementations, consider using V2 flow templates instead. * */ Components.Schemas.WorkflowDefinition; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } namespace UpdateFlowTemplate { namespace Parameters { export type EnforceLimits = boolean; export type FlowId = /** * Short unique id (length 8) to identify the Flow Template. * example: * 7hj28akg */ Components.Schemas.FlowTemplateId; } export interface PathParameters { flowId: Parameters.FlowId; } export interface QueryParameters { enforce_limits?: Parameters.EnforceLimits; } export type RequestBody = /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ Components.Schemas.FlowTemplate; namespace Responses { export type $200 = /** * Base schema for V2 flow templates. A flow template defines the structure of a workflow * including phases, tasks, edges, triggers, and other configuration. Flow templates serve * as blueprints that can be instantiated as flow executions. * */ Components.Schemas.FlowTemplate; export type $400 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $401 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $404 = /* Error response returned when a workflow definition or flow template is not found. */ Components.Schemas.DefinitionNotFoundResp; export type $409 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; export type $500 = /* Standard error response returned when an API request fails. */ Components.Schemas.ErrorResp; } } } interface OperationMethods { /** * getMaxAllowedLimit - getMaxAllowedLimit * * Get limits and number of created executions for an Organization. */ 'getMaxAllowedLimit'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * getDefinitions - getDefinitions * * Retrieve all V1 workflow definitions belonging to the authenticated organization. */ 'getDefinitions'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createDefinition - createDefinition * * Create a new V1 workflow definition. The definition consists of sections and steps * that define the structure of the workflow. Once created, the definition can be used * to start workflow executions. * */ 'createDefinition'( parameters?: Parameters | null, data?: Paths.CreateDefinition.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * listFlowTemplates - listFlowTemplates * * List all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values. */ 'listFlowTemplates'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createFlowTemplate - createFlowTemplate * * Create a new Flow Template (V2 workflow definition). * * A flow template defines the structure of a workflow including its phases, tasks, * edges (connections between tasks), and trigger configuration. Once created, the * template can be used to start workflow executions. * */ 'createFlowTemplate'( parameters?: Parameters | null, data?: Paths.CreateFlowTemplate.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * searchFlowTemplates - searchFlowTemplates * * Search for flow templates by name, trigger type, enabled status, and more. */ 'searchFlowTemplates'( parameters?: Parameters | null, data?: Paths.SearchFlowTemplates.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getFlowTemplate - getFlowTemplate * * Retrieve a specific flow template by its unique identifier. */ 'getFlowTemplate'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateFlowTemplate - updateFlowTemplate * * Update Flow Template. */ 'updateFlowTemplate'( parameters?: Parameters | null, data?: Paths.UpdateFlowTemplate.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteFlowTemplate - deleteFlowTemplate * * Delete Flow Template. */ 'deleteFlowTemplate'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * duplicateFlowTemplate - duplicateFlowTemplate * * Create a copy of an existing flow template. The duplicated template will have a new * unique identifier and can be modified independently of the original. This is useful * for creating variations of existing workflows without starting from scratch. * */ 'duplicateFlowTemplate'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * getDefinition - getDefinition * * Get specific Definition by id from the Organization. */ 'getDefinition'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateDefinition - updateDefinition * * Update Workflow Definition. */ 'updateDefinition'( parameters?: Parameters | null, data?: Paths.UpdateDefinition.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteDefinition - deleteDefinition * * Delete Workflow Definition. */ 'deleteDefinition'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * getAllClosingReasons - getAllClosingReasons * * Get all Closing Reasons defined in the organization by default all Active. */ 'getAllClosingReasons'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createClosingReason - createClosingReason * * A created Closing Reason is stored for the organization and will be displayed in the library of reasons. */ 'createClosingReason'( parameters?: Parameters | null, data?: Paths.CreateClosingReason.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getClosingReason - getClosingReason * * Get specific closing reason by id from the organisation. */ 'getClosingReason'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateClosingReason - updateClosingReason * * Update an existing closing reason */ 'updateClosingReason'( parameters?: Parameters | null, data?: Paths.UpdateClosingReason.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteClosingReason - deleteClosingReason * * Permanently delete a closing reason (Using INACTIVE status is recommended instead) */ 'deleteClosingReason'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * getClosingReasonV1 - getClosingReasonV1 * * Get specific closing reason by id from the organisation. */ 'getClosingReasonV1'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * changeReasonStatus - changeReasonStatus * * Change the status of a Closing Reason (eg. ACTIVE to INACTIVE). */ 'changeReasonStatus'( parameters?: Parameters | null, data?: Paths.ChangeReasonStatus.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getWorkflowClosingReasons - getWorkflowClosingReasons * * Returns all closing reasons defined for the workflow. */ 'getWorkflowClosingReasons'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * setWorkflowClosingReasons - setWorkflowClosingReasons * * Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog. */ 'setWorkflowClosingReasons'( parameters?: Parameters | null, data?: Paths.SetWorkflowClosingReasons.RequestBody, config?: AxiosRequestConfig ): OperationResponse } interface PathsDictionary { ['/v1/workflows/limits/max-allowed']: { /** * getMaxAllowedLimit - getMaxAllowedLimit * * Get limits and number of created executions for an Organization. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/workflows/definitions']: { /** * getDefinitions - getDefinitions * * Retrieve all V1 workflow definitions belonging to the authenticated organization. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createDefinition - createDefinition * * Create a new V1 workflow definition. The definition consists of sections and steps * that define the structure of the workflow. Once created, the definition can be used * to start workflow executions. * */ 'post'( parameters?: Parameters | null, data?: Paths.CreateDefinition.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/flows/templates']: { /** * listFlowTemplates - listFlowTemplates * * List all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createFlowTemplate - createFlowTemplate * * Create a new Flow Template (V2 workflow definition). * * A flow template defines the structure of a workflow including its phases, tasks, * edges (connections between tasks), and trigger configuration. Once created, the * template can be used to start workflow executions. * */ 'post'( parameters?: Parameters | null, data?: Paths.CreateFlowTemplate.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/flows/templates:search']: { /** * searchFlowTemplates - searchFlowTemplates * * Search for flow templates by name, trigger type, enabled status, and more. */ 'post'( parameters?: Parameters | null, data?: Paths.SearchFlowTemplates.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/flows/templates/{flowId}']: { /** * getFlowTemplate - getFlowTemplate * * Retrieve a specific flow template by its unique identifier. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateFlowTemplate - updateFlowTemplate * * Update Flow Template. */ 'put'( parameters?: Parameters | null, data?: Paths.UpdateFlowTemplate.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteFlowTemplate - deleteFlowTemplate * * Delete Flow Template. */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v2/flows/templates/{flowId}/duplicate']: { /** * duplicateFlowTemplate - duplicateFlowTemplate * * Create a copy of an existing flow template. The duplicated template will have a new * unique identifier and can be modified independently of the original. This is useful * for creating variations of existing workflows without starting from scratch. * */ 'post'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/workflows/definitions/{definitionId}']: { /** * getDefinition - getDefinition * * Get specific Definition by id from the Organization. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateDefinition - updateDefinition * * Update Workflow Definition. */ 'put'( parameters?: Parameters | null, data?: Paths.UpdateDefinition.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteDefinition - deleteDefinition * * Delete Workflow Definition. */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/workflows/closing-reasons']: { /** * getAllClosingReasons - getAllClosingReasons * * Get all Closing Reasons defined in the organization by default all Active. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createClosingReason - createClosingReason * * A created Closing Reason is stored for the organization and will be displayed in the library of reasons. */ 'post'( parameters?: Parameters | null, data?: Paths.CreateClosingReason.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/workflows/closing-reasons/{reasonId}']: { /** * getClosingReason - getClosingReason * * Get specific closing reason by id from the organisation. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateClosingReason - updateClosingReason * * Update an existing closing reason */ 'patch'( parameters?: Parameters | null, data?: Paths.UpdateClosingReason.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteClosingReason - deleteClosingReason * * Permanently delete a closing reason (Using INACTIVE status is recommended instead) */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/workflows/closing-reasons/{reasonId}']: { /** * getClosingReasonV1 - getClosingReasonV1 * * Get specific closing reason by id from the organisation. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * changeReasonStatus - changeReasonStatus * * Change the status of a Closing Reason (eg. ACTIVE to INACTIVE). */ 'patch'( parameters?: Parameters | null, data?: Paths.ChangeReasonStatus.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/workflows/definitions/{definitionId}/closing-reasons']: { /** * getWorkflowClosingReasons - getWorkflowClosingReasons * * Returns all closing reasons defined for the workflow. */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * setWorkflowClosingReasons - setWorkflowClosingReasons * * Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog. */ 'patch'( parameters?: Parameters | null, data?: Paths.SetWorkflowClosingReasons.RequestBody, config?: AxiosRequestConfig ): OperationResponse } } type Client = OpenAPIClient type ActionSchedule = Components.Schemas.ActionSchedule; type AgentConfig = Components.Schemas.AgentConfig; type AiAgentTask = Components.Schemas.AiAgentTask; type AutomationConfig = Components.Schemas.AutomationConfig; type AutomationInputContext = Components.Schemas.AutomationInputContext; type AutomationTask = Components.Schemas.AutomationTask; type AutomationTrigger = Components.Schemas.AutomationTrigger; type ChangeReasonStatusReq = Components.Schemas.ChangeReasonStatusReq; type ClosingReason = Components.Schemas.ClosingReason; type ClosingReasonId = Components.Schemas.ClosingReasonId; type ClosingReasonNotFoundResp = Components.Schemas.ClosingReasonNotFoundResp; type ClosingReasons = Components.Schemas.ClosingReasons; type ClosingReasonsIds = Components.Schemas.ClosingReasonsIds; type ClosingReasonsStatus = Components.Schemas.ClosingReasonsStatus; type Condition = Components.Schemas.Condition; type CreateFlowTemplate = Components.Schemas.CreateFlowTemplate; type DecisionTask = Components.Schemas.DecisionTask; type DefinitionNotFoundResp = Components.Schemas.DefinitionNotFoundResp; type DelayedSchedule = Components.Schemas.DelayedSchedule; type DueDateConfig = Components.Schemas.DueDateConfig; type DynamicDueDate = Components.Schemas.DynamicDueDate; type ECPDetails = Components.Schemas.ECPDetails; type Edge = Components.Schemas.Edge; type EnableRequirement = Components.Schemas.EnableRequirement; type EntitySync = Components.Schemas.EntitySync; type ErrorResp = Components.Schemas.ErrorResp; type EvaluationSource = Components.Schemas.EvaluationSource; type FlowLimitWarning = Components.Schemas.FlowLimitWarning; type FlowTemplate = Components.Schemas.FlowTemplate; type FlowTemplateBase = Components.Schemas.FlowTemplateBase; type FlowTemplateId = Components.Schemas.FlowTemplateId; type FlowTemplatesList = Components.Schemas.FlowTemplatesList; type ImmediateSchedule = Components.Schemas.ImmediateSchedule; type ItemType = Components.Schemas.ItemType; type JourneyAutomationTrigger = Components.Schemas.JourneyAutomationTrigger; type JourneySubmissionTrigger = Components.Schemas.JourneySubmissionTrigger; type ManualTask = Components.Schemas.ManualTask; type ManualTrigger = Components.Schemas.ManualTrigger; type MaxAllowedLimit = Components.Schemas.MaxAllowedLimit; type Operator = Components.Schemas.Operator; type PartnerDetails = Components.Schemas.PartnerDetails; type Phase = Components.Schemas.Phase; type RelativeSchedule = Components.Schemas.RelativeSchedule; type SearchFlowTemplates = Components.Schemas.SearchFlowTemplates; type Section = Components.Schemas.Section; type Statement = Components.Schemas.Statement; type Step = Components.Schemas.Step; type StepDescription = Components.Schemas.StepDescription; type StepJourney = Components.Schemas.StepJourney; type StepRequirement = Components.Schemas.StepRequirement; type StepType = Components.Schemas.StepType; type Task = Components.Schemas.Task; type TaskBase = Components.Schemas.TaskBase; type TaskType = Components.Schemas.TaskType; type TimeUnit = Components.Schemas.TimeUnit; type Trigger = Components.Schemas.Trigger; type TriggerMode = Components.Schemas.TriggerMode; type TriggerType = Components.Schemas.TriggerType; type UpdateEntityAttributes = Components.Schemas.UpdateEntityAttributes; type VariableAssignment = Components.Schemas.VariableAssignment; type Version = Components.Schemas.Version; type WorkflowDefinition = Components.Schemas.WorkflowDefinition; export { type StepJourney as $, type ActionSchedule as A, type FlowTemplate as B, type Client as C, type DecisionTask as D, type ECPDetails as E, type FlowLimitWarning as F, type FlowTemplateBase as G, type FlowTemplateId as H, type FlowTemplatesList as I, type ImmediateSchedule as J, type ItemType as K, type JourneyAutomationTrigger as L, type JourneySubmissionTrigger as M, type ManualTask as N, type OperationMethods as O, Paths as P, type ManualTrigger as Q, type MaxAllowedLimit as R, type Operator as S, type PartnerDetails as T, type Phase as U, type RelativeSchedule as V, SearchFlowTemplates as W, type Section as X, type Statement as Y, type Step as Z, type StepDescription as _, Components as a, type StepRequirement as a0, type StepType as a1, type Task as a2, type TaskBase as a3, type TaskType as a4, type TimeUnit as a5, type Trigger as a6, type TriggerMode as a7, type TriggerType as a8, type UpdateEntityAttributes as a9, type VariableAssignment as aa, type Version as ab, type WorkflowDefinition as ac, type PathsDictionary as b, type AgentConfig as c, type AiAgentTask as d, type AutomationConfig as e, type AutomationInputContext as f, type AutomationTask as g, type AutomationTrigger as h, type ChangeReasonStatusReq as i, type ClosingReason as j, type ClosingReasonId as k, type ClosingReasonNotFoundResp as l, type ClosingReasons as m, type ClosingReasonsIds as n, type ClosingReasonsStatus as o, type Condition as p, CreateFlowTemplate as q, type DefinitionNotFoundResp as r, type DelayedSchedule as s, type DueDateConfig as t, type DynamicDueDate as u, type Edge as v, type EnableRequirement as w, type EntitySync as x, type ErrorResp as y, type EvaluationSource as z };