Add curator Influences tool with import wizard, CRUD, and graph.

CSV/JSON/XLSX mapping wizard expands artist-level rows to all paintings, blocks duplicate file/data imports via content and payload hashes, and documents the workflow in influence-import.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-07-16 18:54:26 +03:00
co-authored by Cursor
parent 62d7ebbe6a
commit 48bd17e985
21 changed files with 3402 additions and 15 deletions
+17
View File
@@ -195,6 +195,23 @@ Requires curator session. Base path: `/api/translations`.
| `PUT` | `/api/translations/:entityType/:id` | Upsert fields `{ locale, fields, status }` |
| `POST` | `/api/translations/:entityType/:id/publish` | Publish all draft/reviewed rows for locale |
## Influences (curator)
Requires curator session. Base path: `/api/influences`. See [influence-import.md](influence-import.md).
| Method | Path | Purpose |
|--------|------|---------|
| `GET` | `/api/influences` | List edges (`artistId`, `paintingId`, `q`, pagination) |
| `GET` | `/api/influences/graph?artistId=` | Neighborhood nodes/edges for visualization |
| `POST` | `/api/influences` | Create edge `{ paintingId, sourceType, sourceArtistId\|sourcePaintingId\|sourceMovementId, … }` |
| `PATCH` | `/api/influences/:id` | Update notes / remap source |
| `DELETE` | `/api/influences/:id` | Delete edge |
| `POST` | `/api/influences/import/parse` | Parse upload `{ filename, contentBase64, sheet? }` — returns `contentHash` / `payloadHash` / `alreadyImported` |
| `POST` | `/api/influences/import/preview` | Validate `{ rows, mapping, contentHash?, payloadHash? }` |
| `POST` | `/api/influences/import/commit` | Insert `{ proposals, contentHash?, payloadHash?, force? }``409` if duplicate unless `force` |
Public painting detail still exposes read-only `influencedBy` / `influenced` (unchanged).
---
## `GET /api/search`