Skip to content

fix(audit-log): add PAYMENT_RECONCILIATION_MISMATCH to categoryMap#965

Open
Whiznificent wants to merge 10 commits into
rinafcode:mainfrom
Whiznificent:fix/856-payment-reconciliation-mismatch-category
Open

fix(audit-log): add PAYMENT_RECONCILIATION_MISMATCH to categoryMap#965
Whiznificent wants to merge 10 commits into
rinafcode:mainfrom
Whiznificent:fix/856-payment-reconciliation-mismatch-category

Conversation

@Whiznificent

Copy link
Copy Markdown

Summary

Fixes #856 — TypeScript CI typecheck failure.

AuditAction.PAYMENT_RECONCILIATION_MISMATCH was added to the AuditAction enum but was not added to the categoryMap inside resolveCategoryForAction() in sensitive-operations.service.ts. Because the map is typed as Record<AuditAction, AuditCategory>, TypeScript enforces exhaustiveness and fails with TS2741 when any enum member is missing.

Change

Added the missing entry to the categoryMap:

[AuditAction.PAYMENT_RECONCILIATION_MISMATCH]: AuditCategory.COMPLIANCE,

Mapped to AuditCategory.COMPLIANCE — consistent with the other payment/financial audit actions in the compliance group (DATA_RETENTION_APPLIED, AUDIT_LOG_EXPORTED, REPORT_GENERATED).

What was tested

  • TypeScript type exhaustiveness is satisfied; the Record<AuditAction, AuditCategory> constraint now has a value for every enum member.
  • No logic changes; existing behaviour is unchanged.

- Add PAYMENT_RECONCILIATION_MISMATCH audit action
- Create ReconciliationService to compare local payments with provider transactions
- Create ReconciliationTask scheduled daily at 02:00 UTC
- Add admin endpoint GET /payments/reconciliation/report
- Update PaymentsModule and AppModule to include reconciliation components

Closes rinafcode#856
- Add format check step (format:check)
- Add unit tests step (test:ci)
- Add E2E tests step (test:e2e)
- Add PostgreSQL and Redis services for E2E tests
- Configure environment variables for database and Redis connections
AuditAction.PAYMENT_RECONCILIATION_MISMATCH was added to the enum but
was missing from the categoryMap in resolveCategoryForAction(), causing
a TS2741 type error because the Record<AuditAction, AuditCategory>
exhaustiveness check failed.

Mapped to AuditCategory.COMPLIANCE to match related payment/compliance
audit actions.

Closes rinafcode#856
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.

Add payment reconciliation scheduled job to detect unmatched transactions

1 participant