File uploads external source

This commit is contained in:
sriram
2026-08-28 08:54:00 +05:30
parent e073d68d60
commit 8f8f370566
4 changed files with 402 additions and 3 deletions

View File

@@ -380,6 +380,23 @@ export const api = {
method: 'POST',
}),
// --- Admin: the review inbox (a colleague dropped files; you decide) ---
// The uploader half is POST /api/uploads/catalog, which the browser never
// calls - a colleague hits it with an X-API-Key from a script.
listInbox: () => request('/api/admin/catalog-batch/inbox'),
startBatchFromInbox: (fileIds, { use_llm = false, fetch_images = false } = {}) =>
request('/api/admin/catalog-batch/from-inbox', {
method: 'POST',
body: JSON.stringify({ file_ids: fileIds, use_llm, fetch_images }),
}),
dismissInboxFiles: (fileIds) =>
request('/api/admin/catalog-batch/inbox/dismiss', {
method: 'POST',
body: JSON.stringify({ file_ids: fileIds }),
}),
// --- User workspace: single + batch product entry ---
// Guarded by `add_product` / `upload_batch_products` - see
// app/api/routers/user_products.py.