frontend enrichment pipeline

This commit is contained in:
sriram
2026-08-18 16:55:31 +05:30
parent e05d4d6e2b
commit 39ae51e291
3 changed files with 314 additions and 11 deletions

View File

@@ -284,6 +284,19 @@ export const api = {
body: JSON.stringify({ store_id, rules }),
}),
// --- Admin: store-catalog ingestion (Excel -> 11-stage pipeline -> brand tables) ---
// See app/api/routers/store_catalog.py. `preview` parses only, so the
// operator can check the column mapping before paying for a full scrape.
previewStoreCatalog: (file) => upload('/api/admin/store-catalog/preview', file),
// The two flags are query params, not form fields: the endpoint takes them
// as plain query arguments alongside the multipart body.
ingestStoreCatalog: (file, { use_llm = true, fetch_images = true } = {}) =>
upload(`/api/admin/store-catalog/ingest${qs({ use_llm, fetch_images })}`, file),
getStoreCatalogJob: (jobId) =>
request(`/api/admin/store-catalog/jobs/${encodeURIComponent(jobId)}`),
// --- User workspace: single + batch product entry ---
// Guarded by `add_product` / `upload_batch_products` - see
// app/api/routers/user_products.py.