import request from '@/utils/request.js'

// 请求系统内置监听器list
export const getProcessListenerList = (params) => {
    return request({
        url: '/workflow/process/listener',
        method: 'get',
        params
    })
}

//获取到option列表

// 获取系统内置监听器详情
export const getProcessListenerDetails = (processListenerId) => {
    return request({
        url: '/workflow/process/listener/' + processListenerId,
        method: 'get'
    })
}

// 新增系统内置监听器
export const addProcessListener = (data) => {
    return request({
        url: '/workflow/process/listener',
        method: 'post',
        data
    })
}

// 修改系统内置监听器
export const editProcessListener = (data) => {
    return request({
        url: '/workflow/process/listener',
        method: 'put',
        data
    })
}

// 删除系统内置监听器
export const delProcessListener =(processListenerId) => {
    return request({
        url: '/workflow/process/listener/' + processListenerId,
        method: 'delete'
    })
}
