WEB/src/servers/api/typings.d.ts

1962 lines
40 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

declare namespace API {
type Address = {
address_line_1?: string;
city?: string;
region?: string;
country?: string;
postal_code?: string;
};
type Area = {
/** 名称 */
name?: string;
/** 编码 */
code?: string;
};
type areacontrollerDeleteareaParams = {
id: number;
};
type areacontrollerGetareabyidParams = {
id: number;
};
type areacontrollerGetarealistParams = {
/** 当前页 */
currentPage?: number;
/** 每页数量 */
pageSize?: number;
/** 关键词(名称或编码) */
keyword?: string;
};
type areacontrollerUpdateareaParams = {
id: number;
};
type BooleanRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: boolean;
};
type categorycontrollerDeletecategoryattributeParams = {
id: number;
};
type categorycontrollerDeleteParams = {
id: number;
};
type categorycontrollerGetcategoryattributesParams = {
categoryId: number;
};
type categorycontrollerGetlistParams = {
name?: string;
pageSize?: Record<string, any>;
current?: Record<string, any>;
};
type categorycontrollerUpdateParams = {
id: number;
};
type CreateAreaDTO = {
/** 编码 */
code?: string;
};
type CreateDictDTO = {};
type CreateDictItemDTO = {};
type CreateOrderNoteDTO = {
orderId?: number;
content?: string;
};
type CreateProductDTO = {
/** 产品名称 */
name: string;
/** 产品描述 */
description?: string;
/** 产品 SKU */
sku?: string;
/** 分类ID (DictItem ID) */
categoryId?: number;
/** 属性列表 */
attributes?: any[];
/** 价格 */
price?: number;
/** 促销价格 */
promotionPrice?: number;
/** 商品类型 */
type?: 'simple' | 'bundle';
/** 产品组成 */
components?: any[];
};
type CreatePurchaseOrderDTO = {
stockPointId?: number;
expectedArrivalTime?: string;
status?: 'draft' | 'submitted' | 'received';
note?: string;
items?: PurchaseOrderItem[];
};
type CreateSiteDTO = {
/** 区域 */
areas?: any;
};
type CreateStockPointDTO = {
name?: string;
location?: string;
contactPerson?: string;
contactPhone?: string;
/** 区域 */
areas?: any;
};
type CreateTemplateDTO = {
/** 模板名称 */
name: string;
/** 模板内容 */
value: string;
};
type Cubid = {
w?: number;
h?: number;
l?: number;
unit?: string;
};
type customercontrollerGetcustomerlistParams = {
current?: string;
pageSize?: string;
email?: string;
tags?: string;
sorterKey?: string;
sorterValue?: string;
state?: string;
first_purchase_date?: string;
customerId?: number;
};
type CustomerTagDTO = {
email?: string;
tag?: string;
};
type Date = {
year?: string;
month?: string;
day?: string;
};
type Destination = {
name?: string;
address?: Address;
phone_number?: PhoneNumber;
email_addresses?: any;
ready_at?: Time;
ready_until?: Time;
SignatureRequirementEnum?: any;
};
type dictcontrollerDeletedictitemParams = {
id: number;
};
type dictcontrollerDeletedictParams = {
id: number;
};
type dictcontrollerGetdictitemsbydictnameParams = {
name?: string;
};
type dictcontrollerGetdictitemsParams = {
title?: string;
name?: string;
dictId?: number;
};
type dictcontrollerGetdictParams = {
id: number;
};
type dictcontrollerGetdictsParams = {
name?: string;
title?: string;
};
type dictcontrollerUpdatedictitemParams = {
id: number;
};
type dictcontrollerUpdatedictParams = {
id: number;
};
type DisableSiteDTO = {};
type localecontrollerGetlocaleParams = {
lang: string;
};
type Location = {
name?: string;
address?: Address;
phone_number?: PhoneNumber;
email_addresses?: any;
};
type LoginRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: LoginResDTO;
};
type LoginResDTO = {
token?: string;
userId?: number;
username?: string;
permissions?: string[];
};
type logisticscontrollerCreateshipmentParams = {
orderId: number;
};
type logisticscontrollerDeleteshipmentParams = {
id: number;
};
type logisticscontrollerDelshipmentParams = {
id: number;
};
type logisticscontrollerDelshippingaddressParams = {
id: number;
};
type logisticscontrollerGetlistbyorderidParams = {
id?: number;
};
type logisticscontrollerGetorderlistParams = {
number?: string;
};
type logisticscontrollerGetservicelistParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
carrier_name?: string;
isActive?: boolean;
};
type logisticscontrollerGetshipmentlabelParams = {
shipmentId: number;
};
type logisticscontrollerUpdateshipmentstateParams = {
shipmentId: number;
};
type logisticscontrollerUpdateshippingaddressParams = {
id: number;
};
type Measurements = {
cuboid?: Cubid;
weight?: Cubid;
};
type Money = {
currency?: string;
value?: string;
};
type Order = {
id?: number;
siteId?: number;
externalOrderId?: string;
status?: any;
orderStatus?: any;
shipmentId?: number;
currency?: string;
currency_symbol?: string;
prices_include_tax?: boolean;
date_created?: string;
date_modified?: string;
discount_total?: number;
discount_tax?: number;
shipping_total?: number;
shipping_tax?: number;
cart_tax?: number;
total?: number;
total_tax?: number;
customer_id?: number;
customer_email?: string;
order_key?: string;
billing?: OrderAddress;
shipping?: OrderAddress;
payment_method?: string;
payment_method_title?: string;
transaction_id?: string;
customer_ip_address?: string;
customer_user_agent?: string;
created_via?: string;
customer_note?: string;
date_completed?: string;
date_paid?: string;
cart_hash?: string;
number?: string;
meta_data?: any;
payment_url?: string;
is_editable?: boolean;
needs_payment?: boolean;
needs_processing?: boolean;
device_type?: string;
source_type?: string;
utm_source?: string;
is_exchange?: boolean;
exchange_frequency?: number;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type OrderAddress = {
first_name?: string;
last_name?: string;
company?: string;
address_1?: string;
address_2?: string;
city?: string;
state?: string;
postcode?: string;
country?: string;
email?: string;
phone?: string;
};
type ordercontrollerCancelorderParams = {
id: number;
};
type ordercontrollerChangestatusParams = {
id: number;
};
type ordercontrollerCompletedorderParams = {
id: number;
};
type ordercontrollerDelorderParams = {
id: number;
};
type ordercontrollerGetorderdetailParams = {
orderId: number;
};
type ordercontrollerGetorderitemlistParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
siteId?: number;
name?: string;
externalProductId?: string;
externalVariationId?: string;
startDate?: string;
endDate?: string;
};
type ordercontrollerGetorderitemsParams = {
isSource?: boolean;
exceptPackage?: boolean;
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
siteId?: number;
name?: string;
startDate?: string;
endDate?: string;
};
type ordercontrollerGetordersalesParams = {
isSource?: boolean;
exceptPackage?: boolean;
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
siteId?: number;
name?: string;
startDate?: string;
endDate?: string;
};
type ordercontrollerGetordersParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
externalOrderId?: string;
siteId?: number;
customer_email?: string;
billing_phone?: string;
keyword?: string;
startDate?: string;
endDate?: string;
status?:
| 'pending'
| 'processing'
| 'completed'
| 'cancelled'
| 'refunded'
| 'failed'
| 'after_sale_pending'
| 'pending_reshipment'
| 'pending_refund'
| 'return-requested'
| 'return-approved'
| 'return-cancelled';
payment_method?: string;
/** 仅订阅订单(父订阅订单或包含订阅商品) */
isSubscriptionOnly?: boolean;
};
type ordercontrollerGetrelatedbyorderParams = {
orderId: number;
};
type ordercontrollerRefundorderParams = {
id: number;
};
type ordercontrollerSyncorderbyidParams = {
orderId: string;
siteId: number;
};
type ordercontrollerSyncorderParams = {
siteId: number;
};
type ordercontrollerUpdateorderitemsParams = {
orderId: number;
};
type OrderDetail = {
id?: number;
siteId?: number;
externalOrderId?: string;
status?: any;
orderStatus?: any;
shipmentId?: number;
currency?: string;
currency_symbol?: string;
prices_include_tax?: boolean;
date_created?: string;
date_modified?: string;
discount_total?: number;
discount_tax?: number;
shipping_total?: number;
shipping_tax?: number;
cart_tax?: number;
total?: number;
total_tax?: number;
customer_id?: number;
customer_email?: string;
order_key?: string;
billing?: OrderAddress;
shipping?: OrderAddress;
payment_method?: string;
payment_method_title?: string;
transaction_id?: string;
customer_ip_address?: string;
customer_user_agent?: string;
created_via?: string;
customer_note?: string;
date_completed?: string;
date_paid?: string;
cart_hash?: string;
number?: string;
meta_data?: any;
payment_url?: string;
is_editable?: boolean;
needs_payment?: boolean;
needs_processing?: boolean;
device_type?: string;
source_type?: string;
utm_source?: string;
is_exchange?: boolean;
exchange_frequency?: number;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
items?: OrderItem[];
sales?: OrderSale[];
refundItems?: OrderRefundItem[];
notes?: OrderNote[];
};
type OrderDetailRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: OrderDetail;
};
type OrderItem = {
id?: number;
name?: string;
siteId?: number;
orderId?: number;
externalOrderId?: string;
externalOrderItemId?: string;
externalProductId?: string;
externalVariationId?: string;
quantity?: number;
subtotal?: number;
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;
/** 更新时间 */
updatedAt: string;
};
type OrderListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: OrderPaginatedRespone;
};
type OrderNote = {
userId?: number;
orderId?: number;
content?: string;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type OrderPaginatedRespone = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: Order[];
count?: OrderStatusCountDTO[];
};
type OrderRefundItem = {
id?: number;
refundId?: number;
siteId?: number;
externalRefundId?: string;
externalRefundItemId?: string;
externalProductId?: string;
externalVariationId?: string;
name?: string;
quantity?: number;
tax_class?: string;
subtotal?: number;
subtotal_tax?: number;
total?: number;
total_tax?: number;
sku?: string;
price?: number;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type OrderSale = {
id?: number;
orderId?: number;
siteId?: number;
externalOrderItemId?: string;
productId?: number;
name?: string;
/** sku */
sku?: string;
quantity?: number;
isPackage?: boolean;
isYoone?: boolean;
isZex?: boolean;
size?: number;
isYooneNew?: boolean;
/** 创建时间 */
createdAt?: string;
/** 更新时间 */
updatedAt?: string;
};
type OrderSaleDTO = {
id?: number;
orderId?: number;
siteId?: number;
externalOrderItemId?: string;
productId?: number;
name?: string;
/** sku */
sku?: string;
quantity?: number;
isPackage?: boolean;
isYoone?: boolean;
isZex?: boolean;
size?: number;
isYooneNew?: boolean;
/** 创建时间 */
createdAt?: string;
/** 更新时间 */
updatedAt?: string;
totalQuantity?: number;
};
type OrderSaleListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: OrderSalePaginatedRespone;
};
type OrderSalePaginatedRespone = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: OrderSaleDTO[];
};
type OrderStatisticsParams = {
startDate?: string;
endDate?: string;
keyword?: string;
siteId?: string;
purchaseType?: 'all' | 'first_purchase' | 'repeat_purchase';
orderType?: 'all' | 'cpc' | 'non_cpc';
brand?: 'all' | 'zyn' | 'yoone' | 'zolt';
};
type OrderStatusCountDTO = {
status?: string;
count?: number;
};
type Package = {
measurements?: Measurements;
description?: string;
};
type PackagingPackage = {
packages?: Package[];
};
type PhoneNumber = {
number?: string;
extension?: string;
};
type Product = {
/** ID */
id: number;
/** 类型 */
type?: string;
/** 产品名称 */
name: string;
/** 产品中文名称 */
nameCn?: string;
/** 产品描述 */
description?: string;
/** sku */
sku?: string;
/** 价格 */
price?: number;
/** 促销价格 */
promotionPrice?: number;
/** 库存 */
stock?: number;
/** 库存组成 */
components?: ProductStockComponent[];
/** 来源 */
source?: number;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type productcontrollerAutobindcomponentsParams = {
id: number;
};
type productcontrollerCompatbrandsParams = {
name?: string;
pageSize?: Record<string, any>;
current?: Record<string, any>;
};
type productcontrollerCompatdeletebrandParams = {
id: number;
};
type productcontrollerCompatdeleteflavorsParams = {
id: number;
};
type productcontrollerCompatdeletesizeParams = {
id: number;
};
type productcontrollerCompatdeletestrengthParams = {
id: number;
};
type productcontrollerCompatflavorsParams = {
name?: string;
pageSize?: Record<string, any>;
current?: Record<string, any>;
};
type productcontrollerCompatsizeParams = {
name?: string;
pageSize?: Record<string, any>;
current?: Record<string, any>;
};
type productcontrollerCompatstrengthParams = {
name?: string;
pageSize?: Record<string, any>;
current?: Record<string, any>;
};
type productcontrollerCompatupdatebrandParams = {
id: number;
};
type productcontrollerCompatupdateflavorsParams = {
id: number;
};
type productcontrollerCompatupdatesizeParams = {
id: number;
};
type productcontrollerCompatupdatestrengthParams = {
id: number;
};
type productcontrollerCreateattributeParams = {
dictName?: string;
};
type productcontrollerDeleteattributeParams = {
id: number;
};
type productcontrollerDeletecategoryattributeParams = {
id: number;
};
type productcontrollerDeletecategoryParams = {
id: number;
};
type productcontrollerDeleteproductParams = {
id: number;
};
type productcontrollerGetattributeallParams = {
dictName?: string;
};
type productcontrollerGetattributelistParams = {
name?: string;
pageSize?: Record<string, any>;
current?: Record<string, any>;
dictName?: string;
};
type productcontrollerGetcategoryattributesParams = {
id: number;
};
type productcontrollerGetproductcomponentsParams = {
id: number;
};
type productcontrollerGetproductlistParams = {
/** 当前页 */
current?: number;
/** 每页数量 */
pageSize?: number;
/** 搜索关键字 */
name?: string;
/** 分类ID */
categoryId?: number;
/** 品牌ID */
brandId?: number;
};
type productcontrollerProductbyskuParams = {
sku: string;
};
type productcontrollerSearchproductsParams = {
name?: string;
};
type productcontrollerSetproductcomponentsParams = {
id: number;
};
type productcontrollerUpdateattributeParams = {
dictName?: string;
id: number;
};
type productcontrollerUpdatecategoryParams = {
id: number;
};
type productcontrollerUpdatenamecnParams = {
nameCn: string;
id: number;
};
type productcontrollerUpdateproductParams = {
id: number;
};
type ProductListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: ProductPaginatedResponse;
};
type ProductPaginatedResponse = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: Product[];
};
type ProductRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: Product;
};
type ProductsRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: Product[];
};
type ProductStockComponent = {
id?: number;
productId?: number;
/** 组件所关联的 SKU */
sku?: string;
/** 组成数量 */
quantity?: number;
/** 创建时间 */
createdAt?: string;
/** 更新时间 */
updatedAt?: string;
};
type PurchaseOrderDTO = {
id?: number;
stockPointId?: number;
orderNumber?: string;
status?: any;
note?: string;
/** 预计时间 */
expectedArrivalTime: string;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
items?: PurchaseOrderItem[];
};
type PurchaseOrderItem = {
id?: number;
sku?: string;
name?: string;
quantity?: number;
price?: number;
purchaseOrderId?: number;
};
type PurchaseOrderListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: PurchaseOrderPaginatedRespone;
};
type PurchaseOrderPaginatedRespone = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: PurchaseOrderDTO[];
};
type QueryAreaDTO = {
/** 当前页 */
currentPage?: number;
/** 每页数量 */
pageSize?: number;
/** 关键词(名称或编码) */
keyword?: string;
};
type QueryCustomerListDTO = {
current?: string;
pageSize?: string;
email?: string;
tags?: string;
sorterKey?: string;
sorterValue?: string;
state?: string;
first_purchase_date?: string;
customerId?: number;
};
type QueryOrderDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
externalOrderId?: string;
siteId?: number;
customer_email?: string;
billing_phone?: string;
keyword?: string;
startDate?: string;
endDate?: string;
status?:
| 'pending'
| 'processing'
| 'completed'
| 'cancelled'
| 'refunded'
| 'failed'
| 'after_sale_pending'
| 'pending_reshipment'
| 'pending_refund'
| 'return-requested'
| 'return-approved'
| 'return-cancelled';
payment_method?: string;
/** 仅订阅订单(父订阅订单或包含订阅商品) */
isSubscriptionOnly?: boolean;
};
type QueryOrderItemDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
siteId?: number;
name?: string;
externalProductId?: string;
externalVariationId?: string;
startDate?: string;
endDate?: string;
};
type QueryOrderSalesDTO = {
isSource?: boolean;
exceptPackage?: boolean;
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
siteId?: number;
name?: string;
startDate?: string;
endDate?: string;
};
type QueryPointDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
};
type QueryProductDTO = {
/** 当前页 */
current?: number;
/** 每页数量 */
pageSize?: number;
/** 搜索关键字 */
name?: string;
/** 分类ID */
categoryId?: number;
/** 品牌ID */
brandId?: number;
};
type QueryPurchaseOrderDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
orderNumber?: string;
stockPointId?: number;
};
type QueryServiceDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
carrier_name?: string;
isActive?: boolean;
};
type QuerySiteDTO = {};
type QueryStockDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
name?: string;
sku?: string;
/** 按库存点ID排序 */
sortPointId?: number;
/** 排序对象,格式如 { productName: "asc", sku: "desc" } */
order?: Record<string, any>;
};
type QueryStockRecordDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
stockPointId?: number;
sku?: string;
name?: string;
operationType?: string;
startDate?: string;
endDate?: string;
};
type QuerySubscriptionDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 站点ID */
siteId?: string;
/** 订阅状态 */
status?:
| 'active'
| 'pending'
| 'on-hold'
| 'cancelled'
| 'expired'
| 'pending-cancel';
/** 客户邮箱 */
customer_email?: string;
/** 关键字订阅ID、邮箱等 */
keyword?: string;
};
type QueryWpProductDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 产品名 */
name?: string;
/** 站点ID */
siteId?: string;
/** 产品状态 */
status?:
| 'publish'
| 'draft'
| 'pending'
| 'private'
| 'trash'
| 'auto-draft'
| 'future'
| 'inherit';
};
type RateDTO = {
carrier_name?: string;
service_name?: string;
service_id?: string;
valid_until?: Date;
total?: Money;
base?: Money;
surcharges?: Surcharges[];
taxes?: Money[];
transit_time_days?: number;
transit_time_not_available?: boolean;
};
type RateLitRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: RateDTO[];
};
type Service = {
id?: string;
carrier_name?: string;
service_name?: string;
isActive?: boolean;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type ServiceListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: Service[];
};
type SetConstitutionDTO = {
isProduct?: boolean;
/** 构成成分 */
constitution?: { sku?: string; quantity?: number }[];
};
type SetProductComponentsDTO = {
/** 产品组成 */
components: any[];
};
type ShipmentBookDTO = {
sales?: OrderSale[];
details?: ShippingDetailsDTO;
stockPointId?: number;
orderIds?: number[];
};
type ShipmentFeeBookDTO = {
stockPointId?: number;
sender?: string;
startPhone?: string;
startPostalCode?: string;
pickupAddress?: string;
shipperCountryCode?: string;
receiver?: string;
city?: string;
province?: string;
country?: string;
postalCode?: string;
deliveryAddress?: string;
receiverPhone?: string;
receiverEmail?: string;
length?: number;
width?: number;
height?: number;
dimensionUom?: string;
weight?: number;
weightUom?: string;
};
type ShippingAddress = {
id?: number;
name?: string;
stockPointId?: number;
address?: Address;
phone_number?: string;
phone_number_extension?: string;
phone_number_country?: string;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type ShippingAddressListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: ShippingAddress[];
};
type ShippingDetailsDTO = {
shipmentFee?: number;
origin?: Location;
destination?: Destination;
expected_ship_date?: Date;
packaging_type?: 'pallet' | 'package' | 'courier-pak' | 'envelope';
packaging_properties?: PackagingPackage[];
reference_codes?: any;
};
type SiteConfig = {
/** 站点 ID */
id?: string;
/** 站点 URL */
apiUrl?: string;
/** 站点 rest key */
consumerKey?: string;
/** 站点 rest 秘钥 */
consumerSecret?: string;
/** 站点名 */
name?: string;
/** 平台类型 */
type?: 'woocommerce' | 'shopyy';
/** SKU 前缀 */
skuPrefix?: string;
};
type sitecontrollerDisableParams = {
id: string;
};
type sitecontrollerGetParams = {
id: string;
};
type sitecontrollerUpdateParams = {
id: string;
};
type statisticscontrollerGetinativeusersbymonthParams = {
month?: string;
};
type stockcontrollerCanceltransferParams = {
id: number;
};
type stockcontrollerDelpurchaseorderParams = {
id: number;
};
type stockcontrollerDelstockpointsParams = {
id: number;
};
type stockcontrollerGetpurchaseorderParams = {
orderNumber: string;
};
type stockcontrollerGetpurchaseordersParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
orderNumber?: string;
stockPointId?: number;
};
type stockcontrollerGetstockpointsParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
};
type stockcontrollerGetstockrecordsParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
stockPointId?: number;
sku?: string;
name?: string;
operationType?: string;
startDate?: string;
endDate?: string;
};
type stockcontrollerGetstocksParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
name?: string;
sku?: string;
/** 按库存点ID排序 */
sortPointId?: number;
/** 排序对象,格式如 { productName: "asc", sku: "desc" } */
order?: Record<string, any>;
};
type stockcontrollerHasstockParams = {
sku: string;
};
type stockcontrollerLosttransferParams = {
id: number;
};
type stockcontrollerReceivepurchaseorderParams = {
id: number;
};
type stockcontrollerReceivetransferParams = {
id: number;
};
type stockcontrollerUpdatepurchaseorderParams = {
id: number;
};
type stockcontrollerUpdatestockpointParams = {
id: number;
};
type stockcontrollerUpdatetransferParams = {
id: number;
};
type StockDTO = {
id?: number;
stockPointId?: number;
sku?: string;
quantity?: number;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
name?: string;
stockPoint?: Record<string, any>[];
};
type StockListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: StockPaginatedRespone;
};
type StockPaginatedRespone = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: StockDTO[];
};
type StockPoint = {
id?: number;
name?: string;
location?: string;
contactPerson?: string;
contactPhone?: string;
ignore?: boolean;
inCanada?: boolean;
isB?: boolean;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type StockPointAllRespone = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: StockPoint[];
};
type StockPointListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: StockPointPaginatedRespone;
};
type StockPointPaginatedRespone = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: StockPoint[];
};
type StockRecordDTO = {
id?: number;
stockPointId?: number;
sku?: string;
operationType?: any;
quantityChange?: number;
operatorId?: number;
/** 创建时间 */
createdAt: string;
note?: string;
productName?: string;
};
type StockRecordListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: StockRecordPaginatedRespone;
};
type StockRecordPaginatedRespone = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: StockRecordDTO[];
};
type Subscription = {
id?: number;
/** 来源站点唯一标识 */
siteId?: number;
/** WooCommerce 订阅 ID */
externalSubscriptionId?: string;
status?: any;
currency?: string;
total?: number;
/** 计费周期 e.g. day/week/month/year */
billing_period?: string;
/** 计费周期间隔 e.g. 1/3/12 */
billing_interval?: number;
customer_id?: number;
customer_email?: string;
/** 父订单/父订阅ID如有 */
parent_id?: number;
start_date?: string;
trial_end?: string;
next_payment_date?: string;
end_date?: string;
line_items?: any;
meta_data?: any;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type subscriptioncontrollerListParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 站点ID */
siteId?: string;
/** 订阅状态 */
status?:
| 'active'
| 'pending'
| 'on-hold'
| 'cancelled'
| 'expired'
| 'pending-cancel';
/** 客户邮箱 */
customer_email?: string;
/** 关键字订阅ID、邮箱等 */
keyword?: string;
};
type subscriptioncontrollerSyncParams = {
siteId: number;
};
type SubscriptionListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: SubscriptionPaginatedResponse;
};
type SubscriptionPaginatedResponse = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: Subscription[];
};
type Surcharges = {
type?: string;
amount?: Money;
};
type Template = {
id?: number;
name?: string;
value?: string;
description?: string;
/** 是否可删除 */
deletable: boolean;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type templatecontrollerDeletetemplateParams = {
id: number;
};
type templatecontrollerGettemplatebynameParams = {
name: string;
};
type templatecontrollerRendertemplateParams = {
name: string;
};
type templatecontrollerUpdatetemplateParams = {
id: number;
};
type Time = {
hour?: string;
minute?: string;
};
type UpdateAreaDTO = {
/** 编码 */
code?: string;
};
type UpdateDictDTO = {};
type UpdateDictItemDTO = {};
type UpdateProductDTO = {
/** 产品名称 */
name?: string;
/** 产品描述 */
description?: string;
/** 产品 SKU */
sku?: string;
/** 分类ID (DictItem ID) */
categoryId?: number;
/** 价格 */
price?: number;
/** 促销价格 */
promotionPrice?: number;
/** 属性列表 */
attributes?: any[];
/** 商品类型 */
type?: 'simple' | 'bundle';
};
type UpdatePurchaseOrderDTO = {
stockPointId?: number;
expectedArrivalTime?: string;
status?: 'draft' | 'submitted' | 'received';
note?: string;
items?: PurchaseOrderItem[];
};
type UpdateSiteDTO = {
/** 区域 */
areas?: any;
};
type UpdateStockDTO = {
stockPointId?: number;
sku?: string;
quantityChange?: number;
operationType?: 'in' | 'out';
operatorId?: number;
note?: string;
};
type UpdateStockPointDTO = {
name?: string;
location?: string;
contactPerson?: string;
contactPhone?: string;
/** 区域 */
areas?: any;
};
type UpdateTemplateDTO = {
/** 模板名称 */
name: string;
/** 模板内容 */
value: string;
};
type UpdateVariationDTO = {
/** 产品名称 */
name?: string;
/** SKU */
sku?: string;
/** 常规价格 */
regular_price?: number;
/** 销售价格 */
sale_price?: number;
/** 是否促销中 */
on_sale?: boolean;
};
type UpdateWpProductDTO = {
/** 变体名称 */
name?: string;
/** SKU */
sku?: string;
/** 常规价格 */
regular_price?: number;
/** 销售价格 */
sale_price?: number;
/** 是否促销中 */
on_sale?: boolean;
};
type usercontrollerUpdateuserParams = {
id?: number;
};
type VariationDTO = {
/** ID */
id: number;
/** 站点 id */
siteId?: number;
/** wp产品ID */
externalProductId: string;
/** wp变体ID */
externalVariationId: string;
/** 对应WP产品表的ID */
productId: number;
/** sku */
sku?: string;
/** 变体名称 */
name: string;
/** 常规价格 */
regular_price?: number;
/** 销售价格 */
sale_price?: number;
/** 是否促销中 */
on_sale?: boolean;
/** 是否删除 */
on_delete?: boolean;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
/** 变体构成成分 */
constitution?: { sku?: string; quantity?: number }[];
};
type webhookcontrollerHandlewoowebhookParams = {
siteId?: string;
};
type wpproductcontrollerGetwpproductsParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 产品名 */
name?: string;
/** 站点ID */
siteId?: string;
/** 产品状态 */
status?:
| 'publish'
| 'draft'
| 'pending'
| 'private'
| 'trash'
| 'auto-draft'
| 'future'
| 'inherit';
};
type wpproductcontrollerSearchproductsParams = {
name?: string;
};
type wpproductcontrollerSetconstitutionParams = {
id: number;
};
type wpproductcontrollerSyncproductsParams = {
siteId: number;
};
type wpproductcontrollerUpdateproductParams = {
productId: string;
siteId: number;
};
type wpproductcontrollerUpdatevariationParams = {
variationId: string;
productId: string;
siteId: number;
};
type wpproductcontrollerUpdatewpproductstateParams = {
id: number;
};
type WpProductDTO = {
/** ID */
id: number;
/** wp网站ID */
siteId: number;
/** wp产品ID */
externalProductId: string;
/** 商店sku */
sku?: string;
/** 产品名称 */
name: string;
/** 产品状态 */
status?:
| 'publish'
| 'draft'
| 'pending'
| 'private'
| 'trash'
| '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;
/** 税务状态 */
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;
/** 更新时间 */
updatedAt: string;
/** 产品构成成分 */
constitution?: { sku?: string; quantity?: number }[];
/** 变体列表 */
variations?: VariationDTO[];
};
type WpProductListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: WpProductPaginatedResponse;
};
type WpProductPaginatedResponse = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: WpProductDTO[];
};
type WpSitesResponse = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: SiteConfig[];
};
}