import request from '@/utils/request'

// 查询应用列表
export function listRole(query) {
  return request({
    url: '/fastGpt/fastGptRole/list',
    method: 'get',
    params: query
  })
}

// 查询应用详细
export function getRole(roleId) {
  return request({
    url: '/fastGpt/fastGptRole/' + roleId,
    method: 'get'
  })
}

// 新增应用
export function addRole(data) {
  return request({
    url: '/fastGpt/fastGptRole',
    method: 'post',
    data: data
  })
}

// 修改应用
export function updateRole(data) {
  return request({
    url: '/fastGpt/fastGptRole/',
    method: 'put',
    data: data
  })
}

// 删除应用
export function delRole(roleId) {
  return request({
    url: '/fastGpt/fastGptRole/' + roleId,
    method: 'delete'
  })
}

// 导出应用
export function exportRole(query) {
  return request({
    url: '/fastGpt/fastGptRoles/export',
    method: 'get',
    params: query
  })
}