| | |
| | | ErrorHandleTypeEnum, |
| | | } from '@/app/components/workflow/nodes/_base/components/error-handle/types' |
| | | import type { WorkflowRetryConfig } from '@/app/components/workflow/nodes/_base/components/retry/types' |
| | | import type { StructuredOutput } from '@/app/components/workflow/nodes/llm/types' |
| | | |
| | | export enum BlockEnum { |
| | | Start = 'start', |
| | |
| | | ListFilter = 'list-operator', |
| | | IterationStart = 'iteration-start', |
| | | Assigner = 'assigner', // is now named as VariableAssigner |
| | | Agent = 'agent', |
| | | Loop = 'loop', |
| | | LoopStart = 'loop-start', |
| | | LoopEnd = 'loop-end', |
| | | } |
| | | |
| | | export enum ControlMode { |
| | |
| | | _singleRunningStatus?: NodeRunningStatus |
| | | _isCandidate?: boolean |
| | | _isBundled?: boolean |
| | | _children?: { nodeId: string; nodeType: BlockEnum }[] |
| | | _children?: string[] |
| | | _isEntering?: boolean |
| | | _showAddVariablePopup?: boolean |
| | | _holdAddVariablePopup?: boolean |
| | |
| | | type: BlockEnum |
| | | width?: number |
| | | height?: number |
| | | _loopLength?: number |
| | | _loopIndex?: number |
| | | isInLoop?: boolean |
| | | loop_id?: string |
| | | error_strategy?: ErrorHandleTypeEnum |
| | | retry_config?: WorkflowRetryConfig |
| | | default_value?: DefaultValueForm[] |
| | |
| | | _waitingRun?: boolean |
| | | isInIteration?: boolean |
| | | iteration_id?: string |
| | | isInLoop?: boolean |
| | | loop_id?: string |
| | | sourceType: BlockEnum |
| | | targetType: BlockEnum |
| | | } |
| | |
| | | iterator = 'iterator', // iteration input |
| | | singleFile = 'file', |
| | | multiFiles = 'file-list', |
| | | loop = 'loop', // loop input |
| | | } |
| | | |
| | | export type InputVar = { |
| | |
| | | any = 'any', |
| | | } |
| | | |
| | | export enum ValueType { |
| | | variable = 'variable', |
| | | constant = 'constant', |
| | | } |
| | | |
| | | export type Var = { |
| | | variable: string |
| | | type: VarType |
| | | children?: Var[] | StructuredOutput // if type is obj, has the children struct |
| | | children?: Var[] // if type is obj, has the children struct |
| | | isParagraph?: boolean |
| | | isSelect?: boolean |
| | | options?: string[] |
| | | required?: boolean |
| | | des?: string |
| | | isException?: boolean |
| | | isLoopVariable?: boolean |
| | | nodeId?: string |
| | | } |
| | | |
| | | export type NodeOutPutVar = { |
| | |
| | | title: string |
| | | vars: Var[] |
| | | isStartNode?: boolean |
| | | isLoop?: boolean |
| | | } |
| | | |
| | | export type Block = { |
| | |
| | | transfer_method: TransferMethod[] |
| | | url?: string |
| | | upload_file_id?: string |
| | | related_id?: string |
| | | } |
| | | |
| | | export type WorkflowRunningData = { |
| | |
| | | export type VisionSetting = { |
| | | variable_selector: ValueSelector |
| | | detail: Resolution |
| | | } |
| | | |
| | | export enum WorkflowVersionFilterOptions { |
| | | all = 'all', |
| | | onlyYours = 'onlyYours', |
| | | } |
| | | |
| | | export enum VersionHistoryContextMenuOptions { |
| | | restore = 'restore', |
| | | edit = 'edit', |
| | | delete = 'delete', |
| | | } |