Appearance
Service Configuration Management
The Catalog module exposes service configuration management under /api/catalog/services.
Route Surface
GET /api/catalog/servicesPOST /api/catalog/servicesDELETE /api/catalog/services/:configIdPUT /api/catalog/services/:configIdDELETEreturns{ "message": "Service configuration deleted successfully" }when the configuration exists and is removed.
Validation Rules
POSTusescreateServiceConfigurationSchema, soservice,iconCode,price, andisEnabledare all required at the HTTP boundary.PUTusesupdateServiceConfigurationSchema, soiconCode,price, andisEnabledare optional for partial updates.PUTandDELETErequire aconfigIdroute param validated as a UUID v7.serviceis constrained by the shared enum and currently accepts onlyAI_AGENTS.iconCodemust be one of the published catalog icon values:bag,home,gift,sparkles,dining,car,users,heart,truck,tools,school,code,calendar,flight,camera,music,phone,globe,shield,key,star,flash,present,target,idea,clipboard, orwasher.POSTis create-only. If a configuration for the sameservicealready exists, the command returns a structured conflict error.PUTis update-only. It targets an existing configuration record byconfigId, so theservicevalue remains immutable after creation.DELETEis delete-only. If the targetconfigIddoes not exist, the command returns the same structured not-found error asPUT.
Structured Error Contract
The Catalog command layer returns structured application errors for invalid create/update/delete state transitions instead of silently upserting or ignoring missing records.
| Code | HTTP | Meaning |
|---|---|---|
CATALOG.SERVICE_CONFIGURATION_ALREADY_EXISTS | 409 | POST tried to create a configuration for a service that already has one. |
CATALOG.SERVICE_CONFIGURATION_NOT_FOUND | 404 | PUT or DELETE targeted a configId that does not map to a persisted configuration. |
This keeps the Catalog module aligned with the shared Result<T> + AppError pattern used in the rest of the API.
Panel (Ajustes)
El panel administra estas configuraciones en Ajustes → Servicios (section=services): lista, filtros, creación y edición con react-hook-form, y cliente HTTP validado con los mismos esquemas Zod del paquete @repo/schemas/catalog. La UI respeta una configuración por valor de ServiceType: el alta solo permite elegir tipos aún libres y deshabilita “Crear” cuando el enum está saturado; en edición el tipo no es editable. Detalle de producto (inglés): Settings — Catalog services.