feat(admin,shop-admin): content/brand management + merchant shop profile (add-content-admin-ui)

This commit is contained in:
Chengdong Zhang
2026-09-23 14:27:00 +08:00
parent 9a749e2551
commit 93e5a05d48
22 changed files with 930 additions and 22 deletions
+4
View File
@@ -42,6 +42,7 @@ import type {
ShopFlashSaleSession,
ShopProfile,
ShopProfileInput,
ShopProfileSelfInput,
Sku,
User,
} from "./types";
@@ -240,6 +241,8 @@ export interface ApiClient {
listGroupBuyingActivities(): Promise<GroupBuyingActivityView[]>;
shop: {
getMyShop(): Promise<Shop>;
/** Merchant self-write of the own shop profile; scores stay platform-owned. */
updateMyProfile(body: ShopProfileSelfInput): Promise<ShopProfile>;
listMyProducts(q?: ShopProductQuery): Promise<Paged<Product>>;
getProduct(id: string): Promise<Product>;
createProduct(body: ProductUpsertBody): Promise<Product>;
@@ -357,6 +360,7 @@ export function createApi(opts: ApiClientOptions): ApiClient {
listGroupBuyingActivities: () => r("GET", "/group-buying/activities"),
shop: {
getMyShop: () => r("GET", "/shop/profile"),
updateMyProfile: (body) => r("PUT", "/shop/profile", body),
listMyProducts: (q = {}) => r("GET", "/shop/products", undefined, { ...q }),
getProduct: (id) => r("GET", `/shop/products/${id}`),
createProduct: (body) => r("POST", "/shop/products", body),
+6
View File
@@ -612,3 +612,9 @@ export interface ShopProfileInput {
score_speed?: number | null;
}
/** Merchant self-write profile input; the platform-owned score fields are excluded. */
export type ShopProfileSelfInput = Omit<
ShopProfileInput,
"score_rating" | "score_agreement" | "score_service" | "score_speed"
>;