feat(ai-edit): 开发 AI 填报功能
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user