Files

1.8 KiB

Data Model: Admin List Views

No schema changes. Three response-shape projections over existing models.

SlaRunListItem (response shape only)

Field Source
ticketId SLARun.ticketId
ticketCode SLARun.ticket.code (via include)
status SLARun.status
firstResponseDueAt SLARun.firstResponseDueAt
resolutionDueAt SLARun.resolutionDueAt
breachedAt SLARun.breachedAt
firstResponseBreachedAt SLARun.firstResponseBreachedAt

EscalationEventListItem (response shape only)

Field Source
ticketId EscalationEvent.ticketId
ticketCode EscalationEvent.ticket.code (via include)
reason EscalationEvent.reason
ruleId EscalationEvent.ruleId (null for manual/no-match)
triggeredBy EscalationEvent.triggeredBy
toNodeId EscalationEvent.toNodeId
createdAt EscalationEvent.createdAt

ProductCatalogListItem (response shape only)

Field Source
id Product.id
externalProductId Product.externalProductId
name Product.name
status Product.status
supportEnabled Product.supportEnabled
integrationStatus Derived: product.integration?.status ?? null — never the full ProductIntegration row (research.md)

Validation / Business Rules

  • GET /admin/sla-runs?status=status validated against SLA_RUN_STATUSES (running, paused, warning, breached, completed); omitted means unfiltered.
  • GET /admin/escalation-events?limit=limit coerced, 1..200, default 50; ordered by createdAt desc.
  • GET /admin/products — no filter; ordered by name asc (matches existing catalog list conventions elsewhere in this codebase, e.g. TeamsRepository.findAll).