/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import type { CustomRequestOptions } from '@/http/types';

import * as API from './types';

/** 评论列表 POST /app/comment/commentList */
export async function appCommentCommentListPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppCommentCommentListPostParams;
  body: API.CommentPageBo;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoCommentVo>('/app/comment/commentList', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除评论 DELETE /app/comment/deleteComment/${param0} */
export async function appCommentDeleteCommentIdDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppCommentDeleteCommentidDeleteParams;
  options?: CustomRequestOptions;
}) {
  const { id: param0, ...queryParams } = params;

  return request<API.RVoid>(`/app/comment/deleteComment/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 发布评论/回复 POST /app/comment/publishComment */
export async function appCommentPublishCommentPost({
  body,
  options,
}: {
  body: API.CommentBo;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/app/comment/publishComment', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 回复列表 POST /app/comment/replyList */
export async function appCommentReplyListPost({
  params,
  body,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.AppCommentReplyListPostParams;
  body: API.ReplyPageBo;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoCommentVo>('/app/comment/replyList', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}
