Files
inter-hub/Web/Routes.hs
Bernd Worsch 14779f0768 feat(P6/T02-T03): EnvelopeEmissionContract and InteractionReportingContract
T02: EnvelopeEmissionContractsController (index+show, read-only); widgetEnvelope
helper validates against contract v1.0 required attributes with inline warning
on missing view-context; adapterStatusBadge helper added to Application.Helper.View.

T03: InteractionReportingContractsController (index+show, read-only); API endpoint
POST /api/v1/interaction-events with bearer token auth against hub.api_key,
contract v1.0 field validation, and 201/422/401 responses.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:11:03 +00:00

57 lines
1.5 KiB
Haskell

module Web.Routes where
import IHP.RouterPrelude
import Generated.Types
import Web.Types
-- Hubs
instance AutoRoute HubsController
-- Widgets
instance AutoRoute WidgetsController
-- Interaction Events (POST /widgets/:widgetId/events)
instance AutoRoute InteractionEventsController
-- Annotations (scoped to widget: /widgets/:widgetId/annotations/)
instance AutoRoute AnnotationsController
-- Annotation Threads (scoped to widget)
instance AutoRoute AnnotationThreadsController
-- Requirement Candidates
instance AutoRoute RequirementCandidatesController
-- Requirements (Phase 3)
instance AutoRoute RequirementsController
-- Decision Records (Phase 3)
instance AutoRoute DecisionRecordsController
-- Deployment Records (Phase 4)
instance AutoRoute DeploymentRecordsController
-- Agent Proposals (Phase 5)
instance AutoRoute AgentProposalsController
-- Phase 6 — Cross-Framework UI Adaptation
-- API endpoint: POST /api/v1/interaction-events
instance CanRoute ApiInteractionEventsController where
parseRoute' = do
_ <- string "/api"
_ <- string "/v1"
_ <- string "/interaction-events"
endOfInput
pure CreateApiInteractionEventAction
instance HasPath ApiInteractionEventsController where
pathTo CreateApiInteractionEventAction = "/api/v1/interaction-events"
instance AutoRoute EnvelopeEmissionContractsController
instance AutoRoute InteractionReportingContractsController
instance AutoRoute WidgetAdapterSpecsController
-- Sessions
instance AutoRoute SessionsController