// @ts-ignore
/* eslint-disable */
import request from '@/request/http'

/** 修改 修改UpdateVO中不为空的字段 PUT /fKnowledgeBase */
export async function update5(body: API.FKnowledgeBaseUpdateVO, options?: { [key: string]: any }) {
  return request<API.RFKnowledgeBase>(`/finyx/fKnowledgeBase`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 新增 POST /fKnowledgeBase */
export async function save5(body: API.FKnowledgeBaseSaveVO, options?: { [key: string]: any }) {
  return request<API.RFKnowledgeBase>(`/finyx/fKnowledgeBase`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 删除 DELETE /fKnowledgeBase */
export async function delete5(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/finyx/fKnowledgeBase`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 单体查询 单体查询 GET /fKnowledgeBase/${param0} */
export async function get5(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.get5Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.RFKnowledgeBaseResultVO>(`/finyx/fKnowledgeBase/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {})
  })
}

/** 名称重复校验 POST /fKnowledgeBase/checkName */
export async function checkName(
  body: API.FKnowledgeBaseUpdateVO,
  options?: { [key: string]: any }
) {
  return request<API.R>(`/finyx/fKnowledgeBase/checkName`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 复制 POST /fKnowledgeBase/copy */
export async function copy5(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.copy5Params,
  options?: { [key: string]: any }
) {
  return request<API.RFKnowledgeBase>(`/finyx/fKnowledgeBase/copy`, {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询单体详情 GET /fKnowledgeBase/detail */
export async function getDetail5(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetail5Params,
  options?: { [key: string]: any }
) {
  return request<API.RFKnowledgeBaseResultVO>(`/finyx/fKnowledgeBase/detail`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 根据Id批量查询 根据Id批量查询 POST /fKnowledgeBase/findByIds */
export async function findByIds5(body: number[], options?: { [key: string]: any }) {
  return request<API.RListFKnowledgeBaseResultVO>(`/finyx/fKnowledgeBase/findByIds`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 导入文档 POST /fKnowledgeBase/importDocument */
export async function importDocument(
  body: API.FKnowledgeBaseUpdateVO,
  options?: { [key: string]: any }
) {
  return request<API.R>(`/finyx/fKnowledgeBase/importDocument`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 分页列表查询 POST /fKnowledgeBase/page */
export async function page5(
  body: API.PageParamsFKnowledgeBasePageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageFKnowledgeBaseResultVO>(`/finyx/fKnowledgeBase/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 解析文档 POST /fKnowledgeBase/paras */
export async function paras(body: API.FKnowledgeBaseUpdateVO, options?: { [key: string]: any }) {
  return request<API.RFKnowledgeBaseResultVO>(`/finyx/fKnowledgeBase/paras`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 批量查询 批量查询 POST /fKnowledgeBase/query */
export async function query5(body: API.FKnowledgeBasePageQuery, options?: { [key: string]: any }) {
  return request<API.RListFKnowledgeBaseResultVO>(`/finyx/fKnowledgeBase/query`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
