Skip to content

refactor: remove code and files related to KAPSystem #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 21, 2025

Conversation

kshitij-k-osmosys
Copy link
Contributor

@kshitij-k-osmosys kshitij-k-osmosys commented Jul 20, 2025

API PR Checklist

Task Link

Osmosys Developers must include the Pinestem task link in the PR.

OSXT-348

Pre-requisites

  • I have gone through the Contributing guidelines for Submitting a Pull Request (PR) and ensured that this is not a duplicate PR.
  • I have performed unit testing for the new feature added or updated to ensure the new features added are working as expected.
  • I have added/updated test cases to the test suite as applicable.
  • I have performed preliminary testing using the test suite to ensure that any existing features are not impacted and any new features are working as expected as a whole.
  • I have added/updated the required api docs as applicable.
  • I have added/updated the .env.example file with the required values as applicable.

PR Details

PR details have been updated as per the given format (see below)

  • PR title adheres to the format specified in guidelines (e.g., feat: add admin login endpoint)
  • Description has been added
  • Related changes have been added (optional)
  • Screenshots have been added (optional)
  • Query request and response examples have been added (as applicable, in case added or updated)
  • Documentation changes have been listed (as applicable)
  • Test suite/unit testing output is added (as applicable)
  • Pending actions have been added (optional)
  • Any other additional notes have been added (optional)

Additional Information

  • Appropriate label(s) have been added (ready for review should be added if the PR is ready to be reviewed)
  • Assignee(s) and reviewer(s) have been added (optional)

Note: Reviewer should ensure that the checklist and description have been populated and followed correctly, and the PR should be merged only after resolving all conversations and verifying that CI checks pass.


Description:

Remove code related to KAPSystem. We no longer support SMS - KAPSystem.

Summary by CodeRabbit

  • Bug Fixes

    • Removed all support for the SMS - KAPSystem channel type across the application.
  • Documentation

    • Updated and removed documentation to reflect the discontinuation of SMS - KAPSystem support.
    • Updated API and usage guides to indicate SMS - KAPSystem is no longer available.
  • Chores

    • Deleted related environment variables, test cases, and Postman collection items for SMS - KAPSystem.
    • Cleaned up configuration and references to SMS - KAPSystem in user-facing and internal resources.

Copy link

coderabbitai bot commented Jul 20, 2025

Walkthrough

All code, configuration, documentation, and test artifacts related to the SMS KAPSYSTEM provider have been removed from the repository. This includes API consumer logic, provider modules and services, DTOs, environment variables, Postman collections, and all related documentation. The SMS_KAPSYSTEM channel type is now commented out or deleted wherever referenced.

Changes

File(s) / Path(s) Change Summary
.../OsmoX-API.postman_collection.json, .../OsmoX.postman_collection.json Removed all KAPS SMS provider and notification requests/examples from Postman collections.
.../OsmoX-API.postman_environment.json Deleted KAP SMS-related environment variables.
.../docs/api-documentation.md, .../docs/usage-guide.md Removed or updated all documentation and references to KAPS SMS/KAPSystem provider/channel.
.../docs/channels/sms-kapsystem.md Deleted KAPSystem SMS integration documentation file.
.../src/common/constants/notifications.ts, .../src/common/decorators/is-data-valid.decorator.ts Removed all code, constants, and validation logic related to SMS_KAPSYSTEM channel type.
.../src/jobs/consumers/notifications/smsKapsystem-notifications.job.consumer.ts Deleted the KAPSystem SMS notification consumer class.
.../src/modules/notifications/dtos/providers/smsKapsystem-data.dto.ts Deleted the KAPSystem SMS data transfer object (DTO) definition.
.../src/modules/notifications/notifications.module.ts Removed KAPSystem module and consumer from notification module configuration.
.../src/modules/notifications/queues/queue.service.ts Removed all queue handling logic and dependencies for SMS_KAPSYSTEM.
.../src/modules/providers/sms-kapsystem/sms-kapsystem.module.ts Deleted the KAPSystem provider module definition.
.../src/modules/providers/sms-kapsystem/sms-kapsystem.service.ts, ...service.spec.ts Deleted the KAPSystem SMS service implementation and its test spec.
.../src/common/constants/notification.ts Commented out SMS_KAPSYSTEM channel type and removed its mapping from ChannelTypeMap.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    participant KAPSystemService

    %% Previous flow (now removed)
    %% Client ->> API: Send SMS notification (channel: SMS_KAPSYSTEM)
    %% API ->> KAPSystemService: Validate & send SMS
    %% KAPSystemService ->> External KAPSystem API: HTTP Request
    %% KAPSystemService -->> API: Response
    %% API -->> Client: Delivery status

    %% Now: Flow for SMS_KAPSYSTEM is not available
    Client ->> API: Send SMS notification (channel: SMS_KAPSYSTEM)
    API -->> Client: Error (Channel not supported)
