// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 创建Dictionary POST /sysDictionary/createDictionary */
export async function postSysDictionaryCreateDictionary(
  body: API.Dictionary,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/sysDictionary/createDictionary`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除Dictionary DELETE /sysDictionary/deleteDictionary */
export async function deleteSysDictionaryDeleteDictionary(
  body: API.Dictionary,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/sysDictionary/deleteDictionary`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用id查询Dictionary GET /sysDictionary/findDictionary */
export async function getSysDictionaryFindDictionary(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSysDictionaryFindDictionaryParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: Record<string, any>; msg?: string }>(
    `/api/v1/sysDictionary/findDictionary`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 分页获取Dictionary列表 GET /sysDictionary/getDictionaryList */
export async function getSysDictionaryGetDictionaryList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSysDictionaryGetDictionaryListParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/v1/sysDictionary/getDictionaryList`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 更新Dictionary PUT /sysDictionary/updateDictionary */
export async function putSysDictionaryUpdateDictionary(
  body: API.Dictionary,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/sysDictionary/updateDictionary`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
