feat(compliance): add case management with rest - #281
Merged
Conversation
Add the compliance case lifecycle: open a case, list by status, read one, and the guarded claim, resolve and escalate transitions, exposed under /v1/compliance/cases with compliance read and write scopes and RFC 7807 errors. The service mirrors the KYC vertical (repository plus a hand mapper, transitions in one transaction through the domain guard). The shared conflict problem type is generalised since the domain exception is raised by both KYC and cases, and a bad status filter now returns 400 rather than 500. Closes #268
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.
E-04 Compliance #268 - the case-management vertical, mirroring the KYC vertical.
What
transitionToguard; repository + a pureComplianceCasePersistenceAdapter(value-class id<->UUID), same shape asKycServiceImpl./v1/compliance/cases): POST open (compliance:write, 201+Location), GET?status=(read, bounded - status required), GET /{id}, POST /{id}/claim|resolve|escalate (write). Thin; String path ->ComplianceCaseId.fromString; handCaseApiMapper.KYC_CONFLICT->COMPLIANCE_CONFLICT(the domain exception is shared by KYC + cases; same 409), addedCASE_NOT_FOUND(404) and aMethodArgumentTypeMismatchExceptionhandler so a bad?status=returns 400 (was 500).Decisions (umbrella drift documented)
Domain
CaseStatus(CLAIMED) wins over the OpenAPIIN_REVIEW; cursor pagination, decision/reason capture and alert/payment/kyc links are deferred follow-ups. Idempotency-Key on open is deferred (consistent with KYC #277).Gate chain
All local gates green (@WebMvcTest + @DataJpaTest slice-scoped; the KYC F-04.5b KYC REST + security + OpenAPI #275 tests stayed green after the rename).
Closes #268