import request from '@/utils/request'

// 查询任务流程编排列表
export function listConfig(query) {
    return request({
        url: '/test/config/list',
        method: 'get',
        params: query
    })
}

// 查询任务流程编排详细
export function getConfig(id) {
    return request({
        url: '/test/config/' + id,
        method: 'get'
    })
}

// 新增任务流程编排
export function addConfig(data) {
    return request({
        url: '/test/config',
        method: 'post',
        data: data
    })
}

// 修改任务流程编排
export function updateConfig(data) {
    return request({
        url: '/test/config',
        method: 'put',
        data: data
    })
}

// 删除任务流程编排
export function delConfig(id) {
    return request({
        url: '/test/config/' + id,
        method: 'delete'
    })
}

// 流程编排
export function taskConfig(data) {
    return request({
        url: '/test/orchestration',
        method: 'post',
        data: data
    })
}

// 流程编排查询
export function getTaskConfig(params) {
    return request({
        url: `/test/orchestration`,
        method: 'get',
        params: params
    })
}

// 获取任务执行参数
export function getTaskParamsById(id) {
    return request({
        url: `/test/param/query/${id}`,
        method: 'get',
    })
}
// 任务执行
export function taskExecute(data) {
    return request({
        url: `/flow/execute`,
        method: 'post',
        data: data
    })
}
