auto-save 2026-05-17 16:27 (~4)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user