2025-05-08 18:29:49 +08:00
|
|
|
import type { InputVarType } from '@/app/components/workflow/types'
|
2025-05-07 18:09:38 +08:00
|
|
|
import type { DSLImportMode, DSLImportStatus } from './app'
|
2025-05-07 11:30:13 +08:00
|
|
|
import type { ChunkingMode, IconInfo } from './datasets'
|
2025-05-07 18:09:38 +08:00
|
|
|
import type { Dependency } from '@/app/components/plugins/types'
|
2025-05-07 11:30:13 +08:00
|
|
|
|
|
|
|
export type PipelineTemplateListParams = {
|
|
|
|
type: 'built-in' | 'customized'
|
|
|
|
}
|
|
|
|
|
|
|
|
export type PipelineTemple = {
|
|
|
|
id: string
|
|
|
|
name: string
|
|
|
|
icon_info: IconInfo
|
|
|
|
description: string
|
|
|
|
position: number
|
|
|
|
doc_form: ChunkingMode
|
|
|
|
}
|
|
|
|
|
|
|
|
export type PipelineTemplateListResponse = {
|
|
|
|
pipelines: PipelineTemple[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export type PipelineTemplateByIdResponse = {
|
|
|
|
name: string
|
|
|
|
icon_info: IconInfo
|
|
|
|
description: string
|
2025-05-07 18:09:38 +08:00
|
|
|
author: string // todo: TBD
|
|
|
|
structure: string // todo: TBD
|
2025-05-07 11:30:13 +08:00
|
|
|
export_data: string
|
|
|
|
}
|
|
|
|
|
2025-05-07 14:29:01 +08:00
|
|
|
export type UpdatePipelineInfoRequest = {
|
|
|
|
pipeline_id: string
|
2025-05-07 11:30:13 +08:00
|
|
|
name: string
|
|
|
|
icon_info: IconInfo
|
|
|
|
description: string
|
|
|
|
}
|
|
|
|
|
2025-05-07 14:29:01 +08:00
|
|
|
export type UpdatePipelineInfoResponse = {
|
|
|
|
pipeline_id: string
|
|
|
|
name: string
|
|
|
|
icon_info: IconInfo
|
|
|
|
description: string
|
|
|
|
position: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export type DeletePipelineResponse = {
|
|
|
|
code: number
|
|
|
|
}
|
|
|
|
|
2025-05-07 11:30:13 +08:00
|
|
|
export type ExportPipelineDSLResponse = {
|
|
|
|
data: string
|
|
|
|
}
|
2025-05-07 18:09:38 +08:00
|
|
|
|
|
|
|
export type ImportPipelineDSLRequest = {
|
|
|
|
mode: DSLImportMode
|
|
|
|
name: string
|
|
|
|
yaml_content: string
|
|
|
|
icon_info: IconInfo
|
|
|
|
description: string
|
|
|
|
}
|
|
|
|
|
|
|
|
export type ImportPipelineDSLResponse = {
|
|
|
|
id: string
|
|
|
|
status: DSLImportStatus
|
|
|
|
app_mode: 'pipeline'
|
|
|
|
dataset_id?: string
|
|
|
|
current_dsl_version?: string
|
|
|
|
imported_dsl_version?: string
|
|
|
|
error: string
|
|
|
|
leaked_dependencies: Dependency[]
|
|
|
|
}
|
2025-05-08 18:29:49 +08:00
|
|
|
|
|
|
|
export type Variables = {
|
|
|
|
type: InputVarType
|
|
|
|
label: string
|
|
|
|
description: string
|
|
|
|
variable: string
|
|
|
|
max_length: number
|
|
|
|
required: boolean
|
|
|
|
options?: string[]
|
2025-05-09 12:56:57 +08:00
|
|
|
default: string | number | boolean
|
2025-05-08 18:29:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export type PipelineProcessingParamsResponse = {
|
|
|
|
variables: Variables[]
|
|
|
|
}
|