Generated Types
When you runatmn pull, the CLI generates @useautumn-sdk.d.ts with strongly-typed interfaces based on your actual features and plans.
File Generation
Type Safety Benefits
Feature Tracking
Without types, you might accidentally use wrong feature IDs:Plan Management
Customer Data Access
Generation Process
Multi-Environment Merging
The CLI intelligently merges features and plans from both environments to create comprehensive types:- Fetch from Sandbox: Gets all features/plans from sandbox environment
- Fetch from Production: Gets all features/plans from production environment
- Merge & Deduplicate: Combines both sets, removing duplicates by ID
- Generate Types: Creates union types from all unique IDs
Configuration Parsing
The generation process:IDE Integration
IntelliSense Support
Modern editors provide excellent support for the generated types:- Autocomplete: Feature and plan IDs are suggested as you type
- Error Detection: Invalid IDs are highlighted immediately
- Documentation: Hover to see feature names and descriptions
- Refactoring: Rename features safely across your codebase
VSCode Example
Advanced Usage
Custom Type Extensions
Extend the generated types for your specific needs:Runtime Validation
Combine types with runtime validation:Keeping Types in Sync
Development Workflow
- Modify Configuration: Edit your
autumn.config.ts - Push Changes:
atmn pushto update Autumn - Pull Types:
atmn pullto regenerate types - Fix Errors: Address any TypeScript errors in your code
Automated Sync
For CI/CD pipelines:Type Drift Detection
Catch when your code uses outdated feature/plan IDs:Configuration Options
Disable Type Generation
If you don’t want automatic type generation:Custom Output Path
Change where types are generated:Troubleshooting
Types Not Updating
If types aren’t reflecting your changes:TypeScript Errors
Common issues and solutions:Missing Types
If features/plans are missing from types:- Check Environment: Ensure you’re pulling from the right environment
- Verify Push: Make sure your config was successfully pushed
- Force Regeneration: Use
atmn pull --forceto rebuild types

