wip(freight): migration 0017 + model/column-list groundwork for add-freight-templates

This commit is contained in:
Chengdong Zhang
2026-09-23 17:39:45 +08:00
parent a83e857bdf
commit 5b426486ac
105 changed files with 6193 additions and 1566 deletions
+16 -18
View File
@@ -244,10 +244,7 @@ export interface ApiClient {
getAftersale(id: string): Promise<AftersaleDetail>;
cancelAftersale(id: string): Promise<Aftersale>;
reopenAftersale(id: string): Promise<Aftersale>;
submitAftersaleReturnTracking(
id: string,
body: AftersaleReturnTrackingBody,
): Promise<Aftersale>;
submitAftersaleReturnTracking(id: string, body: AftersaleReturnTrackingBody): Promise<Aftersale>;
addAftersaleMessage(id: string, body: AftersaleMessageBody): Promise<AftersaleMessage>;
/** Public points catalog: published products only. */
listPointsProducts(): Promise<IntegralProduct[]>;
@@ -451,27 +448,28 @@ export function createApi(opts: ApiClientOptions): ApiClient {
listOrders: (page = 1) => r("GET", "/admin/orders", undefined, { page }),
listCurrencies: () => r("GET", "/admin/currencies"),
upsertCurrency: (body) => r("POST", "/admin/currencies", body),
setRate: (code, rateToBase) => r("PUT", `/admin/currencies/${code}/rate`, {
rate_to_base: rateToBase,
}),
setRate: (code, rateToBase) =>
r("PUT", `/admin/currencies/${code}/rate`, {
rate_to_base: rateToBase,
}),
getContent: () => r("GET", "/admin/content"),
replaceContent: (kind, items) => r("PUT", `/admin/content/${kind}`, items),
setShopProfile: (id, body) => r("PUT", `/admin/shops/${id}/profile`, body),
/** Replaces the whole ordered brand list. */
getBrands: () => r("GET", "/brands"),
replaceBrands: (items) => r("PUT", "/admin/brands", items),
/** Replaces the whole ordered brand list. */
getBrands: () => r("GET", "/brands"),
replaceBrands: (items) => r("PUT", "/admin/brands", items),
listAftersales: (status) => r("GET", "/admin/aftersales", undefined, { status }),
getAftersale: (id) => r("GET", `/admin/aftersales/${id}`),
arbitrateAftersale: (id, outcome) =>
r("POST", `/admin/aftersales/${id}/arbitrate`, { outcome }),
listPointsProducts: () => r("GET", "/admin/points/products"),
createPointsProduct: (body) => r("POST", "/admin/points/products", body),
updatePointsProduct: (id, body) => r("PUT", `/admin/points/products/${id}`, body),
setPointsProductPublished: (id, published) =>
r("POST", `/admin/points/products/${id}/${published ? "publish" : "unpublish"}`),
listPointsRedemptions: (page = 1) => r("GET", "/admin/points/orders", undefined, { page }),
fulfillRedemption: (id) => r("POST", `/admin/points/orders/${id}/fulfill`),
cancelRedemption: (id) => r("POST", `/admin/points/orders/${id}/cancel`),
listPointsProducts: () => r("GET", "/admin/points/products"),
createPointsProduct: (body) => r("POST", "/admin/points/products", body),
updatePointsProduct: (id, body) => r("PUT", `/admin/points/products/${id}`, body),
setPointsProductPublished: (id, published) =>
r("POST", `/admin/points/products/${id}/${published ? "publish" : "unpublish"}`),
listPointsRedemptions: (page = 1) => r("GET", "/admin/points/orders", undefined, { page }),
fulfillRedemption: (id) => r("POST", `/admin/points/orders/${id}/fulfill`),
cancelRedemption: (id) => r("POST", `/admin/points/orders/${id}/cancel`),
},
};
}
+3 -2
View File
@@ -26,8 +26,9 @@
--radius-sm: 4px;
--radius-md: 8px;
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
--font-sans:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC",
"Microsoft YaHei", sans-serif;
/* Spec-locked mall sizes: max-w-mall, h-hero */
--container-mall: 1200px;
+3 -8
View File
@@ -130,12 +130,7 @@ export interface Cart {
}
export type OrderStatus =
| "pending_payment"
| "paid"
| "fulfilling"
| "shipped"
| "completed"
| "cancelled";
"pending_payment" | "paid" | "fulfilling" | "shipped" | "completed" | "cancelled";
export interface OrderItem {
id: string;
@@ -467,7 +462,8 @@ export interface GroupBuyIntent {
group_id?: string | null;
}
export type ShipmentStatus = "pending" | "shipped" | "delivered";export interface Shipment {
export type ShipmentStatus = "pending" | "shipped" | "delivered";
export interface Shipment {
id: string;
shipment_no: string;
order_id: string;
@@ -699,4 +695,3 @@ export interface AftersaleReturnTrackingBody {
}
export type AftersaleArbitration = "refund" | "reject";