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

1734 lines
35 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 BatchSetSkuDTO = {
/** sku 数据列表 */
skus?: SkuItemDTO[];
};
type BooleanRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: boolean;
};
type Category = {
/** 分类 ID */
id: number;
/** 分类名称 */
name: string;
/** 唯一识别key */
unique_key: string;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type CategoryPaginatedResponse = {
/** 当前页码 */
page?: number;
/** 每页大小 */
pageSize?: number;
/** 总记录数 */
total?: number;
/** 数据列表 */
items?: Category[];
};
type CreateCategoryDTO = {
/** 分类名称 */
name: string;
};
type CreateFlavorsDTO = {
/** 分类名称 */
name: string;
};
type CreateOrderNoteDTO = {
orderId?: number;
content?: string;
};
type CreateProductDTO = {
/** 产品名称 */
name: string;
/** 产品描述 */
description?: string;
/** 分类 ID */
categoryId?: number;
strengthId?: number;
flavorsId?: number;
humidity?: string;
};
type CreatePurchaseOrderDTO = {
stockPointId?: number;
expectedArrivalTime?: string;
status?: 'draft' | 'submitted' | 'received';
note?: string;
items?: PurchaseOrderItem[];
};
type CreateSiteDTO = {};
type CreateStockPointDTO = {
name?: string;
location?: string;
contactPerson?: string;
contactPhone?: string;
};
type CreateStrengthDTO = {
/** 分类名称 */
name: 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 DisableSiteDTO = {};
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?: string;
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?: 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;
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
siteId?: string;
name?: string;
startDate?: string;
endDate?: string;
};
type ordercontrollerGetordersParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
externalOrderId?: string;
siteId?: string;
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: string;
};
type ordercontrollerSyncorderParams = {
siteId: string;
};
type ordercontrollerUpdateorderitemsParams = {
orderId: number;
};
type OrderDetail = {
id?: number;
siteId?: string;
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?: string;
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?: string;
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?: string;
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?: string;
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?: number;
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;
/** 产品名称 */
name: string;
nameCn?: string;
/** 产品描述 */
description?: string;
/** 分类 ID */
categoryId?: number;
flavorsId?: number;
strengthId?: number;
humidity?: string;
/** sku */
sku?: string;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type ProductCatListRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: CategoryPaginatedResponse;
};
type ProductCatRes = {
/** 状态码 */
code?: number;
/** 是否成功 */
success?: boolean;
/** 消息内容 */
message?: string;
/** 响应数据 */
data?: Category;
};
type productcontrollerDeletecategoryParams = {
id: number;
};
type productcontrollerDeleteflavorsParams = {
id: number;
};
type productcontrollerDeleteproductParams = {
id: number;
};
type productcontrollerDeletestrengthParams = {
id: number;
};
type productcontrollerGetcategoriesParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: string;
};
type productcontrollerGetflavorsParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: string;
};
type productcontrollerGetproductlistParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: string;
/** 分类 ID */
categoryId?: number;
};
type productcontrollerGetstrengthParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: string;
};
type productcontrollerProductbyskuParams = {
sku: string;
};
type productcontrollerSearchproductsParams = {
name?: string;
};
type productcontrollerUpdatecategoryParams = {
id: number;
};
type productcontrollerUpdateflavorsParams = {
id: number;
};
type productcontrollerUpdateproductnamecnParams = {
nameCn: string;
id: number;
};
type productcontrollerUpdateproductParams = {
id: number;
};
type productcontrollerUpdatestrengthParams = {
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 PurchaseOrderDTO = {
id?: number;
stockPointId?: number;
orderNumber?: string;
status?: any;
note?: string;
/** 预计时间 */
expectedArrivalTime: string;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
items?: PurchaseOrderItem[];
};
type PurchaseOrderItem = {
id?: number;
productSku?: string;
productName?: 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 QueryCategoryDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: string;
};
type QueryCustomerListDTO = {
current?: string;
pageSize?: string;
email?: string;
tags?: string;
sorterKey?: string;
sorterValue?: string;
state?: string;
first_purchase_date?: string;
customerId?: number;
};
type QueryFlavorsDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: string;
};
type QueryOrderDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
externalOrderId?: string;
siteId?: string;
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?: string;
name?: string;
externalProductId?: string;
externalVariationId?: string;
startDate?: string;
endDate?: string;
};
type QueryOrderSalesDTO = {
isSource?: boolean;
exceptPackage?: boolean;
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
siteId?: string;
name?: string;
startDate?: string;
endDate?: string;
};
type QueryPointDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
};
type QueryProductDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: string;
/** 分类 ID */
categoryId?: 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;
productName?: string;
};
type QueryStockRecordDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
stockPointId?: number;
productSku?: string;
productName?: string;
operationType?: string;
startDate?: string;
endDate?: string;
};
type QueryStrengthDTO = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
/** 关键字 */
name?: 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 ShipmentBookDTO = {
sales?: OrderSale[];
details?: ShippingDetailsDTO;
stockPointId?: number;
orderIds?: number[];
shipmentPlatform?: string;
};
type ShipmentFeeBookDTO = {
shipmentPlatform?: string;
stockPointId?: number;
sender?: string;
startPhone?: Record<string, any>;
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;
address_id?: number;
};
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;
/** 站点名 */
siteName?: string;
/** 平台类型 */
type?: 'woocommerce' | 'shopyy';
/** SKU 前缀 */
skuPrefix?: string;
};
type sitecontrollerDisableParams = {
id: string;
};
type sitecontrollerGetParams = {
id: string;
};
type sitecontrollerUpdateParams = {
id: string;
};
type SkuItemDTO = {
/** 产品 ID */
productId?: number;
/** sku 编码 */
sku?: 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;
productSku?: string;
productName?: string;
operationType?: string;
startDate?: string;
endDate?: string;
};
type stockcontrollerGetstocksParams = {
/** 页码 */
current?: number;
/** 每页大小 */
pageSize?: number;
productName?: 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;
productSku?: string;
quantity?: number;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
productName?: 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;
productSku?: 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?: string;
/** 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: string;
};
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 Time = {
hour?: string;
minute?: string;
};
type UpdateCategoryDTO = {
/** 分类名称 */
name?: string;
};
type UpdateFlavorsDTO = {
/** 分类名称 */
name?: string;
};
type UpdateProductDTO = {
/** 产品名称 */
name?: string;
/** 产品描述 */
description?: string;
/** 分类 ID */
categoryId?: number;
strengthId?: number;
flavorsId?: number;
humidity?: string;
};
type UpdatePurchaseOrderDTO = {
stockPointId?: number;
expectedArrivalTime?: string;
status?: 'draft' | 'submitted' | 'received';
note?: string;
items?: PurchaseOrderItem[];
};
type UpdateSiteDTO = {};
type UpdateStockDTO = {
stockPointId?: number;
productSku?: string;
quantityChange?: number;
operationType?: 'in' | 'out';
operatorId?: number;
note?: string;
};
type UpdateStockPointDTO = {
name?: string;
location?: string;
contactPerson?: string;
contactPhone?: string;
};
type UpdateStrengthDTO = {
/** 分类名称 */
name?: 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 VariationDTO = {
/** ID */
id: number;
/** wp网站ID */
siteId: string;
/** 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: string;
};
type wpproductcontrollerUpdateproductParams = {
productId: string;
siteId: string;
};
type wpproductcontrollerUpdatevariationParams = {
variationId: string;
productId: string;
siteId: string;
};
type wpproductcontrollerUpdatewpproductstateParams = {
id: number;
};
type WpProductDTO = {
/** ID */
id: number;
/** wp网站ID */
siteId: string;
/** wp产品ID */
externalProductId: string;
/** sku */
sku?: string;
/** 产品名称 */
name: string;
/** 产品状态 */
status?:
| 'publish'
| 'draft'
| 'pending'
| 'private'
| 'trash'
| 'auto-draft'
| 'future'
| 'inherit';
/** 上下架状态 */
stockStatus?: 'instock' | 'outofstock' | 'onbackorder';
/** 常规价格 */
regular_price?: number;
/** 销售价格 */
sale_price?: number;
/** 是否促销中 */
on_sale?: boolean;
/** 是否删除 */
on_delete?: boolean;
/** 产品类型 */
type?: 'simple' | 'variable' | 'woosb';
/** 创建时间 */
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[];
};
}