Loading

Estimated code review effort

  • apps/api/OsmoX-API.postman_collection.json, apps/api/OsmoX.postman_collection.json, apps/api/OsmoX-API.postman_environment.json: 1 (<30 minutes)
  • apps/api/docs/api-documentation.md, apps/api/docs/usage-guide.md, apps/api/docs/channels/sms-kapsystem.md: 1 (<30 minutes)
  • apps/api/src/common/constants/notifications.ts, apps/api/src/common/constants/notification.ts, apps/api/src/common/decorators/is-data-valid.decorator.ts: 2 (30–90 minutes)
  • apps/api/src/jobs/consumers/notifications/smsKapsystem-notifications.job.consumer.ts: 2 (30–90 minutes)
  • apps/api/src/modules/notifications/dtos/providers/smsKapsystem-data.dto.ts: 1 (<30 minutes)
  • apps/api/src/modules/notifications/notifications.module.ts: 2 (30–90 minutes)
  • apps/api/src/modules/notifications/queues/queue.service.ts: 2 (30–90 minutes)
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.module.ts: 2 (30–90 minutes)
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.service.ts, apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.service.spec.ts: 4 (240–360 minutes)

Possibly related PRs

Suggested reviewers

  • xixas

Poem

A hop, a skip, the KAPS is gone,
No more SMSes to carry on.
Docs and code, swept away,
The garden’s tidier today!
Channels pruned, the queue is clear—
A rabbit’s work brings change this year. 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41e34b4 and 2b32a2b.

⛔ Files ignored due to path filters (1)
  • apps/portal/src/assets/icons/kaps.png is excluded by !**/*.png
📒 Files selected for processing (17)
  • apps/api/OsmoX-API.postman_collection.json (0 hunks)
  • apps/api/OsmoX-API.postman_environment.json (0 hunks)
  • apps/api/OsmoX.postman_collection.json (0 hunks)
  • apps/api/docs/api-documentation.md (2 hunks)
  • apps/api/docs/api-test-cases.md (1 hunks)
  • apps/api/docs/channels/sms-kapsystem.md (0 hunks)
  • apps/api/docs/usage-guide.md (1 hunks)
  • apps/api/src/common/constants/notifications.ts (1 hunks)
  • apps/api/src/common/decorators/is-data-valid.decorator.ts (0 hunks)
  • apps/api/src/jobs/consumers/notifications/smsKapsystem-notifications.job.consumer.ts (0 hunks)
  • apps/api/src/modules/notifications/dtos/providers/smsKapsystem-data.dto.ts (0 hunks)
  • apps/api/src/modules/notifications/notifications.module.ts (0 hunks)
  • apps/api/src/modules/notifications/queues/queue.service.ts (0 hunks)
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.module.ts (0 hunks)
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.service.spec.ts (0 hunks)
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.service.ts (0 hunks)
  • apps/portal/src/common/constants/notification.ts (1 hunks)
💤 Files with no reviewable changes (12)
  • apps/api/OsmoX-API.postman_environment.json
  • apps/api/src/modules/notifications/queues/queue.service.ts
  • apps/api/src/modules/notifications/dtos/providers/smsKapsystem-data.dto.ts
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.module.ts
  • apps/api/OsmoX.postman_collection.json
  • apps/api/docs/channels/sms-kapsystem.md
  • apps/api/src/common/decorators/is-data-valid.decorator.ts
  • apps/api/src/modules/notifications/notifications.module.ts
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.service.spec.ts
  • apps/api/src/jobs/consumers/notifications/smsKapsystem-notifications.job.consumer.ts
  • apps/api/OsmoX-API.postman_collection.json
  • apps/api/src/modules/providers/sms-kapsystem/sms-kapsystem.service.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • apps/portal/src/common/constants/notification.ts
  • apps/api/docs/api-documentation.md
  • apps/api/docs/api-test-cases.md
  • apps/api/docs/usage-guide.md
  • apps/api/src/common/constants/notifications.ts
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kshitij-k-osmosys kshitij-k-osmosys changed the title refactor: remove kapsystem code refactor: remove code and files related to KAPSystem Jul 20, 2025
@osm-vishnukyatannawar osm-vishnukyatannawar force-pushed the refactor/remove-kapsystem-code branch from 41e34b4 to 2b32a2b Compare July 21, 2025 06:44
@osm-vishnukyatannawar osm-vishnukyatannawar merged commit d8dbffe into main Jul 21, 2025
6 checks passed
@osm-vishnukyatannawar osm-vishnukyatannawar deleted the refactor/remove-kapsystem-code branch July 21, 2025 06:46
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.

2 participants