feat(webhooks): add Webhooks CRUD#105
Open
sgerrand wants to merge 3 commits into
Open
Conversation
Adds Humaans.Webhooks covering /api/webhooks. Webhooks subscribe a URL to a list of event types; the struct captures the documented shape (id, companyId, url, events, timestamps).
The rebase onto origin/main left two def webhooks/0 entries — the one added by this branch and the existing one from #92's signature-verify work. Dropping the duplicate and updating the moduledoc to mention both the CRUD operations and verify_signature/3.
Coverage Report for CI Build 25329141471Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
💁 Adds CRUD coverage for the Webhooks resource, complementing the existing
verify_signature/3helper merged in #92.Summary
Humaans.Webhooksnow exposes both:/api/webhooks(subscribe/list/update/delete a URL+events)verify_signature/3for HMAC-SHA256 payload verificationHumaans.Resources.Webhookstruct (id, companyId, url, events, timestamps)Humaans.webhooks/0accessor's docstring now mentions both responsibilitiesThis branch was rebased onto current main; the merge resolution combined the new CRUD with the existing signature-verification module.
Addresses Group D1 (Webhooks) of the API coverage review.
Test plan
mix test— 19 tests in webhooks_test.exs pass (CRUD + verify_signature)mix credocleanmix format --check-formattedclean