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

import * as API from './types';

/** 查询所有菜谱分类数据 GET /app/recipeCategory/list */
export async function appRecipeCategoryListGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.RListRecipeCategoryVo>('/app/recipeCategory/list', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 商家查询自己有菜谱数据的分类 GET /app/recipeCategory/listOnHasRecipe */
export async function appRecipeCategoryListOnHasRecipeGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.RListRecipeCategoryVo>(
    '/app/recipeCategory/listOnHasRecipe',
    {
      method: 'GET',
      ...(options || {}),
    }
  );
}

/** 修改菜谱分类 PUT /xjpmj/recipeCategory */
export async function xjpmjRecipeCategoryPut({
  body,
  options,
}: {
  body: API.RecipeCategoryBoEditGroup;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/xjpmj/recipeCategory', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增菜谱分类 POST /xjpmj/recipeCategory */
export async function xjpmjRecipeCategoryPost({
  body,
  options,
}: {
  body: API.RecipeCategoryBoAddGroup;
  options?: CustomRequestOptions;
}) {
  return request<API.RVoid>('/xjpmj/recipeCategory', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取菜谱分类详细信息 GET /xjpmj/recipeCategory/${param0} */
export async function xjpmjRecipeCategoryIdGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjRecipeCategoryidGetParams;
  options?: CustomRequestOptions;
}) {
  const { id: param0, ...queryParams } = params;

  return request<API.RRecipeCategoryVo>(`/xjpmj/recipeCategory/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 删除菜谱分类 DELETE /xjpmj/recipeCategory/${param0} */
export async function xjpmjRecipeCategoryIdsDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjRecipeCategoryidsDeleteParams;
  options?: CustomRequestOptions;
}) {
  const { ids: param0, ...queryParams } = params;

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

/** 导出菜谱分类列表 POST /xjpmj/recipeCategory/export */
export async function xjpmjRecipeCategoryExportPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjRecipeCategoryExportPostParams;
  options?: CustomRequestOptions;
}) {
  return request<API.XjpmjRecipeCategoryExportPostResponse>(
    '/xjpmj/recipeCategory/export',
    {
      method: 'POST',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 查询菜谱分类列表 GET /xjpmj/recipeCategory/list */
export async function xjpmjRecipeCategoryListGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.XjpmjRecipeCategoryListGetParams;
  options?: CustomRequestOptions;
}) {
  return request<API.TableDataInfoRecipeCategoryVo>(
    '/xjpmj/recipeCategory/list',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
