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

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

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

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

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

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

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

/** 礼盒更新 PATCH /operation/updateGiftBox */
export async function updateGiftBox1(
	body: BusinessAPI.GiftBoxUpdateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseGiftBoxVO>(
		'/operation/updateGiftBox',
		{
			method: 'PATCH',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}
