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

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

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

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

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

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

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

/** 根据分段id查询单体详情 GET /fKnowledgeDocumentSegment/detailByChunkId */
export async function getDetailByChunkId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetailByChunkIdParams,
  options?: { [key: string]: any }
) {
  return request<API.RFKnowledgeDocumentSegmentResultVO>(
    `/finyx/fKnowledgeDocumentSegment/detailByChunkId`,
    {
      method: 'GET',
      params: {
        ...params
      },
      ...(options || {})
    }
  )
}

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

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

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