feat(#357): custom_field_definitions generisch — W4b-Muster (422/403-Entity-Checks, {items,total}-Shape, ACL-Fix), zentrale Helper, Plural-Ableitungs-Fix

This commit is contained in:
Agent Zero
2026-08-29 01:27:24 +02:00
parent 36dd7c5101
commit b5036a1fc0
8 changed files with 442 additions and 71 deletions
+11
View File
@@ -228,6 +228,17 @@ List endpoints use `page` (1-based) and `page_size` (1-100) query parameters. Re
| PATCH | `/api/v1/sequences/{sequence_id}` | Update a sequence. |
| DELETE | `/api/v1/sequences/{sequence_id}` | Delete a sequence. |
### custom-fields-definitions (4 endpoints)
Generic CRUD for tenant-wide custom field definitions per entity type (W4b pattern: entity must be a registered entity type — 422; user needs the owning module's read permission, e.g. `contacts:read`, on top of `custom_fields:read/write` — 403).
| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/v1/custom-fields/definitions` | List definitions, optional `?entity=` filter. **Response**: `{items: CustomFieldDefinition[], total: int}` |
| POST | `/api/v1/custom-fields/definitions` | Create a definition. **Request**: `CustomFieldDefinitionCreate` |
| PATCH | `/api/v1/custom-fields/definitions/{definition_id}` | Update a definition. **Request**: `CustomFieldDefinitionUpdate` |
| DELETE | `/api/v1/custom-fields/definitions/{definition_id}` | Delete a definition (204). |
### system-settings (6 endpoints)
| Method | Path | Description |