Repository navigation
fix(routes): wrap marketplace plugin and dispute responses in envelopes - #1475
Closed
lienhoatienphung-svg wants to merge 1 commit into
Closed
lienhoatienphung-svg wants to merge 1 commit into
lienhoatienphung-svg wants to merge 1 commit into
Conversation
… standard envelopes (CalloraOrg#1249)
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.
Closes #1249
Summary
Updates
src/routes/marketplace/plugins.tsandsrc/routes/billing/disputes.tsso every JSON response is wrapped in the standardsuccessEnvelope/errorEnvelope(vianext(AppError)), updatesdocs/openapi.jsonto document/api/marketplace/pluginsand/api/billing/disputeswith standard envelope schemas, and expandssrc/contracts/responseEnvelope.contract.test.tsto verify both route families.Acceptance Criteria Mapping
GET /api/marketplace/pluginsandPOST /api/marketplace/plugins/:pluginId/installreturn{ success: true, data, requestId, timestamp }on success and{ success: false, error, requestId, timestamp }on failure: Implemented usingsuccessEnvelopeand typedAppErrorsubclasses (NotFoundError,ConflictError).POST /api/billing/disputesandGET /api/billing/disputes/:idreturn the standard envelope on all status codes: Implemented usingsuccessEnvelopeandBadRequestError/NotFoundError/ConflictError.src/contracts/responseEnvelope.contract.test.tsincludes both route families and passes: Added contract assertions covering both success and error envelopes.Validation
npx jest src/contracts/responseEnvelope.contract.test.ts src/routes/marketplace/plugins.test.ts src/routes/billing/disputes.test.ts --no-cache(all pass).Payout Wallet (Base Mainnet USDC / EVM):
0x3806cd592a508d1992Ed007C2F53de251C2E7452