98 Commits

Author SHA1 Message Date
barsa
065e2f9acf Refactor import paths for AlertBanner, AsyncBlock, and other components in the portal to enhance module structure and maintainability. Remove unused components and streamline imports across various views and features, ensuring consistent file organization. 2025-09-25 15:54:54 +09:00
barsa
3da96d0c84 Refactor import paths for components in the portal to enhance module structure and maintainability, ensuring consistent file organization across DataTable, FormField, SearchFilterBar, AuthLayout, and PageLayout. 2025-09-25 15:15:50 +09:00
barsa
5a8e9624ae Update import paths for SubCard and FormField components across multiple files to improve module structure and maintainability. 2025-09-25 15:14:36 +09:00
barsa
be3af76e01 Update import paths for DataTable component in InvoiceTable and SubscriptionsList to improve module structure and maintainability. 2025-09-25 15:12:20 +09:00
barsa
4447278b2c Update import path for SubCard component in AddressCard to improve module structure and maintainability. 2025-09-25 15:12:06 +09:00
barsa
c5de063a3e Refactor portal components and services for improved structure and consistency. Replace DashboardLayout with AppShell in authenticated pages, streamline loading states by removing deprecated components, and enhance validation imports across various forms. Update type definitions and clean up unused code to ensure better maintainability and adherence to the new design system. 2025-09-25 15:11:28 +09:00
barsa
640a4e1094 Refactor various services to improve code organization and error handling. Streamline provider declarations in Salesforce module, enhance WHMCS service with new client product retrieval method, and update pagination logic in AuthAdminController. Clean up unused imports and improve type handling across multiple modules, ensuring better maintainability and consistency. 2025-09-25 13:32:16 +09:00
barsa
47a3de6919 Refactor error handling in various services to improve consistency and maintainability. Update user role management across authentication and user services, ensuring proper type definitions. Enhance validation schemas and streamline import/export practices in the domain and validation modules. Remove deprecated files and clean up unused code in the Salesforce integration and catalog services. 2025-09-25 13:21:11 +09:00
barsa
e66e7a5884 Update TypeScript configuration to include scripts directory, clean up unused lines in various files, and refactor error handling in cache service. Enhance logging for database and Redis connections, and streamline order processing logic in the orders module. Improve validation schemas and ensure consistent import/export practices across modules. 2025-09-25 11:44:10 +09:00
barsa
6becad1511 Update ESLint configuration and package dependencies; refactor BFF modules for improved structure and validation handling. Remove deprecated files and enhance user profile management across services. Streamline API client and validation utilities for better consistency and maintainability. 2025-09-24 18:00:49 +09:00
T. Narantuya
60f328269a Refactor authentication and billing components to streamline functionality and improve code organization. Remove deprecated files and consolidate loading states across the application. Update package configurations and enhance error handling in various services for better consistency and maintainability. 2025-09-20 11:35:40 +09:00
T. Narantuya
f662c3eb45 Refactor AuthZodController to AuthController, enhancing login and password set functionalities with throttling and improved response handling. Update AuthModule to reflect controller name change and add new services. Refine AuthService to return sanitized user data and improve error logging. Enhance AuthThrottleGuard to track login attempts by IP and User Agent for better security. Clean up unused JWT guard and streamline token management in AuthTokenService. 2025-09-19 17:37:46 +09:00
T. Narantuya
b8acdeafb0 Remove deprecated files and schemas related to validation and type patterns. Update package.json scripts for type-checking with improved memory options. Refactor various components to utilize Zod for validation, enhancing form handling across the application. Clean up unused imports and streamline API client configurations for consistency. 2025-09-19 16:34:10 +09:00
T. Narantuya
dcf32c1d06 Refactor AuditService and AuthAdminController to streamline audit log retrieval and security statistics. Introduce new methods in AuditService for fetching audit logs and security stats, and update AuthAdminController to utilize these methods. Remove redundant code and improve error handling in InvoicesService. Clean up unused DTOs and API routes in the portal. Enhance query keys for better organization in billing and catalog features. 2025-09-18 17:49:43 +09:00
NTumurbars
69aee3b08e
Merge branch 'ver2' into codex/update-auth-token-structure-and-consumers 2025-09-18 16:45:11 +09:00
NTumurbars
e9dc9a93f6 Refine auth token handling 2025-09-18 16:40:43 +09:00
NTumurbars
0749bb1fa0 Normalize auth token expiry handling 2025-09-18 16:39:18 +09:00
NTumurbars
f2c9096a44
Merge pull request #6 from NTumurbars/codex/create-bootstrap-logic-and-update-entry-points
refactor: extract bff bootstrap logic
2025-09-18 15:26:30 +09:00
NTumurbars
d34e140193 chore: temporarily disable cases and jobs modules 2025-09-18 15:18:44 +09:00
NTumurbars
01e0f41c14 refactor: extract bff bootstrap logic 2025-09-18 15:18:12 +09:00
T. Narantuya
a22b84f128 Refactor and clean up BFF and portal components for improved maintainability
- Removed deprecated files and components from the BFF application, including various auth and catalog services, enhancing code clarity.
- Updated package.json scripts for better organization and streamlined development processes.
- Refactored portal components to improve structure and maintainability, including the removal of unused files and components.
- Enhanced type definitions and imports across the application for consistency and clarity.
2025-09-18 14:52:26 +09:00
T. Narantuya
ed6fae677d Enhance memory management and refactor components for improved performance
- Updated package.json scripts to optimize memory usage during type-checking and building processes.
- Refactored BFF application scripts to include memory management options for build, dev, and test commands.
- Introduced new type-check scripts for better memory handling in the BFF application.
- Reorganized imports and components in the portal application for better structure and maintainability.
- Replaced large component files with dedicated view components to streamline rendering and improve load times.
2025-09-18 12:34:26 +09:00
T. Narantuya
52adc29016 Refactor catalog services and update product types for improved clarity and functionality
- Updated Internet and SIM catalog services to utilize new product types, enhancing type safety and consistency.
- Refactored methods to return specific catalog item types, including InternetPlanCatalogItem, InternetInstallationCatalogItem, and SimActivationFeeCatalogItem.
- Adjusted API responses and frontend components to align with updated product structures, ensuring accurate data handling.
- Removed deprecated fields and streamlined type definitions across the catalog services and related components.
2025-09-18 11:22:22 +09:00
T. Narantuya
a95ec60859 Refactor address management and update related services for improved clarity and functionality
- Updated address retrieval in user service to replace billing info with a dedicated address method.
- Adjusted API endpoints to use `PATCH /api/me/address` for address updates instead of billing updates.
- Enhanced documentation to reflect changes in address management processes and API usage.
- Removed deprecated types and services related to billing address handling, streamlining the codebase.
2025-09-17 18:43:43 +09:00
T. Narantuya
bef5abcbda Refactor Freebit service and update SIM management components for improved clarity and functionality
- Consolidated and cleaned up type definitions in Freebit service interfaces for better readability.
- Enhanced error handling and logging in Freebit service methods to provide clearer feedback.
- Updated SIM management pages to streamline user interactions and improve UI components.
- Removed deprecated subscription detail page and restructured routing for better navigation.
- Added new notice and info row components in SIM cancellation page for improved user experience.
2025-09-11 16:21:54 +09:00
T. Narantuya
15af220369 Add SIM fulfillment service and integrate into order orchestration
- Introduced SimFulfillmentService to handle SIM-specific order fulfillment, including validation and activation via Freebit API.
- Updated OrderFulfillmentOrchestrator to include SIM fulfillment logic, adding a new step for SIM orders and integrating the service.
- Enhanced order initialization to accommodate SIM-specific configurations and validation in the checkout process.
- Refactored existing order orchestration steps to ensure proper handling of SIM-related fulfillment requirements.
2025-09-11 15:06:23 +09:00
T. Narantuya
db98311b8e Add .env backup file for development configuration and update .gitignore
- Created a new .env backup file for the development environment, providing essential configurations for database, Redis, and application settings.
- Updated .gitignore to exclude API documentation containing sensitive details.
- Refactored token-blacklist service error handling to simplify catch block.
- Adjusted Freebit API configuration validation to reflect updated base URL.
- Enhanced email service interfaces to allow optional 'from' field.
- Improved order orchestrator service to include additional fields in SOQL query.
- Added new SIM order activation service and controller for managing SIM activations.
- Updated subscriptions module to include new services and controllers for SIM management.
- Enhanced error handling in SIM management service for better user feedback.
- Refactored various components in the portal for improved user experience and consistency.
2025-09-11 15:03:08 +09:00
tema
ea2fe81606 Add SIM fulfillment support to order orchestration
- Integrated SimFulfillmentService into OrderFulfillmentOrchestrator to handle SIM-specific fulfillment steps.
- Updated initializeSteps method to conditionally include SIM fulfillment based on order type.
- Enhanced CheckoutContent to validate required SIM fields for order processing, ensuring necessary data is provided before activation.
2025-09-11 14:52:26 +09:00
T. Narantuya
4c819a9a7b Update pnpm-lock.yaml and TypeScript configurations for improved dependency management and code structure
- Standardized string quotes in pnpm-lock.yaml for consistency.
- Updated TypeScript configuration files to include type definitions and type roots for better type management.
- Enhanced SalesforcePubSubSubscriber class with replay corruption recovery logic and refactored subscription handling for improved reliability.
- Removed unused backup file for dashboard layout to streamline the codebase.
2025-09-11 13:17:10 +09:00
tema
bccc476283 Refactor SIM management and Freebit service for improved error handling and type safety
- Consolidated error handling in SimManagementService and FreebititService to provide clearer logging and user feedback.
- Enhanced type safety in FreebititService by refining type definitions for API requests and responses.
- Updated various components to ensure consistent error handling and improved user experience during SIM management actions.
2025-09-10 18:31:16 +09:00
tema
c30afc4bec Add email notification functionality to SIM management actions
- Introduced email notifications for various SIM management actions (e.g., top-ups, plan changes, cancellations) in SimManagementService.
- Updated SendGridEmailProvider to allow custom 'from' addresses in email options.
- Enhanced the SimCancelPage component to provide user feedback and confirmation regarding cancellation requests.
- Refactored email service integration to improve error handling and logging for email notifications.
2025-09-10 16:33:24 +09:00
tema
adf653e5e1 Enhance eSIM reissue functionality with optional EID transfer
- Updated SimManagementService to allow reissuing eSIM profiles with an optional new EID, including validation for the EID format.
- Modified SubscriptionsController to accept a new EID in the request body for the eSIM reissue endpoint.
- Implemented a new React component for the eSIM reissue page, featuring form validation and user feedback for successful or failed requests.
2025-09-09 18:50:31 +09:00
tema
feed3bd4b7 Enhance WHMCS data transformer and shared status definitions with new invoice statuses
- Added 'Refunded' and 'Pending' statuses to the WHMCS data transformer for improved status mapping.
- Updated shared status definitions to include 'Refunded' for consistency across the application.
2025-09-09 18:29:44 +09:00
T. Narantuya
0bf872e249 Refactor code formatting and improve documentation clarity
- Adjusted YAML and JSON files for consistent formatting, including healthcheck commands and package exports.
- Enhanced readability in various TypeScript files by standardizing string quotes and improving line breaks.
- Updated documentation across multiple files to improve clarity and consistency, including address system and logging levels.
- Removed unnecessary package-lock.json from shared package directory to streamline dependencies.
2025-09-09 18:19:54 +09:00
tema
927d1c7dcf Refactor SIM cancellation logic and Freebit service integration for improved scheduling and error handling
- Updated SimManagementService to determine the run date for SIM cancellations, defaulting to the 1st of the next month if no date is provided.
- Modified FreebititService to align with the new cancellation request structure, utilizing the PA02-04 API for account cancellations.
- Enhanced logging to provide clearer information regarding cancellation requests and their statuses.
2025-09-09 17:22:53 +09:00
tema
74e27e3ca2 Enhance SIM management and Freebit service with improved scheduling and error handling
- Updated SimManagementService to schedule contract line changes 30 minutes after applying voice options, improving user experience.
- Refactored FreebititService to include a new method for authenticated JSON POST requests, enhancing error handling and logging for API responses.
- Introduced new interfaces for voice option and contract line change requests and responses, improving type safety and clarity in API interactions.
- Enhanced error handling in FreebititService to provide more specific error messages based on API response status codes.
2025-09-09 17:13:10 +09:00
tema
340ff94d07 Refactor SIM management and usage services for improved scheduling and error handling
- Updated SimManagementService to automatically schedule plan changes for the 1st of the next month instead of immediate execution.
- Enhanced SimUsageStoreService by introducing a private store getter for safer access to the SIM usage data.
- Improved error handling in upsert and find methods to ensure proper logging and handling of unconfigured stores.
- Refined port management logic in manage.sh to ensure desired ports are free and provide clearer error messages for port conflicts.
2025-09-09 16:54:36 +09:00
tema
6e27d8a21e Refactor SIM management and usage services for improved functionality and type safety
- Updated SimManagementService to schedule plan changes for immediate execution during testing.
- Enhanced type safety in SimUsageStoreService by removing unsafe type assertions and improving method calls.
- Improved error handling in FreebititService by ensuring proper type handling for plan codes and sizes.
- Added functionality in manage.sh to automatically find and assign free ports for development services.
2025-09-09 16:30:36 +09:00
tema
f21db44611 Lint fixes 2025-09-09 16:13:17 +09:00
tema
5f7fb483d7 Refactor error handling and type safety across services
- Simplified error handling in TokenBlacklistService by removing unnecessary error variable.
- Enhanced type safety in SimUsageStoreService with improved type assertions and error handling.
- Updated FreebititService to provide clearer error messages and consistent error handling across multiple methods.
- Standardized import statements in WhmcsInvoiceService for better organization and clarity.
- Added missing imports in dev-prep script to ensure proper functionality.
2025-09-09 16:07:48 +09:00
tema
de35397cf9 Refactor order and subscription services for improved type safety and error handling
- Updated billing cycle assignment in OrderOrchestrator to ensure proper type handling.
- Enhanced error handling in SimManagementService and related components to use more specific types for exceptions.
- Standardized error handling across various components to improve consistency and clarity.
- Adjusted function signatures in multiple services and controllers to return more precise types, enhancing type safety.
2025-09-09 15:59:30 +09:00
tema
05817e8c67 Refactor code for improved readability and consistency across components
- Standardized import statements and formatting in various files for better code clarity.
- Enhanced error messages and logging for improved debugging and user experience.
- Adjusted whitespace and line breaks in multiple components to follow best practices.
- Updated environment variable handling and configuration for consistency across services.
2025-09-09 15:45:03 +09:00
tema
425ef83dba Update SIM management service and UI components for Freebit API compliance
- Adjusted quota validation in SimManagementService to enforce limits of 100MB to 51200MB for Freebit API compatibility.
- Updated cost calculation to round up GB usage for billing, ensuring accurate invoice generation.
- Modified top-up modal and related UI components to reflect new limits of 1-50 GB, aligning with Freebit API constraints.
- Enhanced documentation to clarify pricing structure and API data flow adjustments.
2025-09-09 15:40:13 +09:00
tema
5c6057bf2e Implement eSIM profile reissue via PA05-41 API with enhanced error handling
- Updated reissueEsimProfile method to utilize the PA05-41 eSIM Account Activation API for reissuing profiles.
- Added validation checks for eSIM type and EID presence, throwing appropriate exceptions for errors.
- Improved logging for both successful operations and error responses from the API.
- Introduced new interfaces for eSIM account activation requests and responses to support the API integration.
2025-09-08 18:57:26 +09:00
tema
2325cf2753 Refactor Freebit plan change request and improve error handling
- Updated FreebititPlanChangeRequest interface to use 'planCode' instead of 'plancode' for consistency.
- Enhanced error handling in WhmcsInvoiceService to provide a default message for payment errors.
- Removed unused state variables for global IP assignment and scheduling in SIM change plan components to streamline the user interface.
2025-09-08 18:45:00 +09:00
tema
c9356cad65 Enhance SIM management service with improved error handling and scheduling
- Added specific checks for SIM data in SimManagementService, including expected SIM number and EID.
- Updated the change plan functionality to automatically schedule changes for the 1st of the next month.
- Enhanced error handling for Freebit API responses with user-friendly messages.
- Implemented invoice update functionality in WHMCS service for better payment processing management.
- Improved logging for debugging and tracking SIM account issues.
2025-09-08 18:31:26 +09:00
T. Narantuya
cb3cb8fec8 Enhance WHMCS integration and validation processes
- Updated .env.example and portal-backend.env.sample to include new development-specific WHMCS environment variables.
- Improved error handling in AuthService with a new signupPreflight method for validating signup data without creating accounts.
- Enhanced phone number validation in SignupDto to enforce stricter formatting rules.
- Refactored WHMCS connection service to prioritize development environment variables and normalize redirect URLs for SSO tokens.
- Added debug logging for SSO redirect hosts in non-production environments to aid in troubleshooting.
2025-09-06 17:38:42 +09:00
tema
5a0c5272e0 Update SIM management calculations and configurations
- Changed the base URL for Freebit API in environment validation to the new test URL.
- Updated data usage calculations in SimManagementService and related components to use 1000 instead of 1024 for MB to GB conversions.
- Adjusted the top-up modal and related components to reflect the new GB input method and validation rules.
- Enhanced documentation to align with the updated API and usage metrics.
2025-09-06 17:02:20 +09:00
T. Narantuya
79f11edb65 Enhance authentication and user service error handling
- Added HttpCode decorator to the checkPasswordNeeded endpoint for consistent response status.
- Updated email validation in UsersService to throw BadRequestException for improved error handling.
- Introduced NotFoundException in WhmcsConnectionService for better error messaging when clients are not found.
2025-09-06 14:23:51 +09:00
T. Narantuya
7e053a666c Add sharp library for image processing and enhance provisioning logic
- Added sharp library to package.json for image manipulation capabilities.
- Updated pnpm-lock.yaml to include sharp dependency.
- Enhanced HealthController to include provisioning queue job counts in health checks.
- Improved error handling and logging in ProvisioningProcessor for better diagnostics.
- Refactored order fulfillment validation to utilize new WhmcsPaymentService for payment method checks.
- Updated documentation to reflect changes in the provisioning workflow and added new integration overview.
2025-09-06 13:58:54 +09:00