auto-save 2026-05-17 16:27 (~4)

This commit is contained in:
2026-05-17 16:27:18 +08:00
parent c690979b58
commit 3d851d8a5c
4 changed files with 139 additions and 34 deletions

View File

@@ -147,6 +147,22 @@ export async function uploadStoryboardAsset(jobId: string, file: File): Promise<
return res.json()
}
export async function generateProductAngleAsset(
jobId: string,
body: { source_ref: ImageRef; target_view: string; note?: string },
): Promise<ImageRef> {
const res = await fetch(`${API_BASE}/jobs/${jobId}/assets/product-angle`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
})
if (!res.ok) {
const txt = await res.text().catch(() => "")
throw new Error(`generateProductAngleAsset ${res.status} ${txt.slice(0, 300)}`)
}
return res.json()
}
export async function listProductLibrary(): Promise<ProductLibraryItem[]> {
const res = await fetch(`${API_BASE}/product-library/skg`)
if (!res.ok) {