feat(admin,shop-admin): content/brand management + merchant shop profile (add-content-admin-ui)
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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"
|
||||
>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user