import request from '@/assets/js/utils/request'
import getUrl from '@/assets/js/utils/get-url'

// 获取 docPageEx
export function getDocByPage(data) {
  return request({
    url: getUrl('/datasetDocumentEx/page'),
    method: 'post',
    data
  })
}

/**
 * 获取规则列表
 * @param {Object} data - 查询参数 默认为空对象
 */
export function getRuleList(data = {}) {
  return request({
    url: getUrl('/docManage/extractRule/list'),
    method: 'post',
    data
  })
}

/**
 * 下载知识文件模板
 */
export function downloadKnowledgeTemplate() {
  return {
    url: getUrl('/template/download'),
    method: 'get',
    responseType: 'blob'
  }
}
