-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Overview
Part of #658 - Refactor virtual key and security interfaces to use generated types as source of truth.
Scope
Refactor the following files to use generated types:
models/virtualKey.ts(15 interfaces)models/security.ts(8 interfaces)models/securityExtended.ts(17 interfaces)models/ipFilter.ts(17 interfaces)
Total: ~57 interfaces
Dependencies
- Should be done after validation framework (Create type validation framework for SDK types #661) is in place
Current State Example
// models/virtualKey.ts
export interface VirtualKeyDto {
id: string;
name: string;
value: string;
isEnabled: boolean;
// ... more fields
}Implementation Considerations
- Security-Sensitive Types: These types handle API keys and security rules
- Naming Overlap: Both
security.tsandsecurityExtended.tsmay have overlapping types - WebUI Dependencies: Virtual keys are heavily used in the UI
Implementation Steps
- Map all 57 interfaces to generated equivalents
- Identify security-specific validations needed
- Convert in order:
-
security.ts(8 interfaces - smallest) -
virtualKey.ts(15 interfaces) -
ipFilter.ts(17 interfaces) -
securityExtended.ts(17 interfaces)
-
- Update service imports
- Special attention to security type validations
- Build and test
Special Security Considerations
- Ensure sensitive fields remain properly typed (e.g., API keys as strings)
- Validate that security rules maintain correct structure
- Check that IP filter validations remain intact
Validation
- Type validation tests pass
- Security-specific type tests added
- SDK builds successfully
- WebUI builds successfully
- Virtual key management UI works correctly
Definition of Done
- All 57 interfaces converted
- Security validations maintained
- Type tests added
- PR security-reviewed
- Merged to dev branch