109 Commits

Author SHA1 Message Date
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
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
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
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
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
barsa
b65a49bc2f Refactor Salesforce integration and enhance order field handling
- Added OrderFieldConfigModule to Salesforce module for improved order field management.
- Refactored SalesforceOrderService to utilize OrderFieldMapService for building query fields, enhancing maintainability and consistency.
- Removed deprecated order query builder utility functions, centralizing logic within the new OrderFieldMapService.
- Updated OrderBuilder service to leverage field mappings for better clarity and reduced hardcoding of field names.
- Improved address handling in order processing to ensure consistent field usage across services.
2025-11-04 11:26:21 +09:00
barsa
67691a50b5 Refactor WHMCS service and improve address handling
- Updated WHMCS service to utilize addressSchema for client address retrieval, enhancing data validation.
- Cleaned up imports in WHMCS client service for better organization.
- Improved logging format in WHMCS subscription service for clearer output.
- Streamlined address handling in order builder service for consistency.
- Enhanced code readability by formatting JSX elements in ProfileContainer and other components.
- Removed deprecated billing cycle normalization logic and centralized it in the domain helpers for better maintainability.
2025-11-04 11:14:26 +09:00
barsa
0a3d5b1e3c Refactor WHMCS service methods and improve type handling
- Updated WHMCS service methods to return normalized product types, enhancing type consistency across services.
- Refactored product retrieval logic in WhmcsPaymentService and WhmcsService to streamline data handling.
- Removed deprecated utility functions and optimized custom field handling in WHMCS-related services.
- Enhanced error handling in subscription processing to improve reliability and clarity.
- Cleaned up imports and improved overall code organization for better maintainability.
2025-10-29 18:59:17 +09:00
barsa
26b2112fbb Refactor WHMCS client handling and improve type consistency across services
- Updated WHMCS service methods to return WhmcsClient type instead of NormalizedWhmcsClient for better alignment with domain types.
- Refactored caching logic in WhmcsCacheService to utilize WhmcsClient, enhancing type safety and consistency.
- Simplified client detail retrieval in WhmcsClientService by directly using the transformed WhmcsClient response.
- Removed deprecated utility functions and streamlined custom field normalization logic in whmcs-client.utils.ts.
- Enhanced user profile mapping in UsersService to utilize combineToUser for improved clarity and maintainability.
- Cleaned up unused imports and optimized address handling in various components for better performance.
2025-10-29 18:36:25 +09:00
barsa
05765d3513 Enhance session management and error handling in authentication components
- Added a new error mapping for "SESSION_EXPIRED" in SecureErrorMapperService to provide user-friendly messages and appropriate logging levels.
- Updated SessionTimeoutWarning component to include a reason for logout when the session expires, improving user feedback.
- Refactored useAuth hook to support enhanced logout functionality with reason options, ensuring better session management.
- Improved auth.store to handle logout reasons and integrate with error handling for session refresh failures.
- Streamlined LoginView to display logout messages based on session expiration, enhancing user experience.
2025-10-29 18:19:50 +09:00
barsa
2611e63cfd Enhance caching and response handling in catalog and subscriptions controllers
- Added Cache-Control headers to various endpoints in CatalogController and SubscriptionsController to improve caching behavior and reduce server load.
- Updated response structures to ensure consistent caching strategies across different API endpoints.
- Improved overall performance by implementing throttling and caching mechanisms for better request management.
2025-10-29 13:29:28 +09:00
barsa
0c904f7944 Refactor CardBadge and InternetPlanCard components for improved styling and functionality
- Updated CardBadge to support additional size options and enhanced styling for better visual consistency.
- Refactored InternetPlanCard to utilize the new CardBadge size options and improved layout for badge display.
- Enhanced state management in InternetPlanCard to utilize Zustand for better performance and maintainability.
- Streamlined rendering logic in InternetConfigureContainer for improved step transitions and user experience.
- Updated catalog utility functions to remove deprecated filtering and sorting methods, focusing on server-side handling.
2025-10-28 15:55:46 +09:00
barsa
9f8d5fe4f1 Enhance error handling and response structure across filters and services
- Updated error response structures in AuthErrorFilter, HttpExceptionFilter, and ZodValidationExceptionFilter to include detailed information such as timestamp and request path.
- Replaced generic error messages with domain-specific exceptions in Freebit and WHMCS services to improve clarity and maintainability.
- Improved logging and error handling in various services to provide better context for failures and enhance debugging capabilities.
- Refactored JWT strategy to include explicit expiration checks for improved security and user feedback.
2025-10-28 13:43:45 +09:00
barsa
7500b5fce0 Enhance security and refactor order processing for improved reliability
- Implemented Redis-backed idempotency keys in SIM activation to prevent race conditions and double-charging.
- Increased bcrypt hashing rounds from 12 to 14 for stronger password security.
- Introduced a structured exception hierarchy to replace generic errors with domain-specific exceptions.
- Centralized Internet Access Mode constants and improved schema organization by extracting duplicated enum values.
- Updated various components to utilize new domain types for better consistency and maintainability.
- Enhanced error handling in SIM fulfillment and order activation processes to provide clearer feedback and prevent duplicate processing.
2025-10-27 16:53:19 +09:00
barsa
d04b256885 Update documentation and remove unused files for codebase clarity
- Refreshed CODEBASE_ANALYSIS.md to reflect the new ownership model and improve onboarding documentation.
- Deleted obsolete VALIDATION_DUPLICATION_REPORT.md to streamline the codebase.
- Made minor adjustments to various components and services for better organization and clarity.
2025-10-27 15:47:50 +09:00
barsa
fcd324df09 Refactor Salesforce utility and improve order handling in checkout process
- Imported salesforceIdSchema and nonEmptyStringSchema from the common domain for better consistency.
- Simplified the creation of SOQL field name validation schema.
- Refactored the InvoiceTable component to utilize useCallback for improved performance.
- Streamlined payment method handling in the PaymentMethodCard component by removing unused props.
- Enhanced the checkout process by integrating new validation schemas and improving cart handling logic.
- Updated various components to ensure better type safety and clarity in data handling.
2025-10-22 11:33:23 +09:00
barsa
e42d474048 Enhance Salesforce query builders and validation for SOQL field names
- Updated the product query builder to accept a dynamic category field, improving flexibility in SOQL queries.
- Introduced a new utility function to validate SOQL field names, ensuring safe inclusion in queries.
- Refactored catalog service queries to utilize the new category field validation.
- Enhanced the SIM catalog controller to return structured data, improving response consistency.
- Updated various components to reflect changes in pricing display logic, ensuring accurate representation of plan costs.
2025-10-21 18:24:47 +09:00
barsa
82bb590023 Refactor subscriptions controller and service to enhance validation and error handling
- Introduced a new pagination schema for subscription invoices to improve query validation.
- Updated the subscriptions controller to utilize the new schema for invoice queries, ensuring better data integrity.
- Enhanced error handling in the subscriptions service by replacing generic error messages with specific BadRequestException for invalid subscription IDs.
- Refactored WHMCS raw types to implement normalization functions for better data validation and consistency.
2025-10-21 17:52:23 +09:00
barsa
7cefee4c75 Update .gitignore and enhance CSRF controller and WHMCS services
- Added exceptions to .gitignore for the portal public directory to ensure proper asset management.
- Marked CSRF token retrieval and refresh endpoints as public for improved access control.
- Refactored WHMCS invoice service to enhance error logging and processing of invoice records.
- Updated WHMCS raw types to introduce a common schema for invoices, improving data consistency and validation.
- Enhanced Salesforce order item transformation to streamline billing cycle handling.
2025-10-21 16:30:52 +09:00
barsa
cff6c21bae Add CurrencyModule to router configuration and enhance WHMCS subscription service response handling
- Integrated CurrencyModule into the API routes for improved currency management.
- Updated WHMCS subscription service to utilize a new response schema for better error handling and data normalization.
- Refactored address and profile API endpoints in account service to use consistent API paths.
- Introduced normalization functions for WHMCS product response types to enhance data integrity.
2025-10-21 14:41:22 +09:00
barsa
2de2e8ec8a Refactor SIM management services to unify SIM info retrieval and enhance type safety. Updated getSimInfo methods across services and controllers to return a structured SimInfo type, improving data consistency. Integrated validation schemas for better error handling and streamlined response parsing in API calls. 2025-10-21 13:21:03 +09:00
barsa
939922a40e Refactor order and subscription services to enhance validation and type safety. Updated order validation to use new SKU validation schema, improved SIM reissue profile handling by integrating a structured request object, and refined subscription fetching logic to utilize updated schemas. Additionally, enhanced error handling and logging for better traceability in service operations. 2025-10-21 11:44:06 +09:00
barsa
7ffd2d562f Remove Activation_Last_Attempt_At__c field from Salesforce order schema and related utility functions to streamline order data structure. Update buildInClause function to format output with parentheses for improved query syntax. 2025-10-21 10:19:30 +09:00
barsa
8a90003075 Refactor WHMCS client handling to improve type safety and address management. Updated methods in WhmcsService and WhmcsClientService to return NormalizedWhmcsClient type, enhancing consistency. Simplified address retrieval logic and improved caching mechanisms in WhmcsCacheService. Additionally, introduced utility functions for custom field handling in WHMCS integration workflows, ensuring better data management and clarity. 2025-10-20 16:26:47 +09:00
barsa
7420b77202 Enhance WHMCS currency handling by adding fallback logic and improving response parsing. Updated WhmcsCurrencyService to check WHMCS availability before loading currencies, and refactored currency response handling to support both nested and flat formats. Additionally, added address management endpoints in UsersController and UsersService for better customer address handling. Updated TypeScript and package dependencies for improved compatibility. 2025-10-20 14:54:04 +09:00
barsa
0a2cafed76 Refactor currency formatting across multiple components to utilize the new useFormatCurrency hook. This change enhances consistency in currency display and improves maintainability by centralizing currency formatting logic. Updated relevant components to ensure they correctly format amounts with the appropriate currency symbol. 2025-10-20 14:01:29 +09:00
barsa
0233ff2dce Enhance catalog and order handling by integrating new currency formatting and validation utilities. Updated various components to utilize the centralized currency formatting function, ensuring consistent display across the application. Refactored order creation and validation processes to improve clarity and maintainability, aligning with the updated domain structure. 2025-10-20 13:53:35 +09:00
barsa
e6548e61f7 Refactor user profile handling to standardize field names across the application. Updated currency and name fields to use consistent camelCase naming conventions, enhancing clarity and maintainability. Adjusted import paths for address and profile types to align with the new domain structure, ensuring improved organization and type safety throughout the codebase. 2025-10-09 10:49:03 +09:00
barsa
fd87a0220a Re-export Address type from customer domain in common index for easier imports, enhancing code clarity and maintainability. 2025-10-08 18:56:14 +09:00
barsa
0ddb7c521c Update package.json to include new module exports for auth, orders, payments, sim, subscriptions, and other directories, ensuring all paths now include the '.js' extension for improved consistency and clarity across the application. 2025-10-08 18:53:36 +09:00
barsa
57985d95a6 Update TypeScript configuration across multiple files to enhance compatibility and maintainability. Changed target to ES2023, adjusted module settings, and refined path mappings. Removed unnecessary options and streamlined build configurations, ensuring a cleaner and more efficient setup for the application. 2025-10-08 18:48:14 +09:00
barsa
7b7d736aaf Refactor module type settings and import paths across the application to enhance consistency and maintainability. Changed package types from 'module' to 'commonjs' in package.json files, updated TypeScript configuration for module resolution, and streamlined import paths by removing file extensions. This improves clarity and aligns with the updated module structure throughout the codebase. 2025-10-08 18:35:05 +09:00
barsa
5eebd11668 Update import paths across various modules to include the '.js' extension for consistency and improved clarity. This change enhances maintainability and aligns with the updated module structure throughout the application. 2025-10-08 18:24:21 +09:00
barsa
12299b5b44 Remove deprecated documentation files related to architecture, validation, and integration processes. This cleanup enhances maintainability and reduces clutter in the repository, ensuring a more streamlined development environment. 2025-10-08 18:14:12 +09:00
barsa
2e6a1c7ca2 Refactor validation architecture to eliminate redundant wrapper functions and enhance clarity. Directly utilize Zod schemas for validation in the domain and BFF layers, improving maintainability and type safety. Removed deprecated validator services and streamlined service methods to align with the new structure, ensuring a clear separation of concerns in data handling. Updated various services to reflect these changes, resulting in a more concise and efficient validation process. 2025-10-08 16:50:51 +09:00
barsa
55489cad20 Refactor WHMCS integration and user management to align with updated domain structure. Removed deprecated validation utilities and types, enhancing type safety and maintainability. Streamlined import paths and module exports for consistency, ensuring clear separation of concerns in data handling. Updated user and address management to reflect new schemas, improving validation and organization across the application. 2025-10-08 16:31:42 +09:00
barsa
b19da24edd Refactor Salesforce and WHMCS integrations to enhance type safety and maintainability by utilizing updated domain response types. Removed deprecated types and streamlined service methods to align with the new architecture. Updated import paths and module exports for consistency across the application, ensuring clear separation of concerns and improved organization in data handling. 2025-10-08 13:46:23 +09:00
barsa
cd0f5cb723 Refactor architecture to achieve 100% clean architecture by centralizing DB mappers and removing redundant transformer services. Streamlined Freebit and WHMCS integrations to utilize domain mappers directly, enhancing maintainability and consistency across all integrations. Updated documentation and module exports to reflect the new structure, ensuring clear separation of concerns and comprehensive guidance for future developers. 2025-10-08 13:03:31 +09:00
barsa
1960cc891d Refactor Salesforce integration to implement clean architecture principles by encapsulating order operations within the new SalesforceOrderService. Removed redundant OrderWhmcsMapper and streamlined order fulfillment processes to utilize domain mappers directly, enhancing maintainability and clarity. Updated module exports and import paths to reflect the new structure, ensuring a clear separation of concerns between business logic and infrastructure. 2025-10-08 11:45:47 +09:00
barsa
e5c5f352f2 Refactor Salesforce integration by removing the SalesforceFieldMapService from various modules and updating import paths to utilize direct field references. This change enhances type safety and maintainability while streamlining data handling in order-related services and catalog modules. 2025-10-08 11:22:01 +09:00
barsa
88d58f9ac5 Refactor Salesforce integration by removing the SalesforceFieldMapService from the CoreConfigModule and updating import paths across various services to utilize the new Salesforce field configuration. This enhances type safety and maintainability while streamlining data handling in order-related services. 2025-10-08 11:11:05 +09:00
barsa
0740846560 Refactor integration services and update import paths to align with the new domain structure, enhancing type safety and maintainability. Streamline Freebit and Salesforce integration by utilizing updated provider methods and removing deprecated types. Improve organization and consistency in data handling across various modules, including catalog and billing services, by adopting new schemas and types from the updated domain package. 2025-10-08 10:33:33 +09:00
barsa
6e49b7f372 Refactor user and address handling across the application to align with the new domain structure. Update User model in Prisma schema to remove unnecessary fields and clarify authentication state. Streamline user mapping utilities to focus on authentication data only, deprecating old methods. Enhance WHMCS integration services by updating client detail retrieval methods to return Customer types, improving consistency in data handling. Update address management in various modules to reflect new address structure, ensuring better validation and organization. 2025-10-07 17:38:39 +09:00
barsa
5ecab0d761 Enhance TypeScript configuration by adding composite option for improved project structure. Update address schema to allow optional fields and introduce a legacy alias for backward compatibility. Refactor address type to support nullable values, ensuring better data handling and validation across the application. 2025-10-03 17:43:57 +09:00
barsa
a3367c56d5 Refactor ESLint configuration and TypeScript paths to remove deprecated contracts and schemas packages, enhancing type safety and maintainability. Update import paths across various modules to align with the new domain structure, ensuring consistent data handling. Introduce new request and response schemas in the authentication domain, improving validation and organization. Streamline Freebit and WHMCS integration services by utilizing updated provider methods and removing obsolete types. 2025-10-03 17:33:39 +09:00
barsa
c206598615 Refactor Freebit integration services to enhance type safety and maintainability by utilizing updated provider methods and removing deprecated types. Update authentication and mapping logic to align with the new domain structure, improving data handling consistency across services. Introduce new response transformation methods for Freebit authentication, ensuring robust error handling and streamlined integration. 2025-10-03 17:13:02 +09:00
barsa
12c3dc976f Refactor integration services and update import paths to align with the new domain structure, enhancing type safety and maintainability. Streamline Freebit integration by utilizing updated provider methods and removing deprecated types. Improve organization and consistency in data handling across various modules, including catalog and billing services. 2025-10-03 17:08:42 +09:00
barsa
69aa47ad59 Refactor import paths in user mapping and authentication modules to align with the new domain structure, enhancing type safety and maintainability. Remove deprecated Freebit types and streamline integration services by utilizing updated provider methods for improved organization and consistency in data handling. 2025-10-03 16:37:52 +09:00