Skip to content

Refactor remaining model interfaces to use generated types #664

@nickna

Description

@nickna

Overview

Part of #658 - Refactor all remaining model interfaces to use generated types as source of truth.

Scope

Refactor the remaining model files:

  • models/system.ts (28 interfaces)
  • models/settings.ts (14 interfaces)
  • models/modelCost.ts (13 interfaces)
  • models/modelMapping.ts (12 interfaces)
  • models/databaseBackup.ts (12 interfaces)
  • models/signalr.ts (11 interfaces)
  • models/audioConfiguration.ts (14 interfaces)
  • models/notifications.ts (3 interfaces)
  • models/metadata.ts (10 interfaces)
  • models/common-types.ts (14 interfaces)
  • And any other remaining files

Total: ~131+ interfaces

Dependencies

  • Should be done after core refactorings are complete and proven

Implementation Strategy

Since this is a large group of miscellaneous interfaces, organize by functional area:

Group 1: System & Infrastructure

  • system.ts
  • databaseBackup.ts
  • signalr.ts

Group 2: Configuration & Settings

  • settings.ts
  • audioConfiguration.ts
  • metadata.ts

Group 3: Business Logic

  • modelCost.ts
  • modelMapping.ts
  • notifications.ts

Group 4: Common/Shared

  • common-types.ts
  • Any remaining files

Implementation Steps

  1. Complete inventory of remaining interfaces
  2. Group by functional area for easier review
  3. Convert each group:
    • System & Infrastructure types
    • Configuration & Settings types
    • Business Logic types
    • Common/Shared types
  4. Update all service imports
  5. Run comprehensive type validation
  6. Full SDK and WebUI build test

Special Considerations

  • common-types.ts may have types used across many files
  • Some types might be purely client-side constructs
  • Watch for circular dependencies

Validation

  • All remaining interfaces converted
  • Type validation suite passes
  • SDK builds without warnings
  • WebUI builds and runs correctly
  • No TypeScript errors in IDE

Definition of Done

  • All model files use generated types
  • No manual interface duplication remains
  • All tests pass
  • Documentation updated
  • PR reviewed and merged

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions