Skip to content

docs: align webhook events documentation, OpenAPI spec, and registry … - #142

Open
OmniZlatoon wants to merge 1 commit into
SmartDropLabs:mainfrom
OmniZlatoon:webhook-events
Open

docs: align webhook events documentation, OpenAPI spec, and registry …#142
OmniZlatoon wants to merge 1 commit into
SmartDropLabs:mainfrom
OmniZlatoon:webhook-events

Conversation

@OmniZlatoon

@OmniZlatoon OmniZlatoon commented Aug 21, 2026

Copy link
Copy Markdown

Webhook Events Alignment Walkthrough

We have successfully clarified the status of non-implemented webhook events across the codebase, README.md, and openapi.yaml.

Changes Made
1. Webhook Registry (src/services/webhookEvents.js)
Kept POOL_EVENTS registered to avoid breaking existing clients or test cases.
Added a clear comment matching the pattern of AIRDROP_EVENTS, clarifying that none of these events are currently dispatched since the indexer only processes airdrop lifecycle events.

2. User Documentation (README.md)
Marked all pool.* events in the Supported Event Types table as Planned (not yet implemented).
Updated the Webhook Delivery System setup section to clearly mark airdrop.failed as active and other airdrop events as planned/unimplemented.
Modified the worked example POST /api/v1/webhooks payload to use the active airdrop.failed and price.alert events.
Added a prominent caveat warning under the #### Test endpoint section, explaining that a successful test delivery (which uses a synthetic pool.assets_locked payload) does not imply that the event type will ever fire for real in production.

3. API Specification (openapi.yaml)
Corrected the /api/v1/webhooks/{id}/test description and payload schema to match the actual implementation (sends pool.assets_locked rather than ping).
Added a warning note to the test endpoint description explaining the synthetic nature of the payload and that pool events are not yet implemented.
Added pool.* and price.alert events to the WebhookEvent schema enum to be fully exhaustive.
Categorized all enum values in WebhookEvent's description into "Active / implemented" and "Planned / not yet implemented".

Updated all /api/v1/webhooks endpoint request/response examples to use active/implemented events.
Verification Results
Automated Jest Tests
We executed the full Jest test suite containing 370 tests:

bash
npm test
All tests passed successfully, confirming zero regressions:

PASS test/leaderElection.test.js
PASS test/alerts.test.js
PASS test/priceOracle.test.js
PASS test/coinmarketcap.test.js
PASS test/airdrops-service.test.js
PASS test/webhookDispatcher.test.js
PASS test/webhookSignature.test.js
PASS test/auth.test.js
PASS test/eventPoller.test.js
PASS test/prices.test.js
PASS test/indexerParser.test.js
PASS test/airdropExpiry.test.js
PASS test/webhooks.routes.test.js
PASS test/api-docs.test.js
PASS test/cors.test.js
PASS test/resilience.test.js
PASS test/errorHandler.test.js
PASS test/paginationContract.test.js
PASS test/airdrops.test.js
PASS test/priceWebSocket.test.js
PASS test/apiRateLimit.test.js
PASS test/rateLimit.test.js
PASS test/coingecko.test.js
PASS test/stellarDex.test.js
PASS test/circuitBreaker.test.js
PASS test/priceOracleCircuit.test.js
PASS test/cacheWarm.test.js
PASS test/indexerRoutes.test.js
PASS test/webhooks.test.js
PASS test/pagination.test.js
PASS test/indexerStore.test.js
PASS test/webhookEvents.test.js
PASS test/webhookRepository.test.js
PASS test/deliveryRepository.test.js
PASS test/config.test.js
PASS test/alerts-routes.test.js
PASS test/validate.test.js
PASS test/requestId.test.js
PASS test/health.test.js
Test Suites: 39 passed, 39 total
Tests: 370 passed, 370 total
Snapshots: 0 total
Time: 6.679 s
Ran all test suites.

closes #127

@OmniZlatoon

Copy link
Copy Markdown
Author

Good morning sir , please review PR on the changes that were being made and if any further changes, please do let me know

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.

README-documented pool.* webhook events are never dispatched anywhere in the codebase — subscriptions are permanently, silently dead

1 participant