API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · entity_watchers

Entity Watcher Schema

ID del esquema
entity_watcher
Colección
entity_watchers
Permisos
  • Leerentity_watcher_view
  • Crearentity_watcher_manage
  • Modificarentity_watcher_manage
  • Eliminarentity_watcher_manage

Campos

Entity Watcher Schema

entity_watchers4 permisos

Schema for validating entity watcher subscriptions (Beobachter)

entityTypestringobligatorio

Target COLLECTION name (plural, e.g. "tickets" / "hr_tickets") — not the singular schema id. Matches the `entityType` convention of the notifications collection.

máx. 64 caracteressolo lectura
entityIduuidobligatorio

UUIDv7 of the watched record.

solo lectura
userIduuidobligatorio

INTERNAL user id (`users._id`, UUIDv7) — never the better-auth session id. Everything downstream (notifications, data scopes) speaks internal ids.

solo lectura
userNamestringopcional

Denormalized display name for the watcher chips, so the list does not need an N+1 join. Display-only; `userId` is authoritative.

máx. 200 caracteresadmite null
originstringopcional

How the subscription came to be. MANUAL = clicked "Beobachten". The AUTO_* origins come from ADR 0515 §4 (commented / was mentioned / handed the ticket over) and are what the per-user auto-watch toggle switches off. Kept for the UI hint and for measuring whether auto-watch pulls its weight.

MANUALAUTO_COMMENTAUTO_MENTIONAUTO_HANDOVER
Valor por defecto: "MANUAL"solo lectura
mutedUntildatetimeopcional

Silence deliveries until this instant WITHOUT losing the subscription. Null = active.

admite null
remindAtdatetimeopcional

Personal reminder: notify THIS watcher at this instant. Cleared by the worker once delivered. Null/missing = no reminder. Private to the watcher — other users never see it.

solo lecturaadmite null
reminderNotestringopcional

Optional note shown in the reminder notification. Private to the watcher.

máx. 500 caracteressolo lecturaadmite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/entity_watchers — Lista, paginada y filtrable
  • GET /api/v1/entity_watchers/<id> — Una entidad
  • POST /api/v1/entity_watchers — Crear
  • PATCH /api/v1/entity_watchers/<id> — Actualización parcial
  • DELETE /api/v1/entity_watchers/<id> — Eliminación lógica
  • GET /api/v1/entity_watchers/<id>/timeline — Auditoría y actividades

Búsqueda