Add shared Swagger DTOs, audit diff helper, activity feed mapper, evidence validation - #511
Merged
KuchiMercy merged 1 commit intoJul 28, 2026
Conversation
|
@benzeneCLI 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! 🚀 |
…dence validation Closes StayLitCodes#405, Closes StayLitCodes#413, Closes StayLitCodes#488, Closes StayLitCodes#489
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.
A lot of the ground for these four issues already exists (Swagger is already configured in
main.ts,AdminAuditLogServicealready hascreate/findAllwith filters+pagination, andanalytics.service.tsalready has summary/volume/users/disputes/top-users with in-memory TTL caching). This PR adds the narrower pieces that were still missing, each as its own new file:config::swagger-responses.dto: sharedErrorResponseDto/PaginationMetaDtoso controllers can reference one consistent@ApiResponseshape instead of each hand-rolling it. Decorating every controller/handler per the full acceptance criteria is a much larger follow-up.admin::audit-diff.helper:buildStateDiffcomputing a previousState/newState diff to embed in the existing audit logmetadatafield, plus the missing piece toward a per-escrow history endpoint.admin::analytics-activity.helper:toRecentActivityFeedmappingAdminAuditLogrows to the shape aGET /admin/analytics/activityroute needs — the one endpoint from the issue not already present alongside summary/volume/users/disputes/top-users.escrow::evidence-file-validation: size + MIME-type validators for evidence uploads, whichEvidenceFileMetadataDtocurrently doesn't enforce.Closes #405
Closes #413
Closes #488
Closes #489