diff --git a/backend/src/routes/dashboard.ts b/backend/src/routes/dashboard.ts index e0b12c9a..5a5c722f 100644 --- a/backend/src/routes/dashboard.ts +++ b/backend/src/routes/dashboard.ts @@ -3,7 +3,7 @@ import { DatabaseService } from '../services/DatabaseService'; import { CloudBackupService } from '../services/CloudBackupService'; import { authMiddleware } from '../middleware/auth'; import { effectiveTier, effectiveVariant } from '../middleware/tierGates'; -import type { LicenseTier, LicenseVariant } from '../services/LicenseService'; +import type { LicenseTier, LicenseVariant } from '../entitlements/types'; export const dashboardRouter = Router(); diff --git a/backend/src/services/LicenseService.ts b/backend/src/services/LicenseService.ts index 1166a087..c33d60ca 100644 --- a/backend/src/services/LicenseService.ts +++ b/backend/src/services/LicenseService.ts @@ -10,14 +10,6 @@ import type { SeatLimits, } from '../entitlements/types'; -// Back-compat re-exports. The canonical type definitions live in -// `entitlements/types.ts`; this re-export keeps existing imports -// (`import type { LicenseTier } from '@/services/LicenseService'`) -// working until consumers migrate. A follow-up PR titled -// `refactor(entitlements): migrate type-only consumers to entitlements/types` -// will sweep the remaining ~20 consumers; Phase 2 deletes this file. -export type { LicenseInfo, LicenseStatus, LicenseTier, LicenseVariant, SeatLimits }; - // Header constants and tier/variant normalizers previously exported // from this file moved to `../entitlements/headers` and // `../entitlements/normalize` respectively, where they live in the @@ -25,9 +17,9 @@ export type { LicenseInfo, LicenseStatus, LicenseTier, LicenseVariant, SeatLimit // LicenseService imports them back for internal use. import { isLicenseVariant, normalizeVariant } from '../entitlements/normalize'; -// LicenseInfo and SeatLimits live in `entitlements/types.ts` and are -// re-exported above. The literal seat-limit table for paid variants -// stays here because it is specific to the LemonSqueezy implementation. +// The seat-limit table for paid variants is specific to the +// LemonSqueezy implementation and stays in this file. Phase 2 moves it +// to `@studio-saelix/sencho-pro` along with the rest of the file. const SEAT_LIMITS: Record = { skipper: { maxAdmins: 1, maxViewers: 3 }, admiral: { maxAdmins: null, maxViewers: null }, diff --git a/backend/src/types/express.ts b/backend/src/types/express.ts index 0efe577e..d9ca10fe 100644 --- a/backend/src/types/express.ts +++ b/backend/src/types/express.ts @@ -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).