feat: three nuxt frontends, demo seed, rounding + money-exponent + rate-cast fixes, archived specs

This commit is contained in:
Chengdong Zhang
2026-09-17 13:34:38 +08:00
parent dc9fd31c5e
commit 653f13161a
85 changed files with 4327 additions and 106 deletions
+8
View File
@@ -76,11 +76,13 @@ export interface CurrencyUpsertBody {
export interface ShopProductQuery {
page?: number;
per_page?: number;
status?: ProductStatus;
}
export interface ShopOrderQuery {
page?: number;
per_page?: number;
status?: OrderStatus;
}
@@ -145,6 +147,7 @@ export interface ApiClient {
listMyOrders(page?: number): Promise<Paged<Order>>;
getOrder(id: string): Promise<Order>;
cancelOrder(id: string): Promise<Order>;
payOrder(id: string): Promise<Order>;
confirmDelivered(shipmentId: string): Promise<Shipment>;
listMyShipments(): Promise<Shipment[]>;
requestInvoice(
@@ -157,12 +160,14 @@ export interface ApiClient {
shop: {
getMyShop(): Promise<Shop>;
listMyProducts(q?: ShopProductQuery): Promise<Paged<Product>>;
getProduct(id: string): Promise<Product>;
createProduct(body: ProductUpsertBody): Promise<Product>;
updateProduct(id: string, body: ProductUpsertBody): Promise<Product>;
publish(id: string): Promise<Product>;
unpublish(id: string): Promise<Product>;
upsertSku(productId: string, body: SkuUpsertBody): Promise<Sku>;
listOrders(q?: ShopOrderQuery): Promise<Paged<Order>>;
getOrder(id: string): Promise<Order>;
createShipment(
orderId: string,
carrier: string,
@@ -210,6 +215,7 @@ export function createApi(opts: ApiClientOptions): ApiClient {
listMyOrders: (page = 1) => r("GET", "/orders", undefined, { page }),
getOrder: (id) => r("GET", `/orders/${id}`),
cancelOrder: (id) => r("POST", `/orders/${id}/cancel`),
payOrder: (id) => r("POST", `/orders/${id}/pay`),
confirmDelivered: (shipmentId) => r("POST", `/shipments/${shipmentId}/confirm-delivered`),
listMyShipments: () => r("GET", "/shipments"),
requestInvoice: (orderId, title, taxNo, kind) =>
@@ -218,12 +224,14 @@ export function createApi(opts: ApiClientOptions): ApiClient {
shop: {
getMyShop: () => r("GET", "/shop/profile"),
listMyProducts: (q = {}) => r("GET", "/shop/products", undefined, { ...q }),
getProduct: (id) => r("GET", `/shop/products/${id}`),
createProduct: (body) => r("POST", "/shop/products", body),
updateProduct: (id, body) => r("PUT", `/shop/products/${id}`, body),
publish: (id) => r("POST", `/shop/products/${id}/publish`),
unpublish: (id) => r("POST", `/shop/products/${id}/unpublish`),
upsertSku: (productId, body) => r("POST", `/shop/products/${productId}/skus`, body),
listOrders: (q = {}) => r("GET", "/shop/orders", undefined, { ...q }),
getOrder: (id) => r("GET", `/shop/orders/${id}`),
createShipment: (orderId, carrier, trackingNo, items) =>
r("POST", `/shop/orders/${orderId}/shipments`, {
carrier,