Skip to content

feat: webhook service frature implemented#139

Merged
phertyameen merged 2 commits into
bridgelet-org:mainfrom
feyishola:feat/WebhooksService
Jun 20, 2026
Merged

feat: webhook service frature implemented#139
phertyameen merged 2 commits into
bridgelet-org:mainfrom
feyishola:feat/WebhooksService

Conversation

@feyishola

@feyishola feyishola commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

closes #102


What Was Built

New Files — src/modules/webhooks/

File Purpose
entities/webhook.entity.ts TypeORM entity matching the existing migration schema (id, url, secret, events, isActive, lastTriggeredAt)
dto/create-webhook.dto.ts Validated input DTO for POST /webhooks
dto/webhook-response.dto.ts Response shape — deliberately excludes the secret field
webhooks.service.ts Core service: create, findAll, triggerEvent, HMAC signing, delivery with logging
webhooks.controller.ts GET /webhooks + POST /webhooks, JWT-guarded
webhooks.module.ts Module that exports WebhooksService for use by other modules
webhooks.service.spec.ts 13 unit tests covering all acceptance criteria

Modified Files

File Changes
claim-redemption.provider.ts Removed all TEMPORARY: markers; restored sweep.completed and sweep.failed triggers
claims.module.ts Added SweepsModule + WebhooksModule imports (was missing both)
accounts.service.ts Injected WebhooksService; fires account.created after Stellar account creation succeeds
accounts.module.ts Added WebhooksModule
scheduler.service.ts Injected WebhooksService; fires account.expired after marking an account expired
scheduler.module.ts Added WebhooksModule
app.module.ts Uncommented ClaimsModule and WebhooksModule
claim-redemption.provider.spec.ts + scheduler.service.spec.ts Added WebhooksService mocks

Result

380 tests pass
Build compiles
Zero TEMPORARY: comments remain

@phertyameen phertyameen changed the title webhook service frature implemented feat: webhook service frature implemented Jun 20, 2026

@phertyameen phertyameen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great implementation. Thanks for your contribution.

@phertyameen phertyameen merged commit 77b3473 into bridgelet-org:main Jun 20, 2026
2 checks passed
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 WebhooksService and restore commented-out webhook triggers

2 participants