Commit Graph
9 Commits
Author SHA1 Message Date
overseer 7a26845abe Admin routes: quest definitions
The admin plane gains quest-definition routes on the existing admin
router, mirroring the children routes' thin-adapter pattern: the body
model carries the shape, the handler builds ONE ScheduleRule from the
request's rule object through the recurrence model's own from_dict
(rule validation stays the model's construction-time job), and every
call goes to ONE nestquest_core.quest_definitions business function —
the title/window/assignee policies, the whole-set window replacement
and the never-hard-delete policy all live in the core, never in a
handler.

- POST /quest-definitions: title + rule + assignees + windows (+
  optional description/icon), persisted atomically by the core.
- PATCH /quest-definitions/{id}: only supplied fields are forwarded
  (exclude_unset); an explicit null description/icon clears it, a null
  rule/windows is rejected; assignment stays unsettable here.
- PATCH /quest-definitions/{id}/active: the only removal path — the
  flag flips, the row, rule, assignees and windows survive.

Error mapping stays deliberately narrow: the core's definition_id:-
prefixed not-exist error is 404; every other ValueError (including
RuleValidationError) is 422 with the core's message, so a rejected
rule, window, assignee or title from the BODY never disguises itself
as a missing resource and an unexpected error is never swallowed as a
4xx.

Task: b586a2f1-1532-4194-a19a-8f8386d22590 (Feature 16).
2026-09-23 01:44:50 -04:00
dev_agent 0b7f71831b Admin routes: children (#158) 2026-09-23 01:23:57 -04:00
dev_agent a30b852789 Admin auth: nestquest-admins group gate and service-token rejection (#157) 2026-09-23 00:59:39 -04:00
dev_agent ca1165de3f Admin auth: Authentik JWT validation (#156) 2026-09-23 00:37:30 -04:00
dev_agent d4a55b6b40 SSE: publish uncompleted, child-day-complete and missed (#155) 2026-09-22 23:25:06 -04:00
dev_agent a07ce1b2f2 SSE endpoint and the quest-completed transition (#154) 2026-09-22 23:08:03 -04:00
dev_agent 550a8b3e1e Panel plane: complete route (idempotent) (#153) 2026-09-22 22:38:48 -04:00
dev_agent 4da762173c Panel plane: service-token auth and snapshot route (#152) 2026-09-22 22:23:16 -04:00
dev_agent 7fec3c76ef FastAPI skeleton: health, OpenAPI, core wiring (task 042dfc5c)
FastAPI skeleton: health, OpenAPI, core wiring (task 042dfc5c)
2026-09-21 16:13:41 -04:00