feat: compliance pending reviews endpoint#3599
Merged
Conversation
Adds /support/pending-reviews and /support/pending-reviews/items endpoints aggregating all kyc_step and bank_data entries in ManualReview or InternalReview, grouped by type and name. Replaces the external NutzerMonitoring Google Sheet for manual compliance tasks.
davidleomay
reviewed
Apr 24, 2026
davidleomay
approved these changes
Apr 27, 2026
7 tasks
bernd2022
added a commit
that referenced
this pull request
Apr 27, 2026
Add backend support for the new compliance call-queue feature, exposing five queues based on AML pending transactions and unavailable/suspicious phone-call userData. Endpoints (all guarded by COMPLIANCE role): - GET support/call-queues — counts per queue - GET support/call-queues/clerks — clerk list from setting - GET support/call-queues/:queue/items — items per queue (limit 200) Service layer: - BuyCryptoService.getByAmlReason / countByAmlReason - BuyFiatService.getByAmlReason / countByAmlReason - UserDataService.getByPhoneCallStatuses / countByPhoneCallStatuses All use find() with loadEagerRelations:false (consistent with the pending-review query refactor in #3599). Misc: - Register complianceClerks string[] setting - Extend UserDataComplianceUpdateCols with phoneCallStatus and the four phoneCall*CheckDate fields, so they can be set via the existing admin update endpoint - Resolve usedRef -> refUserName in bulk in UserSupportInfo (one extra query, no N+1) - Drop redundant 'name' field from BankDataService.getPendingReviewSummary return type (unused after #3599) - ParseEnumPipe on the queue param to fail-fast on invalid values
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 /support/pending-reviewsreturning a summary of allkyc_stepandbank_dataentries inManualRevieworInternalReview, grouped by type and name with per-status counts.GET /support/pending-reviews/items?type=&name=&status=returning the affected users for a given review category.pending-onboardingsendpoint (Compliance role required).getPendingOnboardingsinto a reusable helper to avoid drift.Context
Today the compliance team relies on an external Google Sheet (
NutzerMonitoring) to see pending manual checks. The new endpoints expose the same data from the internal database, enabling the services frontend to render aPending Reviewssection on the compliance landing page (see companion PR in the services repo).The implementation covers a superset of the Google Sheet scope — in addition to all explicitly tracked step types, it includes
NameChange,AddressChange,PhoneChange, and any otherKycStepNamethat happens to be inManualReview/InternalReview.Test plan
/support/pending-reviewsreturns one entry per(type, name)withmanualReviewandinternalReviewcounts matching the DB./support/pending-reviews/items?type=KycStep&name=Ident&status=ManualReviewreturns the expected users./support/pending-reviews/items?type=BankData&status=ManualReviewreturns the expected bank data entries./support/pending-onboardingsendpoint is unaffected.