refactor(entitlements): migrate type-only consumers to entitlements/types (#879)

Follows the Phase 1 EntitlementProvider abstraction. Two files
imported tier types from services/LicenseService via the back-compat
re-export added in Phase 1; this PR points them at the canonical
location at entitlements/types and drops the re-export block.

Migrated:
  - backend/src/types/express.ts
  - backend/src/routes/dashboard.ts

After this PR, services/LicenseService.ts has no public type re-
exports. The remaining imports of services/LicenseService are:
  - entitlements/loadProvider.ts: runtime import of the
    LicenseService class itself, the intentional Phase 1 binding
    site.
  - __tests__/license-service-id-validation.test.ts: imports
    SENCHO_LS_* catalog constants and resolveSenchoVariantFromMeta;
    these are LemonSqueezy-implementation-specific and stay in
    services/LicenseService until Phase 2 moves the file to
    @studio-saelix/sencho-pro.

Phase 2's deletion of services/LicenseService.ts now requires zero
public-core consumer changes outside the loader and the LS-specific
test file.

Test results: 89/89 backend test files clean, 1657 passing tests, 5
pre-existing skips, plus the same pre-existing database-metrics
stress test flake under parallel load that consistently passes solo.
This commit is contained in:
Anso
2026-05-02 05:21:26 -04:00
committed by GitHub
parent 3324616e59
commit 4b18109286
3 changed files with 5 additions and 13 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import type { UserRole, ApiTokenScope } from '../services/DatabaseService';
import type { LicenseTier, LicenseVariant } from '../services/LicenseService';
import type { LicenseTier, LicenseVariant } from '../entitlements/types';
// Extend Express Request type for user and node context.
// This file is imported for its side effects only (ambient declaration).