Skip to content

feat: Implement generic BaseMessage functionality#394

Merged
Justus-at-Tazama merged 5 commits intodevfrom
feat-paysys-poc
May 9, 2026
Merged

feat: Implement generic BaseMessage functionality#394
Justus-at-Tazama merged 5 commits intodevfrom
feat-paysys-poc

Conversation

@ReebaPaysys
Copy link
Copy Markdown

@ReebaPaysys ReebaPaysys commented Apr 29, 2026

SPDX-License-Identifier: Apache-2.0

This pull request updates the handling of transaction messages to improve type safety and compatibility with new versions of the @tazama-lf/frms-coe-lib dependencies. The main changes involve updating dependency versions, generalizing transaction typing, and using new type guards to extract transaction IDs more robustly.

Dependency Updates:

  • Updated @tazama-lf/frms-coe-lib and @tazama-lf/frms-coe-startup-lib to new pre-release versions to ensure compatibility with recent changes in their APIs.

Type Handling Improvements:

  • Changed the transaction type from Pacs002 to the more general SupportedTransactionMessage in multiple places to support a wider range of transaction message types. [1] [2] [3]

Logic and Type Guard Enhancements:

  • Introduced and utilized new type guards (isBaseMessageTransaction, isPacs002Transaction) from the updated library to more accurately determine the structure of incoming transactions and extract the correct transaction ID field depending on the message type. [1] [2]

These changes collectively make the codebase more flexible and robust when dealing with different transaction message types and prepare it for future enhancements in the related libraries.

What did we change?

Why are we doing this?

How was it tested?

  • Locally
  • Development Environment
  • Not needed, changes very basic
  • Husky successfully run
  • Unit tests passing and Documentation done

Summary by CodeRabbit

  • Chores

    • Updated package dependencies to production-ready versions.
  • Improvements

    • Enhanced transaction message handling to support multiple transaction formats with improved message identifier extraction logic.

@ReebaPaysys ReebaPaysys requested review from a team as code owners April 29, 2026 10:06
@github-actions github-actions Bot added the bug label Apr 29, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

This PR updates two @tazama-lf package dependencies to new versions and refactors transaction handling in the logic service to support multiple transaction message types with conditional transaction identifier extraction.

Changes

Cohort / File(s) Summary
Dependency Updates
package.json
Updated frms-coe-lib and frms-coe-startup-lib dependency versions from *-rc.* to 0.0.1-psl.* releases.
Transaction Type Support
src/logic.service.ts
Changed transaction parameter type from Pacs002 to SupportedTransactionMessage in handleTransaction and evaluateTypologySendRequest methods. Refactored transaction ID extraction from hard-coded PACS002 path to guard-based conditional logic that handles both PACS002 (FIToFIPmtSts.GrpHdr.MsgId) and base message transactions (MsgId).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Many message types now hop through our gate,
No longer locked to PACS002's fate,
Conditional guards extract each ID with care,
While fresh dependencies float through the air!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The PR title 'feat: Implement generic BaseMessage functionality' accurately reflects the main change: generalizing transaction type handling from specific Pacs002 type to generic SupportedTransactionMessage.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-paysys-poc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 39-40: The package changes swap `@tazama-lf/frms-coe-lib` and
`@tazama-lf/frms-coe-startup-lib` from the rc track (7.0.2-rc.2 / 3.0.2-rc.2) to
experimental PSL pre-releases (0.0.1-psl.*); confirm these PSL pre-release
versions are acceptable by validating API compatibility and stability: review
change logs or diff between "@tazama-lf/frms-coe-lib" and
"@tazama-lf/frms-coe-startup-lib" versions, run full unit/integration/e2e tests
against the new packages, pin the dependency (or use a safe semver range) if
approved, or revert to the previous rc versions if breaking changes are found,
and add a short comment in package.json or the PR describing the chosen decision
and the validation performed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 66697f7a-40d0-48a7-ab6e-5aee26c717cc

📥 Commits

Reviewing files that changed from the base of the PR and between 1e16b5a and 9f1c8a8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json
  • src/logic.service.ts

Comment thread package.json Outdated
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

arif-paysyslabs
arif-paysyslabs previously approved these changes May 8, 2026
…ot target-branch

- src/logic.service.ts: if/if chain replaced with if/else if/else; let transactionId
  uninitialised to enforce TypeScript definite assignment; explicit loggerService.error
  and return on unrecognised transaction type; import moved to frms-coe-lib root export
- __tests__/unit/logic.service.test.ts: unsupported-type test added (35 -> 36 tests)
- package.json: eslint bumped from ^9.36.0 to ^9.39.4 (fixes unified-signatures crash)
- .github/dependabot.yml: target-branch set to dev

Closes #401
@Justus-at-Tazama Justus-at-Tazama changed the title fix: FRMS version feat: FRMS version May 9, 2026
@github-actions github-actions Bot added enhancement and removed bug labels May 9, 2026
@Justus-at-Tazama Justus-at-Tazama changed the title feat: FRMS version feat: Implement generic BaseMessage functionality May 9, 2026
@Justus-at-Tazama Justus-at-Tazama merged commit 634ec2b into dev May 9, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants