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

/** 创建字典 POST /operation/createDictionary */
export async function createDictionary(
	body: BusinessAPI.DictionaryCreateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDictionaryVO>(
		'/operation/createDictionary',
		{
			method: 'POST',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 字典删除 DELETE /operation/destroyDictionary */
export async function destroyDictionary(
	body: BusinessAPI.DictionaryDestroyCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.Response>('/operation/destroyDictionary', {
		method: 'DELETE',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	});
}

/** 字典列表 GET /operation/listDictionary */
export async function listDictionary(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.listDictionaryParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.MultiResponseDictionaryVO>(
		'/operation/listDictionary',
		{
			method: 'GET',
			params: {
				...params,
				dictionaryListQry: undefined,
				...params['dictionaryListQry'],
			},
			...(options || {}),
		},
	);
}

/** 字典列表 GET /operation/pageDictionary */
export async function pageDictionary(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.pageDictionaryParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.PageResponseDictionaryVO>(
		'/operation/pageDictionary',
		{
			method: 'GET',
			params: {
				...params,
				dictionaryPageQry: undefined,
				...params['dictionaryPageQry'],
			},
			...(options || {}),
		},
	);
}

/** 字典详情 GET /operation/showDictionary */
export async function showDictionary(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.showDictionaryParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDictionaryVO>(
		'/operation/showDictionary',
		{
			method: 'GET',
			params: {
				...params,
				dictionaryShowQry: undefined,
				...params['dictionaryShowQry'],
			},
			...(options || {}),
		},
	);
}

/** 字典更新 PUT /operation/updateDictionary */
export async function updateDictionary(
	body: BusinessAPI.DictionaryUpdateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDictionaryVO>(
		'/operation/updateDictionary',
		{
			method: 'PUT',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 字典更新 PATCH /operation/updateDictionary */
export async function updateDictionary1(
	body: BusinessAPI.DictionaryUpdateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseDictionaryVO>(
		'/operation/updateDictionary',
		{
			method: 'PATCH',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}
