101 Commits

Author SHA1 Message Date
barsa
89b495db1a Update ESLint configuration, package dependencies, and improve Prisma integration
- Refactored ESLint configuration for better clarity and organization, including updates to TypeScript rules and Next.js app settings.
- Upgraded package dependencies, including Next.js to version 16.0.8 and Prisma to version 7.1.0, enhancing performance and compatibility.
- Modified Dockerfile for BFF to reflect updated Prisma version and optimize build settings.
- Improved Prisma service to utilize PostgreSQL connection pooling with the new PrismaPg adapter, ensuring better database management.
- Cleaned up TypeScript configuration files for consistency and updated module settings to align with ESNext standards.
- Adjusted pre-commit script to streamline security audits and removed unnecessary linting during development.
2025-12-10 13:59:41 +09:00
barsa
f30dcc0608 Refactor pre-commit script and enhance Freebit integration
- Disabled linting in the pre-commit hook during active development, with a reminder to re-enable it before production.
- Simplified the import of `tsconfig-paths` in `main.ts` for better readability.
- Updated exception filter to cast status to `HttpStatus` for TypeScript compatibility.
- Refactored Freebit module imports to streamline dependency management.
- Re-exported SIM management types in Freebit API type definitions for better integration.
- Improved type handling in Freebit operations service by specifying the type for `voiceOptionsService`.
- Cleaned up unused code in SIM management service and added optional fields in SIM schema for enhanced functionality.
2025-12-10 13:38:33 +09:00
barsa
92a7e852c0 Update package dependencies and enhance workspace configuration
- Upgraded various dependencies across the project, including NestJS packages, Prisma client, and TypeScript for improved performance and features.
- Added new script commands for security audits and checks in package.json.
- Enhanced pnpm workspace configuration to include only built dependencies for better management.
- Refactored test cases to improve type handling and ensure compatibility with updated dependencies.
- Cleaned up package.json files across applications to maintain consistency and clarity in dependency management.
2025-12-10 13:38:16 +09:00
barsa
29ad4236d6 Enhance development scripts and update package dependencies
- Added a new script command `dev:studio` to facilitate studio management in development.
- Updated the Prisma dependency in BFF package to version 6.16.0 for improved features and bug fixes.
- Refactored Dockerfiles for BFF and Portal to enhance health check mechanisms during startup.
- Removed deprecated WhmcsApiMethodsService to streamline the integration services.
- Cleaned up various components and services in the SIM management module for better maintainability and clarity.
2025-12-02 18:56:38 +09:00
barsa
dc9a5d1448 Remove validation package and update Dockerfiles for BFF and Portal
- Deleted the @customer-portal/validation package to streamline dependencies.
- Updated Dockerfiles for BFF and Portal to reflect changes in package structure and optimize build processes.
- Adjusted import statements in BFF controllers to use the new Zod validation approach.
- Enhanced entrypoint script in BFF to include database and cache readiness checks before application startup.
- Cleaned up .gitignore to ignore unnecessary files and maintain clarity in project structure.
2025-12-02 11:06:54 +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
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
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
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
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
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
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
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