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

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

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

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

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

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

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

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

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

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

/** 向量化 POST /fKnowledgeDocument/vectorize */
export async function vectorize(
  body: API.FKnowledgeDocumentUpdateVO,
  options?: { [key: string]: any }
) {
  return request<API.RObject>(`/finyx/fKnowledgeDocument/vectorize`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
