Overview
Part of #658 - Document the new type system and provide migration guidance for developers.
Dependencies
Should be done after most refactoring is complete to ensure accurate documentation.
Documentation Needed
1. Architecture Documentation
2. Developer Guide
3. Migration Guide
4. Maintenance Guide
Documentation Structure
docs/
├── sdk/
│ ├── architecture/
│ │ └── type-system.md
│ ├── guides/
│ │ ├── working-with-types.md
│ │ ├── migration-guide.md
│ │ └── type-patterns.md
│ └── reference/
│ ├── generated-types.md
│ └── type-mappings.md
Example Content
Type System Overview
# SDK Type System
The Admin SDK uses generated TypeScript types from the OpenAPI specification as the single source of truth.
## Why Generated Types?
1. **Consistency**: API and SDK types always match
2. **Automation**: No manual updates needed
3. **Type Safety**: Catches API changes at compile time
## Type Patterns
### Simple Alias
\`\`\`typescript
export type ProviderCredentialDto = components['schemas']['ConduitLLM.Configuration.DTOs.ProviderCredentialDto'];
\`\`\`
### Extended Types
\`\`\`typescript
interface ProviderWithHealth extends ProviderCredentialDto {
healthStatus?: 'healthy' | 'unhealthy';
}
\`\`\`
Definition of Done
Overview
Part of #658 - Document the new type system and provide migration guidance for developers.
Dependencies
Should be done after most refactoring is complete to ensure accurate documentation.
Documentation Needed
1. Architecture Documentation
2. Developer Guide
3. Migration Guide
4. Maintenance Guide
Documentation Structure
Example Content
Type System Overview
Definition of Done