// @ts-ignore /* eslint-disable */ import { request } from 'umi'; /** 此处后端没有提供注释 POST /product/ */ export async function productcontrollerCreateproduct( body: API.CreateProductDTO, options?: { [key: string]: any }, ) { return request('/product/', { method: 'POST', headers: { 'Content-Type': 'application/json', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/${param0} */ export async function productcontrollerGetproductbyid( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetproductbyidParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/${param0}`, { method: 'GET', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/${param0} */ export async function productcontrollerUpdateproduct( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerUpdateproductParams, body: API.UpdateProductDTO, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/${param0}`, { method: 'PUT', headers: { 'Content-Type': 'application/json', }, params: { ...queryParams }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/${param0} */ export async function productcontrollerDeleteproduct( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerDeleteproductParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/${param0}/components */ export async function productcontrollerGetproductcomponents( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetproductcomponentsParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/${param0}/components`, { method: 'GET', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/${param0}/components/auto */ export async function productcontrollerAutobindcomponents( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerAutobindcomponentsParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/${param0}/components/auto`, { method: 'POST', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/${param0}/site-skus */ export async function productcontrollerGetproductsiteskus( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetproductsiteskusParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/${param0}/site-skus`, { method: 'GET', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/${param0}/site-skus */ export async function productcontrollerBindproductsiteskus( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerBindproductsiteskusParams, body: Record, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/${param0}/site-skus`, { method: 'POST', headers: { 'Content-Type': 'text/plain', }, params: { ...queryParams }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/attribute */ export async function productcontrollerGetattributelist( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetattributelistParams, options?: { [key: string]: any }, ) { return request('/product/attribute', { method: 'GET', params: { ...params, pageSize: undefined, ...params['pageSize'], current: undefined, ...params['current'], }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/attribute */ export async function productcontrollerCreateattribute( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCreateattributeParams, body: Record, options?: { [key: string]: any }, ) { return request('/product/attribute', { method: 'POST', headers: { 'Content-Type': 'text/plain', }, params: { ...params, }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/attribute/${param0} */ export async function productcontrollerUpdateattribute( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerUpdateattributeParams, body: Record, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/attribute/${param0}`, { method: 'PUT', headers: { 'Content-Type': 'text/plain', }, params: { ...queryParams, }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/attribute/${param0} */ export async function productcontrollerDeleteattribute( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerDeleteattributeParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/attribute/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/attributeAll */ export async function productcontrollerGetattributeall( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetattributeallParams, options?: { [key: string]: any }, ) { return request('/product/attributeAll', { method: 'GET', params: { ...params, }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/batch-delete */ export async function productcontrollerBatchdeleteproduct( body: API.BatchDeleteProductDTO, options?: { [key: string]: any }, ) { return request('/product/batch-delete', { method: 'POST', headers: { 'Content-Type': 'application/json', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/batch-update */ export async function productcontrollerBatchupdateproduct( body: API.BatchUpdateProductDTO, options?: { [key: string]: any }, ) { return request('/product/batch-update', { method: 'PUT', headers: { 'Content-Type': 'application/json', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/brand */ export async function productcontrollerCompatcreatebrand( body: Record, options?: { [key: string]: any }, ) { return request('/product/brand', { method: 'POST', headers: { 'Content-Type': 'text/plain', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/brand/${param0} */ export async function productcontrollerCompatupdatebrand( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatupdatebrandParams, body: Record, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/brand/${param0}`, { method: 'PUT', headers: { 'Content-Type': 'text/plain', }, params: { ...queryParams }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/brand/${param0} */ export async function productcontrollerCompatdeletebrand( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatdeletebrandParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/brand/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/brandAll */ export async function productcontrollerCompatbrandall(options?: { [key: string]: any; }) { return request('/product/brandAll', { method: 'GET', ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/brands */ export async function productcontrollerCompatbrands( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatbrandsParams, options?: { [key: string]: any }, ) { return request('/product/brands', { method: 'GET', params: { ...params, pageSize: undefined, ...params['pageSize'], current: undefined, ...params['current'], }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/categories/all */ export async function productcontrollerGetcategoriesall(options?: { [key: string]: any; }) { return request('/product/categories/all', { method: 'GET', ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/category */ export async function productcontrollerCreatecategory( body: Record, options?: { [key: string]: any }, ) { return request('/product/category', { method: 'POST', headers: { 'Content-Type': 'text/plain', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/category/${param0} */ export async function productcontrollerUpdatecategory( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerUpdatecategoryParams, body: Record, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/category/${param0}`, { method: 'PUT', headers: { 'Content-Type': 'text/plain', }, params: { ...queryParams }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/category/${param0} */ export async function productcontrollerDeletecategory( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerDeletecategoryParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/category/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/category/${param0}/attributes */ export async function productcontrollerGetcategoryattributes( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetcategoryattributesParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/category/${param0}/attributes`, { method: 'GET', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/category/attribute */ export async function productcontrollerCreatecategoryattribute( body: Record, options?: { [key: string]: any }, ) { return request('/product/category/attribute', { method: 'POST', headers: { 'Content-Type': 'text/plain', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/category/attribute/${param0} */ export async function productcontrollerDeletecategoryattribute( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerDeletecategoryattributeParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/category/attribute/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/export */ export async function productcontrollerExportproductscsv(options?: { [key: string]: any; }) { return request('/product/export', { method: 'GET', ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/flavors */ export async function productcontrollerCompatflavors( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatflavorsParams, options?: { [key: string]: any }, ) { return request('/product/flavors', { method: 'GET', params: { ...params, pageSize: undefined, ...params['pageSize'], current: undefined, ...params['current'], }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/flavors */ export async function productcontrollerCompatcreateflavors( body: Record, options?: { [key: string]: any }, ) { return request('/product/flavors', { method: 'POST', headers: { 'Content-Type': 'text/plain', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/flavors/${param0} */ export async function productcontrollerCompatupdateflavors( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatupdateflavorsParams, body: Record, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/flavors/${param0}`, { method: 'PUT', headers: { 'Content-Type': 'text/plain', }, params: { ...queryParams }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/flavors/${param0} */ export async function productcontrollerCompatdeleteflavors( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatdeleteflavorsParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/flavors/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/flavorsAll */ export async function productcontrollerCompatflavorsall(options?: { [key: string]: any; }) { return request('/product/flavorsAll', { method: 'GET', ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/import */ export async function productcontrollerImportproductscsv( body: {}, files?: File[], options?: { [key: string]: any }, ) { const formData = new FormData(); if (files) { files.forEach((f) => formData.append('files', f || '')); } Object.keys(body).forEach((ele) => { const item = (body as any)[ele]; if (item !== undefined && item !== null) { if (typeof item === 'object' && !(item instanceof File)) { if (item instanceof Array) { item.forEach((f) => formData.append(ele, f || '')); } else { formData.append( ele, new Blob([JSON.stringify(item)], { type: 'application/json' }), ); } } else { formData.append(ele, item); } } }); return request('/product/import', { method: 'POST', data: formData, requestType: 'form', ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/list */ export async function productcontrollerGetproductlist( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetproductlistParams, options?: { [key: string]: any }, ) { return request('/product/list', { method: 'GET', params: { ...params, }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/search */ export async function productcontrollerSearchproducts( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerSearchproductsParams, options?: { [key: string]: any }, ) { return request('/product/search', { method: 'GET', params: { ...params, }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/site-sku/${param0} */ export async function productcontrollerGetproductbysitesku( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerGetproductbysiteskuParams, options?: { [key: string]: any }, ) { const { siteSku: param0, ...queryParams } = params; return request(`/product/site-sku/${param0}`, { method: 'GET', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/size */ export async function productcontrollerCompatsize( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatsizeParams, options?: { [key: string]: any }, ) { return request('/product/size', { method: 'GET', params: { ...params, pageSize: undefined, ...params['pageSize'], current: undefined, ...params['current'], }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/size */ export async function productcontrollerCompatcreatesize( body: Record, options?: { [key: string]: any }, ) { return request('/product/size', { method: 'POST', headers: { 'Content-Type': 'text/plain', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/size/${param0} */ export async function productcontrollerCompatupdatesize( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatupdatesizeParams, body: Record, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/size/${param0}`, { method: 'PUT', headers: { 'Content-Type': 'text/plain', }, params: { ...queryParams }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/size/${param0} */ export async function productcontrollerCompatdeletesize( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatdeletesizeParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/size/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/sizeAll */ export async function productcontrollerCompatsizeall(options?: { [key: string]: any; }) { return request('/product/sizeAll', { method: 'GET', ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/sku/${param0} */ export async function productcontrollerProductbysku( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerProductbyskuParams, options?: { [key: string]: any }, ) { const { sku: param0, ...queryParams } = params; return request(`/product/sku/${param0}`, { method: 'GET', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/strength */ export async function productcontrollerCompatstrength( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatstrengthParams, options?: { [key: string]: any }, ) { return request('/product/strength', { method: 'GET', params: { ...params, pageSize: undefined, ...params['pageSize'], current: undefined, ...params['current'], }, ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/strength */ export async function productcontrollerCompatcreatestrength( body: Record, options?: { [key: string]: any }, ) { return request('/product/strength', { method: 'POST', headers: { 'Content-Type': 'text/plain', }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 PUT /product/strength/${param0} */ export async function productcontrollerCompatupdatestrength( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatupdatestrengthParams, body: Record, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/strength/${param0}`, { method: 'PUT', headers: { 'Content-Type': 'text/plain', }, params: { ...queryParams }, data: body, ...(options || {}), }); } /** 此处后端没有提供注释 DELETE /product/strength/${param0} */ export async function productcontrollerCompatdeletestrength( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerCompatdeletestrengthParams, options?: { [key: string]: any }, ) { const { id: param0, ...queryParams } = params; return request(`/product/strength/${param0}`, { method: 'DELETE', params: { ...queryParams }, ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/strengthAll */ export async function productcontrollerCompatstrengthall(options?: { [key: string]: any; }) { return request('/product/strengthAll', { method: 'GET', ...(options || {}), }); } /** 此处后端没有提供注释 POST /product/sync-stock */ export async function productcontrollerSyncstocktoproduct(options?: { [key: string]: any; }) { return request('/product/sync-stock', { method: 'POST', ...(options || {}), }); } /** 此处后端没有提供注释 GET /product/wp-products */ export async function productcontrollerGetwpproducts(options?: { [key: string]: any; }) { return request('/product/wp-products', { method: 'GET', ...(options || {}), }); } /** 此处后端没有提供注释 PUT /productupdateNameCn/${param1}/${param0} */ export async function productcontrollerUpdatenamecn( // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) params: API.productcontrollerUpdatenamecnParams, options?: { [key: string]: any }, ) { const { nameCn: param0, id: param1, ...queryParams } = params; return request(`/productupdateNameCn/${param1}/${param0}`, { method: 'PUT', params: { ...queryParams }, ...(options || {}), }); }