[identity] Add metadata parser for PlatformDetails
Summary:
Reasoning in D12269 - we want to pass full PlatformDetails with Identity requests metadata, not only platform and code version.
Decided to introduce PlatformMetadata struct which accepts device type as string.
This is needed for custom device types (like "service") which are valid identity clients, but not valid devices for registration.
Parsing is handled in the next diff
Depends on D12269
Test Plan:
- Modified web client to introduce additional metadata in CodeVersionLayer.
- Verified that calling get_platform_metadata() retrieve these params.
- Verified that None is returned for state version and desktop version when not provided.
Reviewers: marcin, varun, will
Reviewed By: marcin
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D12270