140 Commits

Author SHA1 Message Date
T. Narantuya
06009bd2d5 Enhance ApiClient with error handling and flexible HTTP methods. Introduce ApiError class for better error management, normalize base URL resolution from environment variables, and update createClient function to support custom error handling and authorization middleware. 2025-09-19 12:57:39 +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
a4119a2db8
Merge pull request #13 from NTumurbars/codex/update-auth-token-structure-and-consumers
Refine auth token handling
2025-09-18 16:45:57 +09:00
NTumurbars
69aee3b08e
Merge branch 'ver2' into codex/update-auth-token-structure-and-consumers 2025-09-18 16:45:11 +09:00
NTumurbars
ff0dfa1021
Merge pull request #14 from NTumurbars/codex/update-password-reset-endpoint-calls
Update password reset endpoint and add verification script
2025-09-18 16:42:58 +09:00
NTumurbars
d25fbdd2a8
Merge pull request #12 from NTumurbars/codex/refactor-app-structure-into-route-groups
refactor: layer portal routes through feature modules
2025-09-18 16:42:37 +09:00
NTumurbars
14c095d875
Merge pull request #11 from NTumurbars/codex/decide-format-for-authtokens.expiresat
Normalize auth token expiry representation
2025-09-18 16:42:17 +09:00
NTumurbars
4ef8a6057d Update password reset endpoint and add verification script 2025-09-18 16:40:49 +09:00
NTumurbars
e9dc9a93f6 Refine auth token handling 2025-09-18 16:40:43 +09:00
NTumurbars
e9acbd899c refactor: layer portal routes through feature modules 2025-09-18 16:39:57 +09:00
NTumurbars
0749bb1fa0 Normalize auth token expiry handling 2025-09-18 16:39:18 +09:00
NTumurbars
39b7e796f8
Merge pull request #9 from NTumurbars/codex/extend-api-client-for-auth-header-os9pej
refactor: unify api client usage around openapi client
2025-09-18 16:38:52 +09:00
NTumurbars
a9f7aa5403
Merge branch 'ver2' into codex/extend-api-client-for-auth-header-os9pej 2025-09-18 16:38:32 +09:00
Cursor Agent
b6e50df81d Fix: Clear auth state when no user data is returned
Co-authored-by: tumurbarsnarantuya <tumurbarsnarantuya@gmail.com>
2025-09-18 07:29:49 +00:00
NTumurbars
fcc5872fda refactor: unify api client usage around openapi client 2025-09-18 16:23:56 +09:00
NTumurbars
143aad11d8
Merge pull request #8 from NTumurbars/codex/extend-api-client-for-auth-header
refactor: simplify api client auth integration
2025-09-18 16:04:55 +09:00
NTumurbars
3242f49ce7 refactor: simplify api client auth integration 2025-09-18 16:00:20 +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
ed32a38804
Merge pull request #7 from NTumurbars/codex/temporarily-remove-casesmodule-and-jobsmodule
Temporarily disable unfinished cases and jobs modules
2025-09-18 15:26:16 +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
001de16e38 Add domain types and utilities for customer portal
- Introduced new TypeScript types for catalog products, including Internet, SIM, and VPN plans, along with their respective addons and installation options.
- Created a new domain package with essential configurations, including package.json and tsconfig.json for TypeScript support.
- Added common types and utility functions for type safety and data handling across the application.
- Established a structured export pattern for domain types, enhancing organization and accessibility for future development.
2025-09-17 18:43:31 +09:00
T. Narantuya
449ec05d47 script 2025-09-11 17:11:58 +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
86cd636b87 Refactor OrderStatusPage and SimChangePlanPage for improved readability and functionality
- Removed duplicate text and unnecessary comments in OrderStatusPage for cleaner code.
- Moved the status section to the top for better user experience.
- Simplified the handling of item types in SimChangePlanPage and added new state variables for global IP assignment and scheduling.
- Streamlined form submission and error handling in SimChangePlanPage, enhancing user feedback.
2025-09-11 16:21:47 +09:00
NTumurbars
4686bce071
Merge pull request #5 from NTumurbars/Tema-v1
Tema v1
2025-09-11 15:07:22 +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
59cf55ae95 Refactor layout components and enforce import restrictions in portal pages
- Removed direct imports of DashboardLayout from various portal pages to enforce the use of shared layout components.
- Introduced ESLint rules to prevent importing DashboardLayout directly in (portal) pages, encouraging the use of the shared route-group layout.
- Updated navigation methods to utilize Next.js router instead of window.location for improved routing consistency.
- Enhanced loading states and error handling across multiple pages for better user experience.
2025-09-11 14:23:33 +09:00
T. Narantuya
deae9c0520 Add new pages for billing, profile, invoices, payments, catalog, subscriptions, and support
- Introduced new components for billing and address management, including a detailed billing information page.
- Created profile management page for user details and password changes.
- Added invoice management page with pagination and search functionality.
- Implemented payment methods page for managing user payment options.
- Developed catalog pages for internet, SIM, and VPN services, including configuration options.
- Established subscription management pages for viewing and managing user subscriptions.
- Created support case management pages for users to view and create support cases.
2025-09-11 14:23:27 +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