Medium refactoring

Summary:
Simplifies medium usage. Clients report this value as an integer. Internally, we transform this integer as type (a set of valid strings).

Instead of transform this value in different places, do it once when the client query is received.

Reviewed By: antonk52

Differential Revision: D46358024

fbshipit-source-id: ecd2b6c6ccbe7c38787a89d4e2f81930c7b91864
This commit is contained in:
Lorenzo Blasa
2023-06-02 03:59:15 -07:00
committed by Facebook GitHub Bot
parent 3607b7f996
commit 2f9e633fad
15 changed files with 84 additions and 41 deletions

View File

@@ -30,6 +30,7 @@ import {LoggerInfo} from './utils/Logger';
// Since flipper-plugin however is currently shared among server, client and defines a lot of base types, leaving it here for now.
export type FlipperServerType = 'embedded' | 'external';
export type CertificateExchangeMedium = 'FS_ACCESS' | 'WWW' | 'NONE';
export type FlipperServerState =
| 'pending'
@@ -87,6 +88,7 @@ export type ClientQuery = {
readonly device: string;
readonly device_id: string;
readonly sdk_version?: number;
medium: CertificateExchangeMedium;
rsocket?: boolean;
};