feat(import): #11-14 router import Treapta 2 — upload+staging+mapare+preview+commit+export
Implementeaza app/api/v1/import_router.py (router nou, montat in app): POST /v1/import — upload xlsx/csv, staging in import_batches/import_rows, PII criptat Fernet (Issue 5a), BEGIN IMMEDIATE+executemany (Issue 6), purge_after 90z (T16), sugestii fuzzy coloane DRY (Issue 5b/Eng#4), detectie drift semnatura (T4/D3), multisheet support GET/POST /v1/import/{id}/column-mapping — mapare coloane per cont cu semnatura + drift detection GET /v1/import/{id}/preview — 6 stari per rand (ok/needs_mapping/needs_data/ needs_review/already_sent/duplicate_in_file), already_sent batch lookup nu N+1 (Eng#5), intra-batch collision EXCLUSIV preview (OV-3/T11) POST /v1/import/{id}/commit — gate HARD N confirmat (T5/D3), atestare pe valori (Voce#1), INSERT ON CONFLICT DO NOTHING TOCTOU (Issue 1/T12), import_attestations rows_hash+n_confirmed (Voce#9), batch_id/row_index (T7) GET /v1/import/{id}/export-failed — CSV randuri esuate cu motiv (T8) Teste: 36 cazuri noi in tests/test_import_api.py; 243 total, toate verzi. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1125
app/api/v1/import_router.py
Normal file
1125
app/api/v1/import_router.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user