lekss361
|
a425f4eef0
|
feat(tradein): Stage 4a — API endpoints for Avito enrichment + IMV benchmark UI
3 NEW admin endpoints (debug + manual triggers):
- POST /api/v1/admin/scrape/avito-house?house_url=... — Houses Catalog enrichment (Stage 2c)
- POST /api/v1/admin/scrape/avito-detail?item_url=... — listing detail enrichment (Stage 2b)
- POST /api/v1/admin/scrape/avito-imv?address=...&rooms=... — IMV debug (Stage 2d, no cache)
2 NEW trade-in endpoints (UI):
- GET /api/v1/trade-in/estimate/{id}/houses — top-5 ближайших houses к target (Stage 2c data)
- GET /api/v1/trade-in/estimate/{id}/imv-benchmark — Avito IMV для UI badge (Stage 3 cache
lookup + fallback to address-match within 24h; includes our_median_price + diff_pct vs IMV)
2 NEW Pydantic schemas: HouseInfoForEstimate, IMVBenchmarkResponse
5 pytest offline tests (FastAPI TestClient + mocked DB + weasyprint stub)
Refs: AvitoScraper_v2_Implementation_Plan Stage 4a.
|
2026-05-23 16:32:11 +03:00 |
|