This commit is contained in:
StyleZhang
2024-03-14 15:14:11 +08:00
parent 43a3b827a3
commit 2af2e2be67
9 changed files with 372 additions and 153 deletions

View File

@ -3,6 +3,7 @@ import { get, post } from './base'
import type { CommonResponse } from '@/models/common'
import type {
FetchWorkflowDraftResponse,
NodesDefaultConfigsResponse,
WorkflowRunHistoryResponse,
} from '@/types/workflow'
@ -14,8 +15,8 @@ export const syncWorkflowDraft = ({ url, params }: { url: string; params: Pick<F
return post<CommonResponse & { updated_at: number }>(url, { body: params })
}
export const fetchNodesDefaultConfigs: Fetcher<any, string> = (url) => {
return get<any>(url)
export const fetchNodesDefaultConfigs: Fetcher<NodesDefaultConfigsResponse, string> = (url) => {
return get<NodesDefaultConfigsResponse>(url)
}
export const fetchWorkflowRunHistory: Fetcher<WorkflowRunHistoryResponse, string> = (url) => {