feat(edit): 采集插件、编辑页SKU 属性动态展示、颜色展示开发
This commit is contained in:
@@ -10,6 +10,8 @@ import type {
|
||||
Operation,
|
||||
SaveProductEditorDraftRequest,
|
||||
SaveProductEditorDraftResponse,
|
||||
SaveProductSourceDescriptionRequest,
|
||||
SaveProductSourceDescriptionResponse,
|
||||
} from '@atlas/contracts';
|
||||
import { api } from './api';
|
||||
|
||||
@@ -42,6 +44,23 @@ export const productEditorApi = {
|
||||
'If-Match': `"${revisions.product}:${revisions.profile}"`,
|
||||
},
|
||||
}),
|
||||
saveSourceDescription: (
|
||||
productId: string,
|
||||
platformId: string,
|
||||
revisions: { product: number; profile: number },
|
||||
payload: SaveProductSourceDescriptionRequest
|
||||
) =>
|
||||
api.put<SaveProductSourceDescriptionResponse>(
|
||||
`/products/${productId}/source-description`,
|
||||
payload,
|
||||
{
|
||||
headers: {
|
||||
'X-Atlas-Platform-Id': platformId,
|
||||
'Idempotency-Key': crypto.randomUUID(),
|
||||
'If-Match': `"${revisions.product}:${revisions.profile}"`,
|
||||
},
|
||||
}
|
||||
),
|
||||
categoryOptions: (profileId: string, platformId: string, search?: string) =>
|
||||
api.get<ProductEditorCategoryOption[]>(
|
||||
`/product-platform-profiles/${profileId}/category-options`,
|
||||
|
||||
Reference in New Issue
Block a user