120 lines
3.7 KiB
TypeScript
120 lines
3.7 KiB
TypeScript
// @ts-ignore
|
|
/* eslint-disable */
|
|
import { request } from 'umi';
|
|
|
|
/** 此处后端没有提供注释 PUT /wp_product/${param0}/constitution */
|
|
export async function wpproductcontrollerSetconstitution(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.wpproductcontrollerSetconstitutionParams,
|
|
body: API.SetConstitutionDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<API.BooleanRes>(`/wp_product/${param0}/constitution`, {
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 GET /wp_product/list */
|
|
export async function wpproductcontrollerGetwpproducts(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.wpproductcontrollerGetwpproductsParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
return request<API.WpProductListRes>('/wp_product/list', {
|
|
method: 'GET',
|
|
params: {
|
|
...params,
|
|
},
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 PUT /wp_product/siteId/${param1}/products/${param0} */
|
|
export async function wpproductcontrollerUpdateproduct(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.wpproductcontrollerUpdateproductParams,
|
|
body: API.UpdateWpProductDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { productId: param0, siteId: param1, ...queryParams } = params;
|
|
return request<API.BooleanRes>(
|
|
`/wp_product/siteId/${param1}/products/${param0}`,
|
|
{
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|
|
|
|
/** 此处后端没有提供注释 PUT /wp_product/siteId/${param2}/products/${param1}/variations/${param0} */
|
|
export async function wpproductcontrollerUpdatevariation(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.wpproductcontrollerUpdatevariationParams,
|
|
body: API.UpdateVariationDTO,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const {
|
|
variationId: param0,
|
|
productId: param1,
|
|
siteId: param2,
|
|
...queryParams
|
|
} = params;
|
|
return request<any>(
|
|
`/wp_product/siteId/${param2}/products/${param1}/variations/${param0}`,
|
|
{
|
|
method: 'PUT',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
},
|
|
);
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /wp_product/sync/${param0} */
|
|
export async function wpproductcontrollerSyncproducts(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.wpproductcontrollerSyncproductsParams,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { siteId: param0, ...queryParams } = params;
|
|
return request<API.BooleanRes>(`/wp_product/sync/${param0}`, {
|
|
method: 'POST',
|
|
params: { ...queryParams },
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/** 此处后端没有提供注释 POST /wp_product/updateState/${param0} */
|
|
export async function wpproductcontrollerUpdatewpproductstate(
|
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
|
params: API.wpproductcontrollerUpdatewpproductstateParams,
|
|
body: Record<string, any>,
|
|
options?: { [key: string]: any },
|
|
) {
|
|
const { id: param0, ...queryParams } = params;
|
|
return request<API.BooleanRes>(`/wp_product/updateState/${param0}`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'text/plain',
|
|
},
|
|
params: { ...queryParams },
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|