- The public HTTP API client will be generated from Convoy's OpenAPI spec (
docs/v3/openapi3.yaml) via Speakeasy. - Webhook signature verification stays hand-written. Generators do not own crypto.
src/webhook.tsand the sharedtests/signature-vectors.jsoncontract remain the source of truth for verify (see.genignore).
Shipping the Speakeasy client is an intentional 2.x break. Hand-written 1.x method shapes under src/Api/** are not silently adapted to look the same.
- This bootstrap PR wires Speakeasy + protects verify.
- The first
sdk_generation.yamlrun opens a PR that replaces the hand-written HTTP client with generated code and publishes as2.x. That PR must re-exportWebhookfrom the generated package entrypoint (export { Webhook } from "./webhook";— preserved bypersistentEdits), so the snippet below keeps resolving. - Consumers pin
1.xuntil they migrate call sites.
const { Webhook } = require('convoy.js');
const webhook = new Webhook({
header: request.headers['x-convoy-signature'],
payload: rawBody,
secret: endpointSecret,
});
webhook.verify();CI on frain-dev/convoy triggers Speakeasy when OpenAPI artifacts change. Locally (requires SPEAKEASY_API_KEY):
speakeasy run