Repository navigation
feat(webhooks): add typed endpoints and signature verification - #85
Merged
Merged
Conversation
thedogwiththedataonit
force-pushed
the
codex/outbound-email-webhooks
branch
from
November 1, 2026 01:38
7d58697 to
2c3937f
Compare
thedogwiththedataonit
force-pushed
the
codex/outbound-email-webhooks
branch
from
November 3, 2026 13:47
e0db056 to
8310b56
Compare
Resolve the spec conflict by syncing openapi/public-api-v1.yaml from brew-v2 main merged with GetBrew/brew-v2#2398, then regenerate the types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- verifyWebhook trusts the signature and accepts any signed event envelope, so a new event type or schema version never rejects real deliveries on an older SDK. BrewWebhookVerificationError carries a `reason`. - `payload` accepts the raw bytes (a Node Buffer) as well as a string. - `remove` is `delete`, like every other resource; `replay(webhookId, eventId)` takes its identities positionally. - Docs: receivers answer 400 on verification errors, handle unknown types, and deduplicate on svix-id (test events share a fixture event_id). - CHANGELOG and the error table list the new surface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated spec, types and snippets regenerated from brew-v2 codex/outbound-email-webhooks merged with main 5d0f0e828d. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a typed
brew.webhooksresource for brand-scoped endpoint CRUD, secret rotation, test delivery, event history, attempts and replay. Export event contracts and a local Svix-compatible signature verifier with typed failures. Documentation covers receiver verification, retry identity and retained-payload limits.Rebased onto current main and regenerated types from the canonical app OpenAPI mirror, preserving main's array filters and resource fixes. Local webhook and contract parity checks pass (15 tests), along with typecheck and lint; CI runs the full package gates.
Coordinates with app #2398, CLI #75 and docs #363. Publish after the matching API deployment. This PR does not publish a package.


Confidence Score: 5/5
The PR appears safe to merge, with no new actionable issues found.Summary
Adds typed
brew.webhooksmethods and local signature checks throughverifyWebhook.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR App[Application] --> Methods[brew.webhooks methods] Methods --> HTTP[Shared HTTP client] HTTP --> API[Brew API] Delivery[Incoming webhook] --> Verify[verifyWebhook] Verify --> Checks[Check timestamp and signature] Checks --> Result[Return event or typed error]Reviews (10) · Last reviewed commit: "Sync spec to brew-v2 main after webhooks..." · Reviewed by Greptile