Skip to content

feat: compliance call queue endpoints#3630

Merged
bernd2022 merged 1 commit intodevelopfrom
feature/compliance-call-queues
Apr 27, 2026
Merged

feat: compliance call queue endpoints#3630
bernd2022 merged 1 commit intodevelopfrom
feature/compliance-call-queues

Conversation

@bernd2022
Copy link
Copy Markdown
Collaborator

@bernd2022 bernd2022 commented Apr 27, 2026

Summary

  • Adds 3 new support/call-queues* endpoints (counts, clerks, items per queue), guarded by COMPLIANCE role
  • New BuyCryptoService.{get,count}ByAmlReason, BuyFiatService.{get,count}ByAmlReason, UserDataService.{get,count}ByPhoneCallStatuses — all use find() with loadEagerRelations: false, consistent with the pending-review refactor in feat: compliance pending reviews endpoint #3599
  • Registers complianceClerks string[] setting; extends UserDataComplianceUpdateCols with phoneCallStatus and the four phoneCall*CheckDate fields
  • Drops redundant name field from BankDataService.getPendingReviewSummary return type (unused after feat: compliance pending reviews endpoint #3599)
  • ParseEnumPipe on the queue path-param to fail fast on invalid values

Test plan

  • npm run build && npm run lint clean
  • GET /v1/support/call-queues returns counts for the five queues
  • GET /v1/support/call-queues/clerks returns clerks from setting:complianceClerks (fallback empty)
  • GET /v1/support/call-queues/ManualCheckPhone/items returns at most 200 items, sorted by date asc
  • GET /v1/support/call-queues/UnavailableSuspicious/items returns userData with phoneCallStatus in (Unavailable, Suspicious)
  • GET /v1/support/call-queues/foo/items returns 400 (ParseEnumPipe)
  • Setting phoneCall*CheckDate via existing admin userData PUT works (whitelist now includes them)

Depends on

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
@bernd2022 bernd2022 requested a review from davidleomay April 27, 2026 10:30
@bernd2022 bernd2022 marked this pull request as ready for review April 27, 2026 17:22
@bernd2022 bernd2022 requested a review from TaprootFreak as a code owner April 27, 2026 17:22
@bernd2022 bernd2022 merged commit f0f378a into develop Apr 27, 2026
7 checks passed
@bernd2022 bernd2022 deleted the feature/compliance-call-queues branch April 27, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants