Skip to content

Feat/webhook receiver endpoint#210

Merged
Jagadeeshftw merged 3 commits into
Fluxora-Org:mainfrom
Keengfk:feat/webhook-receiver-endpoint
Apr 26, 2026
Merged

Feat/webhook receiver endpoint#210
Jagadeeshftw merged 3 commits into
Fluxora-Org:mainfrom
Keengfk:feat/webhook-receiver-endpoint

Conversation

@Keengfk
Copy link
Copy Markdown
Contributor

@Keengfk Keengfk commented Apr 26, 2026

i Added POST /internal/webhooks/receive — an endpoint that accepts an inbound webhook, verifies the
HMAC-SHA256 signature against FLUXORA_WEBHOOK_SECRET, enforces the full verification contract (missing
headers → 401, stale timestamp → 401, bad signature → 401, duplicate delivery id → 409, oversized body →
413), then echoes the parsed event back on success. Also wired the router into app.ts, added
registerDeliveryId to the store/service for dedup tracking, fixed pre-existing TypeScript errors in the
route file, and wrote 8 tests covering every failure mode.

closes #129

Keengfk added 3 commits April 26, 2026 09:37
- Fix OUT_OF_RANGE check to use int64 max (9223372036854775807) and
  extract integer part before BigInt comparison (old code stripped the
  decimal point, giving wrong magnitude)
- Add normalizeDecimalString helper to strip trailing fractional zeros
- validateDecimalString returns normalized value
- serializeToDecimalString normalizes string pass-through via result.value
- decimalStringField in schemas.ts applies .transform(normalizeDecimalString)
- Tests: new normalizeDecimalString suite, int64 boundary cases, trailing-zero
  normalization round-trips
- Mount webhooksRouter in app.ts under /internal/webhooks
- Add POST /internal/webhooks/receive: reads raw body, verifies HMAC
  signature via verifyWebhookSignature, registers delivery id for
  dedup, echoes parsed event back on success
- Add registerDeliveryId to WebhookDeliveryStore and WebhookService
- Fix pre-existing TS errors in webhooks.ts (TS7030, TS2379)
- Tests: 8 cases covering valid delivery, missing headers, stale
  timestamp, signature mismatch, duplicate delivery, oversized payload
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

@Keengfk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Jagadeeshftw Jagadeeshftw merged commit a78536b into Fluxora-Org:main Apr 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement webhook receiver endpoint for internal verification testing

2 participants