-
Notifications
You must be signed in to change notification settings - Fork 53
/
context.ts
39 lines (37 loc) · 880 Bytes
/
context.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
export module Context {
let contextKeyToStringMap = {
AppInfoId: "AppInfo.Id",
AppInfoVersion: "AppInfo.Version",
DeviceInfoId: "DeviceInfo.Id",
ExtensionLifecycleId: "ExtensionLifecycle.Id",
SessionId: "Session.Id",
UserInfoId: "UserInfo.Id",
UserInfoLanguage: "UserInfo.Language",
AuthType: "AuthType",
BrowserLanguage: "BrowserLanguage",
ClipperType: "ClipperType",
ContentType: "ContentType",
FlightInfo: "FlightInfo",
InPrivateBrowsing: "InPrivateBrowsing",
PageLanguage: "PageLanguage"
};
export enum Custom {
AppInfoId,
AppInfoVersion,
ExtensionLifecycleId,
DeviceInfoId,
SessionId,
UserInfoId,
UserInfoLanguage,
AuthType,
BrowserLanguage,
ClipperType,
ContentType,
FlightInfo,
InPrivateBrowsing,
PageLanguage
}
export function toString(key: Custom): string {
return contextKeyToStringMap[Custom[key]];
}
}