pub fn insert(conn: &Connection, req: &NewSubscription<'_>) -> Result<String>Expand description
Insert a subscription, hashing any secret before persisting.
Returns the new subscription’s id.
P5 (G9): when event_types is Some, the structured opt-in list is
JSON-encoded into the new event_types column AND mirrored into
the legacy comma-separated events column so the existing
dispatch matcher continues to work without a second code path. An
unknown event type returns Err — the canonical list lives in
WEBHOOK_EVENT_TYPES.