import request from '@/utils/request'

/* 查询知识库列表 */
export function listBuckets(data) {
  return request({
    url: '/kbm/selectBucketInfo',//'/minio/listBuckets',
    method: 'post',
    data
  })
}

/* 新增知识库 */
export function createBucket(data) {
  return request({
    url: '/minio/createBucket',
    method: 'post',
    data
  })
}

/* 删除知识库  kbm/deleteBucket*/
export function deleteBucket(data) {
  return request({
    url: '/kbm/deleteBucket',
    method: 'post',
    data
  })
}

/* 获取指定的内部信息*/

export function getBucketContents(data) {
  return request({
    url: '/kbm/getFileInfo',
    method: 'post',
    data
  })
}

/* 删除内部文件 */

export function deleteFile(data) {
  return request({
    url: '/kbm/deleteDocument',
    method: 'post',
    data
  })
}

/* 下载  */

export function nameGetUrl(data) {
  return request({
    url: '/kbm/getUrl',
    method: 'post',
    data
  })
}

/* 上传 */

export function postUpload(data) {
  return request({
    url: '/minio/post',
    method: 'post',
    data
  })
}

/* 修改文档名称 /minio/renameFile */
export function renameFile(data) {
  return request({
    url: '/kbm/updateName',
    method: 'post',
    data
  })
}

/* 解析方法 /kbm/analysis */
export function analysis(data) {
  return request({
    url: '/kbm/analysis',
    method: 'post',
    data
  })
}
/* 文本信息 /kbm/searchTaskInfo */
export function searchTaskInfo(data) {
  return request({
    url: '/kbm/searchTaskInfo',
    method: 'post',
    data
  })
}

/* /kbm/batchAnalysis  批量解析 */
export function batchAnalysis(data) {
  return request({
    url: '/kbm/batchAnalysis',
    method: 'post',
    data
  })
}
/* 获取类型 */

export function getSuffixName(data) {
  return request({
    url: '/kbm/getSuffixName',
    method: 'post',
    data
  })
}

/* 通过id查询状态 /kbm/getRunStatus */

export function getRunStatus(data) {
  return request({
    url: '/kbm/getRunStatus',
    method: 'post',
    data
  })
}

/* 目录列表 */
export function selectTypeList(data) {
  return request({
    url: '/docType/selectTypeList',
    method: 'post',
    data
  })
}

/* 新增目录 */

export function insertType(data) {
  return request({
    url: '/docType/insertType',
    method: 'post',
    data
  })
}

/* 编辑目录 */

export function updateType(data) {
  return request({
    url: '/docType/updateType',
    method: 'post',
    data
  })
}
/* 查看目录 */

export function Info(data) {
  return request({
    url: '/docType/Info',
    method: 'post',
    data
  })
}

/* 删除目录 */

export function deleteType(data) {
  return request({
    url: '/docType/delete',
    method: 'post',
    data
  })
}

/* 批量移动目录 */

export function batchMove(data) {
  return request({
    url: '/kbm/batchMove',
    method: 'post',
    data
  })
}

/* docType/selectType0 */

export function selectType0(data) {
  return request({
    url: '/docType/selectType0',
    method: 'post',
    data
  })
}