feat(ai-edit): 开发 AI 填报功能

This commit is contained in:
R524809
2026-09-23 17:18:09 +08:00
parent 95a2a37f1b
commit b3958166dd
35 changed files with 2832 additions and 278 deletions
+27
View File
@@ -5,6 +5,7 @@ import type {
ProductEditorCategoryOption,
ProductEditorContext,
ProductEditorSnapshot,
ProductAiTask,
ProductEditorValidation,
ProductPublishPreflight,
Operation,
@@ -31,6 +32,32 @@ export const productEditorApi = {
api.get<ProductEditorSnapshot>(`/products/${productId}/editor`, {
headers: { 'X-Atlas-Platform-Id': platformId },
}),
aiAutofill: (profileId: string, platformId: string) =>
api.post<{ ai_task_id: string; status: 'queued' }>(
`/product-platform-profiles/${profileId}/ai/autofills`,
{},
{
headers: {
'X-Atlas-Platform-Id': platformId,
'Idempotency-Key': crypto.randomUUID(),
},
}
),
aiSkuCopy: (profileId: string, variantId: string, platformId: string) =>
api.post<{ ai_task_id: string; status: 'queued' }>(
`/product-platform-profiles/${profileId}/variants/${variantId}/ai/copy`,
{},
{
headers: {
'X-Atlas-Platform-Id': platformId,
'Idempotency-Key': crypto.randomUUID(),
},
}
),
aiTask: (taskId: string, platformId: string) =>
api.get<ProductAiTask>(`/product-ai-tasks/${taskId}`, {
headers: { 'X-Atlas-Platform-Id': platformId },
}),
save: (
productId: string,
platformId: string,