API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · entity_watchers

Entity Watcher Schema

ID du schéma
entity_watcher
Collection
entity_watchers
Autorisations
  • Lireentity_watcher_view
  • Créerentity_watcher_manage
  • Modifierentity_watcher_manage
  • Supprimerentity_watcher_manage

Champs

Entity Watcher Schema

entity_watchers4 autorisations

Schema for validating entity watcher subscriptions (Beobachter)

entityTypestringobligatoire

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

max. 64 caractèreslecture seule
entityIduuidobligatoire

UUIDv7 of the watched record.

lecture seule
userIduuidobligatoire

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

lecture seule
userNamestringfacultatif

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

max. 200 caractèresnullable
originstringfacultatif

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
Par défaut : "MANUAL"lecture seule
mutedUntildatetimefacultatif

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

nullable
remindAtdatetimefacultatif

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.

lecture seulenullable
reminderNotestringfacultatif

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

max. 500 caractèreslecture seulenullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/entity_watchers — Liste, paginée et filtrable
  • GET /api/v1/entity_watchers/<id> — Une entité
  • POST /api/v1/entity_watchers — Créer
  • PATCH /api/v1/entity_watchers/<id> — Mise à jour partielle
  • DELETE /api/v1/entity_watchers/<id> — Suppression logique
  • GET /api/v1/entity_watchers/<id>/timeline — Audit et activités

Recherche