feat(edit): 编辑页开发
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { api } from '@/services/api';
|
||||
|
||||
/** 仅调试页使用:服务端代表当前平台默认门店读取 Ozon 原始响应。 */
|
||||
export const categoryTreeDebugApi = {
|
||||
fetchDefaultStoreTree: (platformId: string) =>
|
||||
api.post<unknown>('/stores/default/category-tree-debug', undefined, {
|
||||
headers: { 'X-Atlas-Platform-Id': platformId },
|
||||
}),
|
||||
};
|
||||
@@ -17,6 +17,11 @@ export interface UpdateStoreOptions {
|
||||
revision: number;
|
||||
}
|
||||
|
||||
export interface CategoryTreeRefreshResult {
|
||||
category_count: number;
|
||||
active_category_count: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店管理接口,契约见 docs/api/stores-and-platforms.md。
|
||||
* 列表必须用 platform_id 查询参数(管理列表禁止携带 X-Atlas-Platform-Id header)。
|
||||
@@ -57,6 +62,12 @@ export const storesApi = {
|
||||
headers: { 'Idempotency-Key': crypto.randomUUID() },
|
||||
}),
|
||||
|
||||
/** 同步重新拉取并写入该门店完整类目树;密钥仅在服务端短暂使用。 */
|
||||
requestCategoryTreeSync: (storeId: string) =>
|
||||
api.post<CategoryTreeRefreshResult>(`/stores/${storeId}/category-tree-syncs`, undefined, {
|
||||
headers: { 'Idempotency-Key': crypto.randomUUID() },
|
||||
}),
|
||||
|
||||
requestWarehouseSync: (storeId: string) =>
|
||||
api.post<StoreOperationResponse>(`/stores/${storeId}/warehouse-syncs`, undefined, {
|
||||
headers: { 'Idempotency-Key': crypto.randomUUID() },
|
||||
|
||||
Reference in New Issue
Block a user