MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / registerEvents

Method registerEvents

internal/httpapi/events.go:62–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62func (s *Server) registerEvents() {
63 huma.Register(s.API, huma.Operation{
64 OperationID: "listEvents", Method: http.MethodGet, Path: "/v1/events",
65 Summary: "List events", Tags: []string{"events"},
66 Description: "The webhook-event delivery log, filterable by type/agent/conversation/message and time range, with cursor pagination.",
67 Security: []map[string][]string{{"bearer": {}}},
68 }, s.handleListEvents)
69
70 huma.Register(s.API, huma.Operation{
71 OperationID: "getEvent", Method: http.MethodGet, Path: "/v1/events/{id}",
72 Summary: "Get an event", Tags: []string{"events"},
73 Security: []map[string][]string{{"bearer": {}}},
74 }, s.handleGetEvent)
75
76 huma.Register(s.API, huma.Operation{
77 OperationID: "redeliverEvent", Method: http.MethodPost, Path: "/v1/events/{id}/redeliver",
78 Summary: "Redeliver an event", Tags: []string{"events"},
79 Description: "Re-enqueue webhook delivery for an event. With a webhook_id, replays to that subscriber; without, fans out to every originally-matched subscriber. Auto-deduplicated within a short window — receivers must dedup on event id.",
80 Security: []map[string][]string{{"bearer": {}}},
81 }, s.handleRedeliverEvent)
82}
83
84// RedeliverView mirrors the legacy redeliverResponse.
85type RedeliverView struct {

Callers 1

registerOperationsMethod · 0.95

Calls 1

RegisterMethod · 0.80

Tested by

no test coverage detected