feat: 添加产品工具, 重构产品 #31
|
|
@ -0,0 +1,217 @@
|
|||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import { request } from 'umi';
|
||||
|
||||
/** 此处后端没有提供注释 POST /dict/ */
|
||||
export async function dictcontrollerCreatedict(
|
||||
body: API.CreateDictDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/dict/', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /dict/${param0} */
|
||||
export async function dictcontrollerGetdict(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.dictcontrollerGetdictParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/dict/${param0}`, {
|
||||
method: 'GET',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 PUT /dict/${param0} */
|
||||
export async function dictcontrollerUpdatedict(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.dictcontrollerUpdatedictParams,
|
||||
body: API.UpdateDictDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/dict/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
params: { ...queryParams },
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 DELETE /dict/${param0} */
|
||||
export async function dictcontrollerDeletedict(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.dictcontrollerDeletedictParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/dict/${param0}`, {
|
||||
method: 'DELETE',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /dict/import */
|
||||
export async function dictcontrollerImportdicts(
|
||||
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<any>('/dict/import', {
|
||||
method: 'POST',
|
||||
data: formData,
|
||||
requestType: 'form',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /dict/item */
|
||||
export async function dictcontrollerCreatedictitem(
|
||||
body: API.CreateDictItemDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/dict/item', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 PUT /dict/item/${param0} */
|
||||
export async function dictcontrollerUpdatedictitem(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.dictcontrollerUpdatedictitemParams,
|
||||
body: API.UpdateDictItemDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/dict/item/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
params: { ...queryParams },
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 DELETE /dict/item/${param0} */
|
||||
export async function dictcontrollerDeletedictitem(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.dictcontrollerDeletedictitemParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/dict/item/${param0}`, {
|
||||
method: 'DELETE',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /dict/item/import */
|
||||
export async function dictcontrollerImportdictitems(
|
||||
body: Record<string, any>,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/dict/item/import', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'text/plain',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /dict/item/template */
|
||||
export async function dictcontrollerDownloaddictitemtemplate(options?: {
|
||||
[key: string]: any;
|
||||
}) {
|
||||
return request<any>('/dict/item/template', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /dict/items */
|
||||
export async function dictcontrollerGetdictitems(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.dictcontrollerGetdictitemsParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/dict/items', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /dict/list */
|
||||
export async function dictcontrollerGetdicts(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.dictcontrollerGetdictsParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/dict/list', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /dict/template */
|
||||
export async function dictcontrollerDownloaddicttemplate(options?: {
|
||||
[key: string]: any;
|
||||
}) {
|
||||
return request<any>('/dict/template', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as customer from './customer';
|
||||
import * as dict from './dict';
|
||||
import * as locales from './locales';
|
||||
import * as logistics from './logistics';
|
||||
import * as order from './order';
|
||||
import * as product from './product';
|
||||
|
|
@ -10,11 +12,14 @@ import * as site from './site';
|
|||
import * as statistics from './statistics';
|
||||
import * as stock from './stock';
|
||||
import * as subscription from './subscription';
|
||||
import * as template from './template';
|
||||
import * as user from './user';
|
||||
import * as webhook from './webhook';
|
||||
import * as wpProduct from './wpProduct';
|
||||
export default {
|
||||
customer,
|
||||
dict,
|
||||
locales,
|
||||
logistics,
|
||||
order,
|
||||
product,
|
||||
|
|
@ -22,6 +27,7 @@ export default {
|
|||
statistics,
|
||||
stock,
|
||||
subscription,
|
||||
template,
|
||||
user,
|
||||
webhook,
|
||||
wpProduct,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import { request } from 'umi';
|
||||
|
||||
/** 此处后端没有提供注释 GET /locales/${param0} */
|
||||
export async function localecontrollerGetlocale(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.localecontrollerGetlocaleParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { lang: param0, ...queryParams } = params;
|
||||
return request<any>(`/locales/${param0}`, {
|
||||
method: 'GET',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
|
@ -30,6 +30,20 @@ export async function ordercontrollerDelorder(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /order/${param0}/related */
|
||||
export async function ordercontrollerGetrelatedbyorder(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ordercontrollerGetrelatedbyorderParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { orderId: param0, ...queryParams } = params;
|
||||
return request<any>(`/order/${param0}/related`, {
|
||||
method: 'GET',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /order/createNote */
|
||||
export async function ordercontrollerCreatenote(
|
||||
body: API.CreateOrderNoteDTO,
|
||||
|
|
@ -60,6 +74,36 @@ export async function ordercontrollerGetorderbynumber(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /order/getOrderItemList */
|
||||
export async function ordercontrollerGetorderitemlist(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ordercontrollerGetorderitemlistParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/order/getOrderItemList', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /order/getOrderItems */
|
||||
export async function ordercontrollerGetorderitems(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.ordercontrollerGetorderitemsParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/order/getOrderItems', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /order/getOrders */
|
||||
export async function ordercontrollerGetorders(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
|
|
|||
|
|
@ -65,37 +65,12 @@ export async function productcontrollerBatchsetsku(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /product/categorieAll */
|
||||
export async function productcontrollerGetcategorieall(options?: {
|
||||
[key: string]: any;
|
||||
}) {
|
||||
return request<any>('/product/categorieAll', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /product/categories */
|
||||
export async function productcontrollerGetcategories(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.productcontrollerGetcategoriesParams,
|
||||
/** 此处后端没有提供注释 POST /product/brand */
|
||||
export async function productcontrollerCreatebrand(
|
||||
body: API.CreateBrandDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.ProductCatListRes>('/product/categories', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /product/category */
|
||||
export async function productcontrollerCreatecategory(
|
||||
body: API.CreateCategoryDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.ProductCatRes>('/product/category', {
|
||||
return request<API.ProductBrandRes>('/product/brand', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
@ -105,15 +80,15 @@ export async function productcontrollerCreatecategory(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 PUT /product/category/${param0} */
|
||||
export async function productcontrollerUpdatecategory(
|
||||
/** 此处后端没有提供注释 PUT /product/brand/${param0} */
|
||||
export async function productcontrollerUpdatebrand(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.productcontrollerUpdatecategoryParams,
|
||||
body: API.UpdateCategoryDTO,
|
||||
params: API.productcontrollerUpdatebrandParams,
|
||||
body: API.UpdateBrandDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<API.ProductCatRes>(`/product/category/${param0}`, {
|
||||
return request<API.ProductBrandRes>(`/product/brand/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
@ -124,20 +99,45 @@ export async function productcontrollerUpdatecategory(
|
|||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 DELETE /product/category/${param0} */
|
||||
export async function productcontrollerDeletecategory(
|
||||
/** 此处后端没有提供注释 DELETE /product/brand/${param0} */
|
||||
export async function productcontrollerDeletebrand(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.productcontrollerDeletecategoryParams,
|
||||
params: API.productcontrollerDeletebrandParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<API.BooleanRes>(`/product/category/${param0}`, {
|
||||
return request<API.BooleanRes>(`/product/brand/${param0}`, {
|
||||
method: 'DELETE',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /product/brandAll */
|
||||
export async function productcontrollerGetbrandall(options?: {
|
||||
[key: string]: any;
|
||||
}) {
|
||||
return request<any>('/product/brandAll', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /product/brands */
|
||||
export async function productcontrollerGetbrands(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.productcontrollerGetbrandsParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.ProductBrandListRes>('/product/brands', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /product/flavors */
|
||||
export async function productcontrollerGetflavors(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
|
|
|||
|
|
@ -9,3 +9,78 @@ export async function sitecontrollerAll(options?: { [key: string]: any }) {
|
|||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /site/create */
|
||||
export async function sitecontrollerCreate(
|
||||
body: API.CreateSiteDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<any>('/site/create', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 PUT /site/disable/${param0} */
|
||||
export async function sitecontrollerDisable(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.sitecontrollerDisableParams,
|
||||
body: API.DisableSiteDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/site/disable/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
params: { ...queryParams },
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /site/get/${param0} */
|
||||
export async function sitecontrollerGet(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.sitecontrollerGetParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/site/get/${param0}`, {
|
||||
method: 'GET',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /site/list */
|
||||
export async function sitecontrollerList(options?: { [key: string]: any }) {
|
||||
return request<any>('/site/list', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 PUT /site/update/${param0} */
|
||||
export async function sitecontrollerUpdate(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.sitecontrollerUpdateParams,
|
||||
body: API.UpdateSiteDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<any>(`/site/update/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
params: { ...queryParams },
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import { request } from 'umi';
|
||||
|
||||
/** 此处后端没有提供注释 GET /template/ */
|
||||
export async function templatecontrollerGettemplatelist(options?: {
|
||||
[key: string]: any;
|
||||
}) {
|
||||
return request<API.Template[]>('/template/', {
|
||||
method: 'GET',
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /template/ */
|
||||
export async function templatecontrollerCreatetemplate(
|
||||
body: API.CreateTemplateDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Template>('/template/', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /template/${param0} */
|
||||
export async function templatecontrollerGettemplatebyname(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.templatecontrollerGettemplatebynameParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { name: param0, ...queryParams } = params;
|
||||
return request<API.Template>(`/template/${param0}`, {
|
||||
method: 'GET',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 PUT /template/${param0} */
|
||||
export async function templatecontrollerUpdatetemplate(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.templatecontrollerUpdatetemplateParams,
|
||||
body: API.UpdateTemplateDTO,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<API.Template>(`/template/${param0}`, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
params: { ...queryParams },
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 DELETE /template/${param0} */
|
||||
export async function templatecontrollerDeletetemplate(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.templatecontrollerDeletetemplateParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const { id: param0, ...queryParams } = params;
|
||||
return request<API.BooleanRes>(`/template/${param0}`, {
|
||||
method: 'DELETE',
|
||||
params: { ...queryParams },
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
|
@ -23,20 +23,7 @@ declare namespace API {
|
|||
data?: boolean;
|
||||
};
|
||||
|
||||
type Category = {
|
||||
/** 分类 ID */
|
||||
id: number;
|
||||
/** 分类名称 */
|
||||
name: string;
|
||||
/** 唯一识别key */
|
||||
unique_key: string;
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 更新时间 */
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
type CategoryPaginatedResponse = {
|
||||
type BrandPaginatedResponse = {
|
||||
/** 当前页码 */
|
||||
page?: number;
|
||||
/** 每页大小 */
|
||||
|
|
@ -44,16 +31,24 @@ declare namespace API {
|
|||
/** 总记录数 */
|
||||
total?: number;
|
||||
/** 数据列表 */
|
||||
items?: Category[];
|
||||
items?: Dict[];
|
||||
};
|
||||
|
||||
type CreateCategoryDTO = {
|
||||
/** 分类名称 */
|
||||
type CreateBrandDTO = {
|
||||
/** 品牌名称 */
|
||||
title: string;
|
||||
/** 品牌唯一标识 */
|
||||
name: string;
|
||||
};
|
||||
|
||||
type CreateDictDTO = {};
|
||||
|
||||
type CreateDictItemDTO = {};
|
||||
|
||||
type CreateFlavorsDTO = {
|
||||
/** 分类名称 */
|
||||
/** 口味名称 */
|
||||
title: string;
|
||||
/** 口味唯一标识 */
|
||||
name: string;
|
||||
};
|
||||
|
||||
|
|
@ -67,10 +62,14 @@ declare namespace API {
|
|||
name: string;
|
||||
/** 产品描述 */
|
||||
description?: string;
|
||||
/** 分类 ID */
|
||||
categoryId?: number;
|
||||
strengthId?: number;
|
||||
flavorsId?: number;
|
||||
/** 产品 SKU */
|
||||
sku?: string;
|
||||
/** 品牌 */
|
||||
brand?: DictItemDTO;
|
||||
/** 规格 */
|
||||
strength?: DictItemDTO;
|
||||
/** 口味 */
|
||||
flavor?: DictItemDTO;
|
||||
humidity?: string;
|
||||
};
|
||||
|
||||
|
|
@ -82,6 +81,8 @@ declare namespace API {
|
|||
items?: PurchaseOrderItem[];
|
||||
};
|
||||
|
||||
type CreateSiteDTO = {};
|
||||
|
||||
type CreateStockPointDTO = {
|
||||
name?: string;
|
||||
location?: string;
|
||||
|
|
@ -90,10 +91,19 @@ declare namespace API {
|
|||
};
|
||||
|
||||
type CreateStrengthDTO = {
|
||||
/** 分类名称 */
|
||||
/** 规格名称 */
|
||||
title?: string;
|
||||
/** 规格唯一标识 */
|
||||
name: string;
|
||||
};
|
||||
|
||||
type CreateTemplateDTO = {
|
||||
/** 模板名称 */
|
||||
name: string;
|
||||
/** 模板内容 */
|
||||
value: string;
|
||||
};
|
||||
|
||||
type Cubid = {
|
||||
w?: number;
|
||||
h?: number;
|
||||
|
|
@ -134,6 +144,50 @@ declare namespace API {
|
|||
SignatureRequirementEnum?: any;
|
||||
};
|
||||
|
||||
type Dict = {};
|
||||
|
||||
type dictcontrollerDeletedictitemParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type dictcontrollerDeletedictParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type dictcontrollerGetdictitemsParams = {
|
||||
dictId?: number;
|
||||
};
|
||||
|
||||
type dictcontrollerGetdictParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type dictcontrollerGetdictsParams = {
|
||||
name?: string;
|
||||
title?: string;
|
||||
};
|
||||
|
||||
type dictcontrollerUpdatedictitemParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type dictcontrollerUpdatedictParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type DictItemDTO = {
|
||||
/** 显示名称 */
|
||||
title?: string;
|
||||
/** 唯一标识 */
|
||||
name: string;
|
||||
};
|
||||
|
||||
type DisableSiteDTO = {};
|
||||
|
||||
type localecontrollerGetlocaleParams = {
|
||||
lang: string;
|
||||
};
|
||||
|
||||
type Location = {
|
||||
name?: string;
|
||||
address?: Address;
|
||||
|
|
@ -299,6 +353,32 @@ declare namespace API {
|
|||
orderId: number;
|
||||
};
|
||||
|
||||
type ordercontrollerGetorderitemlistParams = {
|
||||
/** 页码 */
|
||||
current?: number;
|
||||
/** 每页大小 */
|
||||
pageSize?: number;
|
||||
siteId?: string;
|
||||
name?: string;
|
||||
externalProductId?: string;
|
||||
externalVariationId?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
};
|
||||
|
||||
type ordercontrollerGetorderitemsParams = {
|
||||
isSource?: boolean;
|
||||
exceptPackage?: boolean;
|
||||
/** 页码 */
|
||||
current?: number;
|
||||
/** 每页大小 */
|
||||
pageSize?: number;
|
||||
siteId?: string;
|
||||
name?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
};
|
||||
|
||||
type ordercontrollerGetordersalesParams = {
|
||||
isSource?: boolean;
|
||||
exceptPackage?: boolean;
|
||||
|
|
@ -338,6 +418,12 @@ declare namespace API {
|
|||
| 'return-approved'
|
||||
| 'return-cancelled';
|
||||
payment_method?: string;
|
||||
/** 仅订阅订单(父订阅订单或包含订阅商品) */
|
||||
isSubscriptionOnly?: boolean;
|
||||
};
|
||||
|
||||
type ordercontrollerGetrelatedbyorderParams = {
|
||||
orderId: number;
|
||||
};
|
||||
|
||||
type ordercontrollerRefundorderParams = {
|
||||
|
|
@ -437,8 +523,17 @@ declare namespace API {
|
|||
subtotal_tax?: number;
|
||||
total?: number;
|
||||
total_tax?: number;
|
||||
tax_class?: string;
|
||||
taxes?: any;
|
||||
meta_data?: any;
|
||||
sku?: string;
|
||||
global_unique_id?: string;
|
||||
price?: number;
|
||||
image?: Record<string, any>;
|
||||
parent_name?: string;
|
||||
bundled_by?: string;
|
||||
bundled_item_title?: string;
|
||||
bundled_items?: any;
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 更新时间 */
|
||||
|
|
@ -600,14 +695,10 @@ declare namespace API {
|
|||
id: number;
|
||||
/** 产品名称 */
|
||||
name: string;
|
||||
/** 产品中文名称 */
|
||||
nameCn?: string;
|
||||
/** 产品描述 */
|
||||
description?: string;
|
||||
/** 分类 ID */
|
||||
categoryId?: number;
|
||||
flavorsId?: number;
|
||||
strengthId?: number;
|
||||
humidity?: string;
|
||||
/** sku */
|
||||
sku?: string;
|
||||
/** 创建时间 */
|
||||
|
|
@ -616,7 +707,7 @@ declare namespace API {
|
|||
updatedAt: string;
|
||||
};
|
||||
|
||||
type ProductCatListRes = {
|
||||
type ProductBrandListRes = {
|
||||
/** 状态码 */
|
||||
code?: number;
|
||||
/** 是否成功 */
|
||||
|
|
@ -624,10 +715,10 @@ declare namespace API {
|
|||
/** 消息内容 */
|
||||
message?: string;
|
||||
/** 响应数据 */
|
||||
data?: CategoryPaginatedResponse;
|
||||
data?: BrandPaginatedResponse;
|
||||
};
|
||||
|
||||
type ProductCatRes = {
|
||||
type ProductBrandRes = {
|
||||
/** 状态码 */
|
||||
code?: number;
|
||||
/** 是否成功 */
|
||||
|
|
@ -635,10 +726,10 @@ declare namespace API {
|
|||
/** 消息内容 */
|
||||
message?: string;
|
||||
/** 响应数据 */
|
||||
data?: Category;
|
||||
data?: Dict;
|
||||
};
|
||||
|
||||
type productcontrollerDeletecategoryParams = {
|
||||
type productcontrollerDeletebrandParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
|
|
@ -654,7 +745,7 @@ declare namespace API {
|
|||
id: number;
|
||||
};
|
||||
|
||||
type productcontrollerGetcategoriesParams = {
|
||||
type productcontrollerGetbrandsParams = {
|
||||
/** 页码 */
|
||||
current?: number;
|
||||
/** 每页大小 */
|
||||
|
|
@ -679,8 +770,8 @@ declare namespace API {
|
|||
pageSize?: number;
|
||||
/** 关键字 */
|
||||
name?: string;
|
||||
/** 分类 ID */
|
||||
categoryId?: number;
|
||||
/** 品牌 ID */
|
||||
brandId?: number;
|
||||
};
|
||||
|
||||
type productcontrollerGetstrengthParams = {
|
||||
|
|
@ -700,7 +791,7 @@ declare namespace API {
|
|||
name?: string;
|
||||
};
|
||||
|
||||
type productcontrollerUpdatecategoryParams = {
|
||||
type productcontrollerUpdatebrandParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
|
|
@ -811,7 +902,7 @@ declare namespace API {
|
|||
items?: PurchaseOrderDTO[];
|
||||
};
|
||||
|
||||
type QueryCategoryDTO = {
|
||||
type QueryBrandDTO = {
|
||||
/** 页码 */
|
||||
current?: number;
|
||||
/** 每页大小 */
|
||||
|
|
@ -867,6 +958,21 @@ declare namespace API {
|
|||
| 'return-approved'
|
||||
| 'return-cancelled';
|
||||
payment_method?: string;
|
||||
/** 仅订阅订单(父订阅订单或包含订阅商品) */
|
||||
isSubscriptionOnly?: boolean;
|
||||
};
|
||||
|
||||
type QueryOrderItemDTO = {
|
||||
/** 页码 */
|
||||
current?: number;
|
||||
/** 每页大小 */
|
||||
pageSize?: number;
|
||||
siteId?: string;
|
||||
name?: string;
|
||||
externalProductId?: string;
|
||||
externalVariationId?: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
};
|
||||
|
||||
type QueryOrderSalesDTO = {
|
||||
|
|
@ -896,8 +1002,8 @@ declare namespace API {
|
|||
pageSize?: number;
|
||||
/** 关键字 */
|
||||
name?: string;
|
||||
/** 分类 ID */
|
||||
categoryId?: number;
|
||||
/** 品牌 ID */
|
||||
brandId?: number;
|
||||
};
|
||||
|
||||
type QueryPurchaseOrderDTO = {
|
||||
|
|
@ -918,6 +1024,8 @@ declare namespace API {
|
|||
isActive?: boolean;
|
||||
};
|
||||
|
||||
type QuerySiteDTO = {};
|
||||
|
||||
type QueryStockDTO = {
|
||||
/** 页码 */
|
||||
current?: number;
|
||||
|
|
@ -965,7 +1073,7 @@ declare namespace API {
|
|||
| 'pending-cancel';
|
||||
/** 客户邮箱 */
|
||||
customer_email?: string;
|
||||
/** 关键字(订阅ID、邮箱等) */
|
||||
/** 关键字(订阅ID、邮箱等) */
|
||||
keyword?: string;
|
||||
};
|
||||
|
||||
|
|
@ -1111,17 +1219,29 @@ declare namespace API {
|
|||
/** 站点 ID */
|
||||
id?: string;
|
||||
/** 站点 URL */
|
||||
wpApiUrl?: string;
|
||||
apiUrl?: string;
|
||||
/** 站点 rest key */
|
||||
consumerKey?: string;
|
||||
/** 站点 rest 秘钥 */
|
||||
consumerSecret?: string;
|
||||
/** 站点名 */
|
||||
siteName?: string;
|
||||
/** 站点邮箱 */
|
||||
email?: string;
|
||||
/** 站点邮箱密码 */
|
||||
emailPswd?: string;
|
||||
/** 平台类型 */
|
||||
type?: 'woocommerce' | 'shopyy';
|
||||
/** SKU 前缀 */
|
||||
skuPrefix?: string;
|
||||
};
|
||||
|
||||
type sitecontrollerDisableParams = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
type sitecontrollerGetParams = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
type sitecontrollerUpdateParams = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
type SkuItemDTO = {
|
||||
|
|
@ -1345,7 +1465,7 @@ declare namespace API {
|
|||
billing_interval?: number;
|
||||
customer_id?: number;
|
||||
customer_email?: string;
|
||||
/** 父订单/父订阅ID(如有) */
|
||||
/** 父订单/父订阅ID(如有) */
|
||||
parent_id?: number;
|
||||
start_date?: string;
|
||||
trial_end?: string;
|
||||
|
|
@ -1376,7 +1496,7 @@ declare namespace API {
|
|||
| 'pending-cancel';
|
||||
/** 客户邮箱 */
|
||||
customer_email?: string;
|
||||
/** 关键字(订阅ID、邮箱等) */
|
||||
/** 关键字(订阅ID、邮箱等) */
|
||||
keyword?: string;
|
||||
};
|
||||
|
||||
|
|
@ -1411,18 +1531,49 @@ declare namespace API {
|
|||
amount?: Money;
|
||||
};
|
||||
|
||||
type Template = {
|
||||
id?: number;
|
||||
name?: string;
|
||||
value?: string;
|
||||
description?: string;
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 更新时间 */
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
type templatecontrollerDeletetemplateParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type templatecontrollerGettemplatebynameParams = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
type templatecontrollerUpdatetemplateParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type Time = {
|
||||
hour?: string;
|
||||
minute?: string;
|
||||
};
|
||||
|
||||
type UpdateCategoryDTO = {
|
||||
/** 分类名称 */
|
||||
type UpdateBrandDTO = {
|
||||
/** 品牌名称 */
|
||||
title?: string;
|
||||
/** 品牌唯一标识 */
|
||||
name?: string;
|
||||
};
|
||||
|
||||
type UpdateDictDTO = {};
|
||||
|
||||
type UpdateDictItemDTO = {};
|
||||
|
||||
type UpdateFlavorsDTO = {
|
||||
/** 分类名称 */
|
||||
/** 口味名称 */
|
||||
title?: string;
|
||||
/** 口味唯一标识 */
|
||||
name?: string;
|
||||
};
|
||||
|
||||
|
|
@ -1431,10 +1582,14 @@ declare namespace API {
|
|||
name?: string;
|
||||
/** 产品描述 */
|
||||
description?: string;
|
||||
/** 分类 ID */
|
||||
categoryId?: number;
|
||||
strengthId?: number;
|
||||
flavorsId?: number;
|
||||
/** 产品 SKU */
|
||||
sku?: string;
|
||||
/** 品牌 */
|
||||
brand?: DictItemDTO;
|
||||
/** 规格 */
|
||||
strength?: DictItemDTO;
|
||||
/** 口味 */
|
||||
flavor?: DictItemDTO;
|
||||
humidity?: string;
|
||||
};
|
||||
|
||||
|
|
@ -1446,6 +1601,8 @@ declare namespace API {
|
|||
items?: PurchaseOrderItem[];
|
||||
};
|
||||
|
||||
type UpdateSiteDTO = {};
|
||||
|
||||
type UpdateStockDTO = {
|
||||
stockPointId?: number;
|
||||
productSku?: string;
|
||||
|
|
@ -1463,10 +1620,19 @@ declare namespace API {
|
|||
};
|
||||
|
||||
type UpdateStrengthDTO = {
|
||||
/** 分类名称 */
|
||||
/** 规格名称 */
|
||||
title?: string;
|
||||
/** 规格唯一标识 */
|
||||
name?: string;
|
||||
};
|
||||
|
||||
type UpdateTemplateDTO = {
|
||||
/** 模板名称 */
|
||||
name: string;
|
||||
/** 模板内容 */
|
||||
value: string;
|
||||
};
|
||||
|
||||
type UpdateVariationDTO = {
|
||||
/** 产品名称 */
|
||||
name?: string;
|
||||
|
|
@ -1597,18 +1763,74 @@ declare namespace API {
|
|||
| 'auto-draft'
|
||||
| 'future'
|
||||
| 'inherit';
|
||||
/** 是否为特色产品 */
|
||||
featured?: boolean;
|
||||
/** 目录可见性 */
|
||||
catalog_visibility?: string;
|
||||
/** 产品描述 */
|
||||
description?: string;
|
||||
/** 产品短描述 */
|
||||
short_description?: string;
|
||||
/** 上下架状态 */
|
||||
stockStatus?: 'instock' | 'outofstock' | 'onbackorder';
|
||||
/** 库存数量 */
|
||||
stock_quantity?: number;
|
||||
/** 允许缺货下单 */
|
||||
backorders?: string;
|
||||
/** 是否单独出售 */
|
||||
sold_individually?: boolean;
|
||||
/** 常规价格 */
|
||||
regular_price?: number;
|
||||
/** 销售价格 */
|
||||
sale_price?: number;
|
||||
/** 促销开始日期 */
|
||||
date_on_sale_from?: Date;
|
||||
/** 促销结束日期 */
|
||||
date_on_sale_to?: Date;
|
||||
/** 是否促销中 */
|
||||
on_sale?: boolean;
|
||||
/** 是否删除 */
|
||||
on_delete?: boolean;
|
||||
/** 税务状态 */
|
||||
tax_status?: string;
|
||||
/** 税类 */
|
||||
tax_class?: string;
|
||||
/** 重量(g) */
|
||||
weight?: number;
|
||||
/** 尺寸(长宽高) */
|
||||
dimensions?: any;
|
||||
/** 允许评论 */
|
||||
reviews_allowed?: boolean;
|
||||
/** 购买备注 */
|
||||
purchase_note?: string;
|
||||
/** 菜单排序 */
|
||||
menu_order?: number;
|
||||
/** 产品类型 */
|
||||
type?: 'simple' | 'variable' | 'woosb';
|
||||
/** 父产品ID */
|
||||
parent_id?: number;
|
||||
/** 外部产品URL */
|
||||
external_url?: string;
|
||||
/** 外部产品按钮文本 */
|
||||
button_text?: string;
|
||||
/** 分组产品 */
|
||||
grouped_products?: any;
|
||||
/** 追加销售 */
|
||||
upsell_ids?: any;
|
||||
/** 交叉销售 */
|
||||
cross_sell_ids?: any;
|
||||
/** 分类 */
|
||||
categories?: any;
|
||||
/** 标签 */
|
||||
tags?: any;
|
||||
/** 图片 */
|
||||
images?: any;
|
||||
/** 产品属性 */
|
||||
attributes?: any;
|
||||
/** 默认属性 */
|
||||
default_attributes?: any;
|
||||
/** GTIN */
|
||||
gtin?: string;
|
||||
/** 是否删除 */
|
||||
on_delete?: boolean;
|
||||
/** 创建时间 */
|
||||
createdAt: string;
|
||||
/** 更新时间 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue