348 Commits

Author SHA1 Message Date
NTumurbars
1dafa7334a
Merge pull request #20 from NTumurbars/SIM_Tema
Merged Tema's sim changes to the main
2025-12-01 10:22:31 +09:00
NTumurbars
1d4891ad85
Merge branch 'main' into SIM_Tema 2025-12-01 10:22:14 +09:00
barsa
c397eb51c7 Update Dockerfile and SimDetailsCard component for compatibility and enhancements
- Updated Prisma client generation command in Dockerfile to use version 6.14.0 for consistency.
- Refactored SimDetailsCard component to improve type handling and UI elements, including re-exporting SimDetails for backwards compatibility.
- Adjusted display logic for SIM details, including changes to how plan types and service dates are presented.
- Enhanced button states in SimManagementSection for better clarity on invoice payment status.
- Added reissueEsim method in sim-actions.service for handling eSIM reissue requests.
- Introduced CatalogPriceInfo type in domain catalog for improved type definitions.
2025-12-01 10:07:58 +09:00
tema
996e3c574e Refactor duration parsing in SimCallHistoryService for improved accuracy
- Updated duration parsing logic to handle MMSST format (minutes, seconds, tenths) more effectively.
- Ensured proper handling of duration strings by padding and extracting minutes and seconds accurately.
2025-11-29 18:27:58 +09:00
tema
e02ff17217 Implement call and SMS history features in SIM management
- Added endpoints for fetching domestic and international call history, as well as SMS history.
- Introduced methods to retrieve available months for call/SMS history.
- Updated the SubscriptionsController to include new routes for call history management.
- Enhanced the SimManagementSection UI to navigate to call history.
- Improved the sim-actions service to handle call/SMS history requests and responses.
2025-11-29 18:27:58 +09:00
tema
f49e5d7574 Enhance SIM management features and introduce new cancellation and plan change flows
- Added new models and request types for enhanced SIM cancellation and plan change functionalities.
- Implemented full cancellation flow with email notifications and confirmation handling.
- Introduced enhanced plan change request with Salesforce product mapping and scheduling.
- Updated UI components for better user experience during SIM management actions.
- Improved error handling and validation for cancellation and plan change requests.
2025-11-29 18:27:58 +09:00
barsa
9fb54fd0fc Refactor authentication forms and views for improved user experience
- Updated LinkWhmcsForm to streamline account migration with enhanced error handling and loading states.
- Refined SetPasswordForm to include password strength validation and improved user feedback on password matching.
- Removed deprecated SignupForm steps and consolidated form logic for better maintainability.
- Enhanced LinkWhmcsView and SignupView for clearer messaging and improved layout.
- Introduced new constants for migration transfer items and steps to standardize messaging across components.
2025-11-26 18:32:24 +09:00
NTumurbars
a98740104f
Merge pull request #19 from NTumurbars/SIM_Tema
Sim tema
2025-11-26 17:06:50 +09:00
barsa
f6659e363a Enhance FreebitOperationsService to improve entry cleanup and error handling
- Updated logic to prevent cleanup of entries with a cancellation, ensuring proper handling of account states.
- Enhanced error handling to fail fast on non-404 errors, optimizing resource usage during API requests.
- Improved comments for clarity on the cleanup process and error handling behavior.
2025-11-26 17:03:31 +09:00
barsa
e228f9342f Implement stale entry cleanup in FreebitOperationsService to prevent memory leaks
- Added a method to periodically clean up stale operation timestamps, ensuring efficient memory usage.
- Introduced rate limiting for cleanup operations to minimize performance overhead.
- Enhanced the getOperationWindow method to invoke cleanup, maintaining optimal state of operation timestamps.
- Included validation to ensure at least one feature is specified during updates, improving error handling.
2025-11-26 16:58:49 +09:00
barsa
b7f6c204e2 Refactor FreebitOperationsService to enforce API constraints on voice features and network type changes
- Updated logic to prevent simultaneous updates of voice features and network type, ensuring compliance with Freebit API requirements.
- Introduced error handling to guide users on proper sequencing of operations using SimManagementQueueService.
- Improved code clarity by removing outdated comments and consolidating operation handling.
2025-11-26 16:51:54 +09:00
NTumurbars
f10eccc0cf
Merge pull request #18 from NTumurbars/ver2
Merge pull request #17 from NTumurbars/main
2025-11-26 16:43:28 +09:00
barsa
c7230f391a Refactor global exception handling and support case management
- Replaced multiple global exception filters with a unified exception filter to streamline error handling across the application.
- Removed deprecated AuthErrorFilter and GlobalExceptionFilter to reduce redundancy.
- Enhanced SupportController to include new endpoints for listing, retrieving, and creating support cases, improving the support case management functionality.
- Integrated SalesforceCaseService for better interaction with Salesforce data in support case operations.
- Updated support case schemas to align with new requirements and ensure data consistency.
2025-11-26 16:36:06 +09:00
NTumurbars
a45362c6f1
Merge pull request #17 from NTumurbars/main
Add endpoint not found error mapping to SecureErrorMapperService
2025-11-25 18:33:00 +09:00
barsa
46c2896935 Add endpoint not found error mapping to SecureErrorMapperService
- Introduced a new error mapping for "ENDPOINT_NOT_FOUND" with a corresponding code and public message to enhance error handling.
- Added a routing pattern to map HTTP method errors to the same "ENDPOINT_NOT_FOUND" code and message for consistent user feedback.
2025-11-25 18:31:25 +09:00
tema
bccfec940f Enhance SIM Management Section with new features and improved UI
- Integrated subscription and invoice fetching to display relevant billing information.
- Added data usage tracking and visual representation for better user insights.
- Introduced new action buttons for data top-up, plan changes, and SIM reissue.
- Improved error handling and loading states for a smoother user experience.
- Updated layout and styling for better responsiveness and clarity.
2025-11-22 18:23:52 +09:00
tema
5ad4089d4e Enhance SIM management features and improve UI responsiveness
- Introduced SimVoiceOptions model to manage voice-related settings for accounts.
- Added debug methods in SimDetailsService and SimOrchestratorService to fetch SIM details directly from Freebit, bypassing subscription validation for troubleshooting.
- Updated SimManagementSection and SubscriptionDetail components for improved UI with backdrop blur effects and enhanced layout.
- Integrated AuroraBackground component for a visually appealing background in SubscriptionDetail, enhancing user experience.
2025-11-22 18:11:43 +09:00
tema
9f9a1897ee Refactor SimManagementSection for improved structure and user experience
- Consolidated SIM details and actions into a more organized layout, enhancing readability and usability.
- Removed unnecessary usage data handling, focusing on essential SIM details.
- Updated loading and error states for better user feedback during data fetching.
- Introduced new components for SIM actions and feature toggles, streamlining the management interface.
2025-11-21 18:47:45 +09:00
tema
9c796f59da Enhance Freebit integration and improve error handling
- Added FreebitMapperService to facilitate account normalization and improve code organization.
- Updated FreebitAuthService to streamline error handling and response parsing, replacing custom exceptions with standard error messages.
- Enhanced FreebitClientService to ensure proper URL construction and improved logging for API errors.
- Refactored FreebitOperationsService to include new request types and validation, ensuring better handling of SIM operations.
- Updated FreebitOrchestratorService to utilize the new mapper for account normalization across various methods.
- Improved SIM management features in the portal, including better handling of SIM details and usage information.
- Refactored components to enhance user experience and maintainability, including updates to the ChangePlanModal and SimActions components.
2025-11-21 18:41:14 +09:00
TemuulenAnkh
c8bd3a73d7 feat: Introduce new project management, deployment, and utility scripts. 2025-11-21 17:14:26 +09:00
tema
675f7d5cfd Remove cached profile fields migration and update CSRF middleware for new public auth endpoints
- Deleted migration file that removed cached profile fields from the users table, centralizing profile data retrieval from WHMCS.
- Updated CsrfMiddleware to include new public authentication endpoints for password reset, setting password, and WHMCS account linking.
- Enhanced error handling in password and WHMCS linking workflows to provide clearer feedback on missing mappings and improve user experience.
- Adjusted user creation and update methods in UsersFacade to handle cases where WHMCS mappings are not yet available, ensuring smoother account setup.
2025-11-21 17:12:34 +09:00
barsa
c497eae763 Enhance catalog caching and pricing utilities
- Introduced a new interface, LegacyCatalogCachePayload, to improve cache handling in CatalogCacheService, allowing for better normalization of cached values.
- Updated the getDisplayPrice function to utilize a centralized price formatting utility, getCatalogProductPriceDisplay, for consistent price rendering across the application.
- Refactored order preparation logic in useCheckout to leverage a new domain helper, prepareOrderFromCart, streamlining SKU extraction and payload formatting.
- Added CatalogPriceInfo interface to standardize pricing display information across the frontend and backend.
2025-11-21 15:59:14 +09:00
barsa
833ff24645 Update README.md to include coding standards
- Added a new section outlining the coding standards for the codebase, emphasizing the importance of types, validation, and separation of business logic from the frontend.
- Included guidelines for reusing existing types and following established folder structures to enhance maintainability and consistency across the project.
2025-11-19 18:25:03 +09:00
barsa
63acaef8cd Update pnpm-lock.yaml and package.json to include '@nestjs/common' dependency
- Added '@nestjs/common' version 11.1.6 to both pnpm-lock.yaml and package.json for the validation package.
- Removed duplicate entry of '@nestjs/common' from devDependencies in pnpm-lock.yaml to streamline dependency management.
2025-11-19 18:17:22 +09:00
barsa
dfaa1c93a8 Update dependencies in pnpm-lock.yaml and package.json for validation and tsconfig-paths
- Added '@customer-portal/validation' and 'tsconfig-paths' to the dependencies in the BFF package.json.
- Updated pnpm-lock.yaml to include new dependencies for '@customer-portal/validation', 'tsconfig-paths', and 'nestjs-zod'.
- Removed 'tsconfig-paths' from the BFF package.json to avoid duplication, ensuring a cleaner dependency management.
2025-11-19 18:06:19 +09:00
barsa
c2e9c15dab Refactor project structure and enhance documentation
- Removed the logging package from pnpm-lock.yaml to streamline dependencies.
- Updated README.md to reflect changes in the backend architecture, including new integrations and improved service descriptions.
- Enhanced Dockerfile configurations for both backend and frontend applications to ensure proper TypeScript compilation.
- Introduced Suspense boundaries in LoginView and ServiceManagementSection components for better loading states.
- Updated documentation paths in README.md to point to the new architecture directory for improved navigation.
- Improved environment variable setup instructions for clarity and completeness.
2025-11-19 17:14:36 +09:00
barsa
cdfad9d036 Enhance caching infrastructure and improve SIM management features
- Updated CacheModule and CacheService with detailed documentation and new methods for better cache management, including pattern deletion and memory usage tracking.
- Refactored CatalogCacheService and OrdersCacheService to utilize CDC-driven cache invalidation, improving data freshness and reducing unnecessary API calls.
- Introduced SIM plan options and updated related components to leverage new domain utilities for better plan management and user experience.
- Enhanced error handling and validation in TopUpModal for improved user feedback during SIM top-up operations.
- Removed obsolete plan formatting utilities to streamline codebase and improve maintainability.
2025-11-18 18:18:25 +09:00
barsa
44fd16e89f Add Salesforce integration to SIM management module
- Included SalesforceModule in the imports of sim-management.module.ts to enhance integration capabilities with Salesforce services.
- This addition supports improved data handling and service interactions within the SIM management context.
2025-11-18 15:56:15 +09:00
barsa
4d45eca503 Fix memory usage command in CacheService and add support directory to package.json
- Updated the memory command in CacheService from "usage" to "USAGE" for consistency with Redis commands.
- Added support directory paths to package.json to enhance module resolution for the support features.
2025-11-18 15:20:52 +09:00
barsa
8b78d890e4 Add support directory to TypeScript configuration
- Included "support/**/*" in the tsconfig.json paths to ensure TypeScript recognizes and compiles files within the support directory, enhancing module integration and project structure.
2025-11-18 14:41:44 +09:00
barsa
8c89109213 Update worktree setup and enhance BFF with SupportModule integration
- Changed worktree setup command from npm to pnpm for improved package management.
- Added SupportModule to app.module.ts and router.config.ts for better support case handling.
- Refactored OrderEventsService to utilize OrderUpdateEventPayload for improved type safety.
- Updated InvoicesList component to use INVOICE_STATUS for status filtering and improved type definitions.
- Enhanced SimActions and SimDetailsCard components to utilize SimStatus for better state management.
- Refactored Subscription components to leverage new utility functions for status handling and billing cycle labels.
- Improved SupportCasesView with better state management and error handling.
- Updated API query keys to include support cases for better data retrieval.
2025-11-18 14:06:27 +09:00
barsa
1220f219e4 Add SIM top-up pricing endpoints and integrate pricing service into subscriptions module
- Introduced new endpoints in SubscriptionsController for retrieving SIM top-up pricing and previewing pricing based on quota.
- Integrated SimTopUpPricingService into the subscriptions module to handle pricing logic.
- Updated TopUpModal component to utilize the new pricing service for dynamic cost calculations and validation.
- Enhanced error handling and user feedback in the TopUpModal for improved user experience during data top-up operations.
- Refactored order display utilities to support new pricing structures and ensure consistent presentation across the application.
2025-11-18 11:14:05 +09:00
barsa
6d327d3ede Refactor CacheService and MappingCacheService for improved performance and functionality
- Enhanced CacheService by implementing a more efficient pattern deletion method using a pipeline for batch processing.
- Added new methods in CacheService to count keys and calculate memory usage by pattern, improving cache management capabilities.
- Updated MappingCacheService to asynchronously retrieve cache statistics, ensuring accurate reporting of total keys and memory usage.
- Refactored existing methods for better readability and maintainability, including the introduction of a private scanPattern method for key scanning.
2025-11-18 11:03:25 +09:00
barsa
c741ece844 Add SIM management features and enhance checkout process
- Introduced new SIM management queue and processor to handle SIM-related tasks efficiently.
- Added SIM activation fee handling in the checkout service, ensuring proper validation and inclusion in cart calculations.
- Enhanced the SimCatalogService to retrieve and filter activation fees based on SKU, improving order validation.
- Updated the checkout process to automatically add default activation fees when none are specified, improving user experience.
- Refactored the ActivationForm component to display activation fees clearly during the SIM configuration process.
- Improved error handling and logging across various services to provide better insights during operations.
- Updated tests to cover new features and ensure reliability in the checkout and SIM management workflows.
2025-11-18 10:57:36 +09:00
barsa
fc2c46b21e Remove obsolete documentation files to streamline codebase
- Deleted several outdated markdown files including architecture summaries, validation audits, and type flow reports to reduce clutter and improve maintainability.
- Removed files related to previous architectural fixes and reviews that are no longer relevant to the current codebase.
- Cleaned up documentation to ensure only up-to-date and necessary information is retained for future reference.
2025-11-17 14:18:48 +09:00
barsa
ff55639b2d Refactor EditorConfig and improve code formatting across multiple files
- Replaced the existing .editorconfig file to establish consistent coding styles across editors.
- Cleaned up whitespace and improved formatting in various TypeScript files for better readability.
- Enhanced logging and error handling in Salesforce and WHMCS services to provide clearer insights during operations.
- Streamlined order processing and caching mechanisms, ensuring efficient handling of API requests and responses.
- Updated test cases to reflect changes in service methods and improve overall test coverage.
2025-11-17 11:49:58 +09:00
barsa
b5533994c2 Enhance distributed transaction handling and order fulfillment orchestration
- Introduced retry logic in DistributedTransactionService to improve resilience during step execution, allowing for configurable maximum retries.
- Refactored order fulfillment orchestration to include step status updates, enhancing visibility into the execution process and error handling.
- Implemented createTrackedStep utility to streamline step execution and status management, ensuring consistent handling of success and failure states.
- Improved toast message handling in usePaymentRefresh and SimFeatureToggles components for better user feedback during asynchronous operations.
- Added cleanup logic in SimManagementSection to prevent memory leaks and ensure proper aborting of ongoing requests.
2025-11-17 11:04:53 +09:00
barsa
01d5127351 Refactor InvoiceStatusBadge component and enhance currency formatting
- Updated InvoiceStatusBadge to utilize a configuration object for status handling, improving maintainability and readability.
- Added support for additional invoice statuses including Draft, Pending, Refunded, and Collections.
- Refactored currency formatting logic in dashboard utilities to use a centralized utility function, ensuring consistent currency display across the application.
- Enhanced useFormatCurrency hook to support more flexible currency formatting options, improving usability in various contexts.
2025-11-17 10:50:12 +09:00
barsa
d943d04754 Refactor environment configuration and enhance order processing logic
- Updated SF_PUBSUB_NUM_REQUESTED in environment configuration to improve flow control.
- Enhanced CatalogCdcSubscriber and OrderCdcSubscriber to utilize a dynamic numRequested value for subscriptions, improving event handling.
- Removed deprecated WHMCS API access key configurations from WhmcsConfigService to streamline integration.
- Improved error handling and logging in various services for better operational insights.
- Refactored currency service to centralize fallback currency logic, ensuring consistent currency handling across the application.
2025-11-17 10:31:33 +09:00
barsa
cbaa878000 Refactor Salesforce event handling and caching mechanisms
- Removed the deprecated SF_PROVISION_EVENT_CHANNEL from environment configuration to streamline event handling.
- Enhanced CatalogCdcSubscriber to utilize product IDs for cache invalidation, improving cache management during CDC events.
- Updated OrderCdcSubscriber to trigger provisioning based on Activation_Status__c changes, refining order processing logic.
- Improved CatalogCacheService to support dependency tracking for cached values, enabling more efficient cache invalidation.
- Refactored provisioning processor to simplify job handling and removed unnecessary replay ID management, enhancing clarity and performance.
2025-11-06 17:47:55 +09:00
barsa
309dac630f Enhance order processing and caching mechanisms
- Introduced provisioning triggers in OrderCdcSubscriber to handle specific status changes and enqueue provisioning jobs.
- Implemented request coalescing in OrdersCacheService and CatalogCacheService to prevent duplicate Salesforce API calls during cache invalidation.
- Updated CatalogModule and OrdersModule to export additional services for improved module integration.
- Enhanced error handling and logging in various services to provide better insights during operations.
2025-11-06 17:01:34 +09:00
barsa
1334c0f9a6 Enhance Salesforce integration and caching mechanisms
- Added new environment variables for Salesforce event channels and Change Data Capture (CDC) to improve cache invalidation and event handling.
- Updated Salesforce module to include new guards for write operations, enhancing request rate limiting.
- Refactored various services to utilize caching for improved performance and reduced API calls, including updates to the Orders and Catalog modules.
- Enhanced error handling and logging in Salesforce services to provide better insights during operations.
- Improved cache TTL configurations for better memory management and data freshness across catalog and order services.
2025-11-06 16:32:29 +09:00
barsa
c79488a6a4 Enhance Salesforce request handling and metrics tracking
- Introduced new metrics for daily API usage, including dailyApiLimit and dailyUsagePercent, to monitor API consumption effectively.
- Added route-level metrics tracking to capture request success and failure rates for better performance insights.
- Implemented degradation state management to handle rate limits and usage thresholds, improving resilience during high load.
- Enhanced SalesforceRequestQueueService to include detailed logging for route-level metrics, aiding in debugging and performance analysis.
- Updated Salesforce module to export new SalesforceReadThrottleGuard for improved request rate limiting across services.
- Refactored various services to utilize the new metrics and logging features, ensuring consistent behavior and improved maintainability.
2025-11-06 13:26:30 +09:00
barsa
b3e3689315 Refactor WHMCS integration to remove admin authentication and enhance API request handling
- Removed admin authentication methods and related configurations from WhmcsConfigService, simplifying the API integration.
- Updated WHMCS API methods to directly use API key authentication, improving security and reducing complexity.
- Enhanced error logging in WHMCS HTTP client to include full response context for better debugging.
- Adjusted order processing components to reflect changes in authentication handling, ensuring consistent behavior across the application.
- Improved loading states in the portal UI for better user experience during order processing.
2025-11-05 18:17:59 +09:00
barsa
e1f3160145 Enhance order display item sorting in buildOrderDisplayItems function
- Introduced sorting logic to prioritize monthly subscriptions over one-time items in the order display.
- Refactored item mapping to store display items in a variable for improved readability and maintainability.
- Ensured that items with the same charge kind maintain their original order during sorting.
2025-11-05 16:52:03 +09:00
barsa
8fac5db2b0 Refactor OrderDetail layout for improved clarity and responsiveness
- Restructured the header section to enhance the display of order details, including service label and pricing.
- Improved the layout of the status display and added a new section for next steps.
- Updated installation fee notice for better clarity on additional charges.
- Enhanced overall spacing and typography for a cleaner user interface.
2025-11-05 16:49:30 +09:00
barsa
531627a2eb Refactor OrderDetail component for improved layout and readability
- Simplified the header section by restructuring the layout for better clarity and responsiveness.
- Enhanced the display of order details, including service label and pricing, with improved styling.
- Updated status display to utilize a more consistent design and added support for next actions.
- Adjusted item display layout for better alignment and readability, including icon and title adjustments.
- Improved overall spacing and typography for a cleaner user interface.
2025-11-05 16:39:53 +09:00
barsa
d6f7c50e7b Refactor Salesforce request handling and improve logging
- Moved metrics tracking and logging from the queueing phase to the execution phase in SalesforceRequestQueueService for better accuracy.
- Updated CSRF token generation in CsrfController to accept parameters in a more flexible manner.
- Enhanced CacheService to handle immediate expiry requests without leaking stale values.
- Improved error handling and re-authentication logic in SalesforceConnection for better resilience during session expiration.
- Refactored logout functionality in AuthFacade to handle optional userId and improve logging during token revocation.
- Updated AuthController to apply rate limit headers and improved type handling in various request contexts.
- Streamlined imports and improved overall code organization across multiple modules for better maintainability.
2025-11-05 15:47:06 +09:00
barsa
5d011c87be Enhance order processing and event streaming capabilities
- Introduced OrderEventsService to manage order-related events and updates.
- Added SSE endpoint in OrdersController for streaming order updates to clients.
- Enhanced OrderFulfillmentOrchestrator to publish order status updates during fulfillment processes.
- Updated order field mappings to include bundled add-on information for improved order detail handling.
- Refactored OrderCard and OrderDetail components for better display of order information and status updates.
2025-11-04 17:24:26 +09:00
barsa
1dc8fbf36d Refactor user management and validation integration
- Replaced UsersService with UsersFacade across various modules for improved abstraction and consistency.
- Updated validation imports to utilize the new @customer-portal/validation package, enhancing modularity.
- Removed deprecated validation files and streamlined user-related logic in controllers and services.
- Enhanced order processing by integrating field mappings for Salesforce orders, improving maintainability.
- Improved error handling and response structures in authentication and user management workflows.
2025-11-04 13:28:36 +09:00