feat: add workflow node registry phase 2
This commit is contained in:
@@ -101,9 +101,47 @@ export const deleteWorkflow = (id: string): Promise<void> =>
|
||||
export const getWorkflowRuns = (workflowId: string): Promise<WorkflowRun[]> =>
|
||||
api.get(`/workflows/${workflowId}/runs`).then(r => r.data)
|
||||
|
||||
// ─── Pipeline Steps ───────────────────────────────────────────────────────────
|
||||
// ─── Node Definitions / Pipeline Steps ───────────────────────────────────────
|
||||
|
||||
export type StepCategory = 'input' | 'processing' | 'rendering' | 'output'
|
||||
export type WorkflowNodeFieldType = 'number' | 'select' | 'boolean'
|
||||
export type WorkflowNodeExecutionKind = 'native' | 'bridge'
|
||||
|
||||
export interface WorkflowNodeFieldOption {
|
||||
value: string | number | boolean
|
||||
label: string
|
||||
}
|
||||
|
||||
export interface WorkflowNodeFieldDefinition {
|
||||
key: string
|
||||
label: string
|
||||
type: WorkflowNodeFieldType
|
||||
description: string
|
||||
section: string
|
||||
default: unknown
|
||||
min: number | null
|
||||
max: number | null
|
||||
step: number | null
|
||||
unit: string | null
|
||||
options: WorkflowNodeFieldOption[]
|
||||
}
|
||||
|
||||
export interface WorkflowNodeDefinition {
|
||||
step: string
|
||||
label: string
|
||||
category: StepCategory
|
||||
description: string
|
||||
node_type: string
|
||||
icon: string
|
||||
defaults: WorkflowParams
|
||||
fields: WorkflowNodeFieldDefinition[]
|
||||
execution_kind: WorkflowNodeExecutionKind
|
||||
legacy_compatible: boolean
|
||||
}
|
||||
|
||||
export interface WorkflowNodeDefinitionsResponse {
|
||||
definitions: WorkflowNodeDefinition[]
|
||||
}
|
||||
|
||||
export interface PipelineStep {
|
||||
name: string
|
||||
@@ -116,6 +154,9 @@ export interface PipelineStepsResponse {
|
||||
steps: PipelineStep[]
|
||||
}
|
||||
|
||||
export const getNodeDefinitions = (): Promise<WorkflowNodeDefinitionsResponse> =>
|
||||
api.get('/workflows/node-definitions').then(r => r.data)
|
||||
|
||||
export const getPipelineSteps = (): Promise<PipelineStepsResponse> =>
|
||||
api.get('/workflows/pipeline-steps').then(r => r.data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user