feat(backend): add POST /api/meters/batch accepting array of {meter_id, owner} pairs#501
Open
adamsithr wants to merge 2 commits into
Open
feat(backend): add POST /api/meters/batch accepting array of {meter_id, owner} pairs#501adamsithr wants to merge 2 commits into
adamsithr wants to merge 2 commits into
Conversation
…, and MQTT deactivation
Author
|
Hi there! 👋 Just a gentle ping on this PR. Let me know if there's any feedback or if anything else is needed from my end to get this reviewed so we can close out the bounty. Thanks! |
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
This PR implements a consolidated set of backend features and fixes, resolving multiple open issues in the Stellar Wave Program:
POST /api/meters/batchto register multiple meters at once (Closes feat(backend): add POST /api/meters/batch-register accepting array of {meter_id, owner} pairs #445).GET /api/meters/inactivelisting dormant meters with their last active timestamp queried from the local SQLite database (Closes feat(backend): add GET /api/meters/inactive returning meters where active=false with last_used timestamp #446).GET /api/webhooksendpoint returning all registered low-balance webhook URLs (Closes feat(backend): add GET /api/webhooks endpoint listing all registered low-balance webhook URLs #444).requestContext.tswithrequestLoggermiddleware to run the request lifecycle under AsyncLocalStorage and set/propagate theX-Request-IDheader on all responses (Closes feat(backend): propagate X-Request-ID header on all responses using requestContext.ts #443).OFFcontrol message when a meter is deactivated viaPOST /api/meters/:id/deactivateto bypass Soroban contract polling latency (Closes feat(backend): emit MQTT message when a meter is deactivated via POST /api/meters/:id/deactivate #442).Changes
backend/src/routes/meters.tsandbackend/src/routes/webhooks.ts.backend/src/middleware/requestLogger.ts.backend/tests/meters-inactive.test.tsbackend/tests/webhooks.test.tsbackend/tests/request-id.test.tsbackend/tests/meters-deactivate.test.tsAll tests are passing successfully locally. Ready for review!