Feature-add-shipment #1

Merged
yoone merged 2 commits from longbot/WEB:Feature-add-shipment into main 2025-08-07 08:36:52 +00:00
2 changed files with 4 additions and 46 deletions
Showing only changes of commit 703e2c87cb - Show all commits

View File

@ -141,11 +141,6 @@ declare namespace API {
email_addresses?: any; email_addresses?: any;
}; };
type LoginDTO = {
username?: string;
password?: string;
};
type LoginRes = { type LoginRes = {
/** 状态码 */ /** 状态码 */
code?: number; code?: number;
@ -213,6 +208,7 @@ declare namespace API {
externalOrderId?: string; externalOrderId?: string;
status?: any; status?: any;
orderStatus?: any; orderStatus?: any;
shipmentId?: string;
currency?: string; currency?: string;
currency_symbol?: string; currency_symbol?: string;
prices_include_tax?: boolean; prices_include_tax?: boolean;
@ -343,6 +339,7 @@ declare namespace API {
externalOrderId?: string; externalOrderId?: string;
status?: any; status?: any;
orderStatus?: any; orderStatus?: any;
shipmentId?: string;
currency?: string; currency?: string;
currency_symbol?: string; currency_symbol?: string;
prices_include_tax?: boolean; prices_include_tax?: boolean;
@ -386,7 +383,6 @@ declare namespace API {
items?: OrderItem[]; items?: OrderItem[];
sales?: OrderSale[]; sales?: OrderSale[];
refundItems?: OrderRefundItem[]; refundItems?: OrderRefundItem[];
trackings?: Tracking[];
notes?: OrderNote[]; notes?: OrderNote[];
}; };
@ -984,28 +980,11 @@ declare namespace API {
type ShipmentBookDTO = { type ShipmentBookDTO = {
sales?: OrderSale[]; sales?: OrderSale[];
// payment_method_id?: string;
service_id?: string;
service_type?: string;
details?: ShippingDetailsDTO; details?: ShippingDetailsDTO;
stockPointId?: number; stockPointId?: number;
orderIds?: number[]; orderIds?: number[];
}; };
type ShipmentItem = {
id?: number;
shipment_id?: string;
productId?: number;
name?: string;
/** sku */
sku?: string;
quantity?: number;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
};
type ShippingAddress = { type ShippingAddress = {
id?: number; id?: number;
name?: string; name?: string;
@ -1270,27 +1249,6 @@ declare namespace API {
minute?: string; minute?: string;
}; };
type Tracking = {
id?: string;
tracking_provider?: string;
unique_id?: string;
transaction_number?: string;
primary_tracking_number?: string;
tracking_numbers?: string[];
tracking_url?: string;
return_tracking_number?: string;
bol_number?: string;
pickup_confirmation_number?: string;
customs_invoice_url?: string;
rate?: Record<string, any>;
labels?: any;
/** 创建时间 */
createdAt: string;
/** 更新时间 */
updatedAt: string;
products?: ShipmentItem[];
};
type UpdateCategoryDTO = { type UpdateCategoryDTO = {
/** 分类名称 */ /** 分类名称 */
name?: string; name?: string;

View File

@ -37,13 +37,13 @@ export async function usercontrollerListusers(options?: {
/** 此处后端没有提供注释 POST /user/login */ /** 此处后端没有提供注释 POST /user/login */
export async function usercontrollerLogin( export async function usercontrollerLogin(
body: API.LoginDTO, body: Record<string, any>,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.LoginRes>('/user/login', { return request<API.LoginRes>('/user/login', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'text/plain',
}, },
data: body, data: body,
...(options || {}), ...(options || {}),