]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(ui-common): derive ClientConfig and AuthenticationConfig from Zod schemas
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 16 Apr 2026 20:22:56 +0000 (22:22 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 16 Apr 2026 20:22:56 +0000 (22:22 +0200)
commit2d81b7ea4c293c833f87d56e05e24023d46efbd1
tree3ddfc646d3792decef29f69c6b569337e3d8c17e
parent42f675715f5cb0c64601d90a49c2c06979671c60
refactor(ui-common): derive ClientConfig and AuthenticationConfig from Zod schemas

Replace two hand-written interfaces in client/types.ts with type aliases
derived from the Zod-inferred UIServerConfigurationSection:
- AuthenticationConfig = NonNullable<UIServerConfigurationSection['authentication']>
- ClientConfig = Omit<UIServerConfigurationSection, 'name'>

This eliminates duplication: protocol/version now carry enum types (Protocol,
ProtocolVersion) instead of loose strings. Update WebSocketClient.test.ts to
use Protocol.UI and ProtocolVersion['0.0.1'] enum values accordingly.
ui/common/src/client/types.ts
ui/common/tests/WebSocketClient.test.ts