feat(silo): server-side BOM merge endpoint, UUID lookup, and SSE event #76
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 2 (server) — BOM Merge Endpoint + UUID Lookup + SSE Event
Ref:
docs/BOM_MERGE.mdPhases 1-2 & Section 5, issue #68Required by: #73 (UUID resolution), Phase 2 client (merge submission)
Summary
Add server-side API endpoints and logic to support the assembly BOM merge workflow. This is the server counterpart to the client-side issues.
New Endpoints
GET /api/items/by-uuid/{uuid}Resolve a Silo item UUID to its full item record. Used by the client to map
SiloItemIddocument properties to part numbers during link extraction.GET /api/items/{partNumber}POST /api/items/{partNumber}/bom/mergeAccept an assembly-derived BOM and merge it with the existing server BOM.
Request:
Merge rules:
add_bom_entrylogic"source": "manual"are never overwritten by assembly mergesResponse: Returns diff summary with
added,removed,quantity_changed,unchangedarrays,warningsarray for unreferenced items, andresolve_urlfor the web UI.SSE Event
Emit
bom_mergeevent on the activity stream after merge completes:Implementation Notes
sourcefield ("assembly"vs"manual") to distinguish originGET .../bom,GET .../bom/expanded,GET .../bom/flat) remain unchanged