Persist circuit structure edits
This commit is contained in:
@@ -36,8 +36,9 @@ snapshots contain zero, one or multiple complete device rows. Move commands
|
||||
contain each row's expected and target circuit plus its exact expected and
|
||||
target sort order. This makes deletion and moves undoable without generating
|
||||
replacement identities or renumbering circuits. Existing Circuit and
|
||||
CircuitDeviceRow cell edits in the editor consume these endpoints; the
|
||||
remaining structural editor writes are still being migrated.
|
||||
CircuitDeviceRow cell edits plus standalone insert/delete actions in the editor
|
||||
consume these endpoints. Move, reorder and renumber UI paths are still being
|
||||
migrated.
|
||||
|
||||
`circuit-device-row.move` targets existing circuits in the same circuit list.
|
||||
`circuit-device-row.move-with-new-circuit` atomically creates exactly one
|
||||
@@ -163,39 +164,17 @@ Response sketch:
|
||||
}
|
||||
```
|
||||
|
||||
### Circuit CRUD
|
||||
### Circuit Structure
|
||||
|
||||
- `POST /projects/:projectId/circuit-lists/:circuitListId/circuits`
|
||||
- create circuit in list/section
|
||||
- `POST /projects/:projectId/circuit-lists/:circuitListId/circuits-with-device-rows`
|
||||
- atomically create one circuit and one or more initial device rows
|
||||
- `DELETE /circuits/:circuitId`
|
||||
- delete circuit (and related rows via DB relations)
|
||||
- `GET /circuit-sections/:sectionId/next-identifier`
|
||||
- preview next identifier for section (`prefix + maxSuffix + 1`)
|
||||
|
||||
Request sketch (`POST .../circuits`):
|
||||
|
||||
```json
|
||||
{
|
||||
"sectionId": "sec_1",
|
||||
"equipmentIdentifier": "-2F14",
|
||||
"displayName": "Sockets East",
|
||||
"sortOrder": 140
|
||||
}
|
||||
```
|
||||
|
||||
### Device Row CRUD
|
||||
|
||||
- `POST /circuits/:circuitId/device-rows`
|
||||
- create row inside a circuit
|
||||
- `DELETE /circuit-device-rows/:rowId`
|
||||
- delete row
|
||||
|
||||
Circuit and device-row field updates are available only as versioned
|
||||
`circuit.update` and `circuit-device-row.update` commands through
|
||||
`POST /projects/:projectId/commands`. There are no direct field-update PATCH
|
||||
routes.
|
||||
Circuit and device-row field updates, standalone insertions and standalone
|
||||
deletions are available only as the corresponding versioned commands through
|
||||
`POST /projects/:projectId/commands`. There are no direct field-update PATCH,
|
||||
structure POST or CircuitDeviceRow DELETE routes. The direct
|
||||
`DELETE /circuits/:circuitId` route remains temporarily for the inverse of the
|
||||
not-yet-migrated placeholder move UI and must not be used by new features.
|
||||
|
||||
### Move Device Row
|
||||
|
||||
|
||||
Reference in New Issue
Block a user