2.5 KiB
2.5 KiB
Batch 1 Status - WHMCS Service Files
What Was Done
Fixed 8 files to import from specific domains instead of bare @customer-portal/domain:
- ✅
whmcs.service.ts- Split imports to billing/subscriptions/payments/common - ✅
whmcs-invoice.service.ts- Now imports from billing - ✅
whmcs-subscription.service.ts- Now imports from subscriptions - ✅
whmcs-payment.service.ts- Now imports from payments - ✅
whmcs-transformer-orchestrator.service.ts- Split imports - ✅
whmcs-cache.service.ts- Split imports - ✅
subscriptions.service.ts- Now imports from subscriptions - ⚠️
subscriptions.controller.ts- PARTIALLY fixed
Issues Found
subscriptions.controller.ts Problem
This file imports SIM-related schemas that don't exist in the domain yet:
simTopupRequestSchemasimChangePlanRequestSchemasimCancelRequestSchemasimFeaturesRequestSchema
These schemas exist in the old packages/domain/src/validation/** but haven't been moved to the new domain structure yet.
Missing Schemas/Types Inventory
In SIM domain (@customer-portal/domain/sim):
- ✅ HAS:
SimDetails,SimUsage,SimTopUpHistory(contracts) - ✅ HAS: Provider raw types and request schemas (freebitAccountDetailsRequestSchema, etc.)
- ❌ MISSING: Business-level request schemas (simTopupRequestSchema, simChangePlanRequestSchema, etc.)
- ❌ MISSING: Query schemas (subscriptionQuerySchema, invoiceListQuerySchema - these are in old domain/src/validation)
In Billing domain:
- ✅ HAS:
Invoice,InvoiceList,invoiceSchema,invoiceListSchema - ❌ MISSING:
invoiceListQuerySchema(in old domain/src/validation)
In Subscriptions domain:
- ✅ HAS:
Subscription,SubscriptionList - ❌ MISSING:
subscriptionQuerySchema(in old domain/src/validation)
Type Error Count
- Before batch 1: 91 errors
- After batch 1: 166 errors (increased because I commented out SIM schema imports)
Decision Point
Option A: Create the missing schemas now in the domains
- Add query schemas to billing/subscriptions
- Add business request schemas to sim
- Time: ~30 minutes
Option B: Revert subscriptions.controller.ts changes and continue with other files
- Fix the easy files first
- Come back to subscriptions.controller later
- Time: 5 minutes
Recommendation: Option B - revert this one file, continue with remaining 30 files, then create all missing schemas together in Phase 2.
Next Batch
Continue with remaining ~30 files that use bare @customer-portal/domain imports.