Feat/be self service#406
Merged
Cedarich merged 2 commits intoPulsefy:mainfrom Apr 29, 2026
Merged
Conversation
|
@zhero-o 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! π |
Implements the Developer Self-Service API providing five endpoints under /developer that enable developers to test webhook receivers, bulk-revoke or emergency-rotate API keys, and get a per-org integration health score. - GET /developer/ping β connectivity check, no auth required - POST /developer/webhooks/:webhookId/test β sends a signed synthetic payment.received event to the webhook URL; returns latency and HTTP status - POST /developer/keys/bulk-revoke β revokes up to 100 keys via Promise.allSettled; partial failures reported per-key - POST /developer/keys/:id/emergency-rotate β rotates a key and clears key_hash_old immediately (no 24-hour grace window) - GET /developer/health?owner_id= β composite 0β100 health score (AβF grade) derived from webhook failure rate (60 pts) and quota utilisation (40 pts); all calls audited via AuditService Supporting changes: - ApiKeysRepository.emergencyUpdateKey() clears key_hash_old on update - ApiKeysService.emergencyRotate() delegates to the new repo method - DeveloperModule registered inside the existing !isLocalSupabase block - Swagger tag "developer" added to main.ts DocumentBuilder - 18 unit tests covering all service methods and edge cases
4bf47bb to
c4b7db4
Compare
Cedarich
approved these changes
Apr 29, 2026
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.
Summary
GET /developer/pingfor connectivity checksPOST /developer/webhooks/:webhookId/testto send a test event to a webhook receiverPOST /developer/keys/bulk-revokefor bulk key revocation (up to 100 keys)POST /developer/keys/:id/emergency-rotatefor instant key rotation with no grace periodGET /developer/health?owner_id=for a per-org integration health score (0β100, AβF grade)AuditServiceTest plan
GET /developer/pingreturns{ status: "ok" }POST /developer/webhooks/:id/testreturnssuccess: truefor a reachable receiverPOST /developer/keys/bulk-revokerevokes listed keys; partial failures reported per-keyPOST /developer/keys/:id/emergency-rotateissues a new key; old key rejected immediatelyGET /developer/health?owner_id=<id>returns score and gradenpm run test:unit)Closes #396