-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
124 lines (124 loc) · 4.2 KB
/
types.d.ts
File metadata and controls
124 lines (124 loc) · 4.2 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
export type SignIn = "signIn";
export type SignOut = "signOut";
export type OemSignOut = "oemSignOut";
export type Troubleshoot = "troubleshoot";
export type Recover = "recover";
export type Replace = "replace";
export type TrialExtend = "trialExtend";
export type TrialStart = "trialStart";
export type Purchase = "purchase";
export type Redeem = "redeem";
export type Renew = "renew";
export type Upgrade = "upgrade";
export type UpdateOs = "updateOs";
export type DowngradeOs = "downgradeOs";
export type Manage = "manage";
export type MyKeys = "myKeys";
export type LinkKey = "linkKey";
export type Activate = "activate";
export type AccountActionTypes = Troubleshoot | SignIn | SignOut | OemSignOut | Manage | MyKeys | LinkKey;
export type AccountKeyActionTypes = Recover | Replace | TrialExtend | TrialStart | UpdateOs | DowngradeOs;
export type PurchaseActionTypes = Purchase | Redeem | Renew | Upgrade | Activate;
export type ServerActionTypes = AccountActionTypes | AccountKeyActionTypes | PurchaseActionTypes;
export type ServerState = "BASIC" | "PLUS" | "PRO" | "TRIAL" | "EEXPIRED" | "ENOKEYFILE" | "EGUID" | "EGUID1" | "ETRIAL" | "ENOKEYFILE2" | "ENOKEYFILE1" | "ENOFLASH" | "ENOFLASH1" | "ENOFLASH2" | "ENOFLASH3" | "ENOFLASH4" | "ENOFLASH5" | "ENOFLASH6" | "ENOFLASH7" | "EBLACKLISTED" | "EBLACKLISTED1" | "EBLACKLISTED2" | "ENOCONN" | "STARTER" | "UNLEASHED" | "LIFETIME" | "STALE" | undefined;
export type ConnectState = "PRE_INIT" | "CONNECTING" | "CONNECTED" | "PING_FAILURE" | "ERROR_RETRYING";
export interface ActivationCodeData {
__typename?: "ActivationCode";
background?: string | null;
code?: string | null;
comment?: string | null;
header?: string | null;
headermetacolor?: string | null;
partnerName?: string | null;
partnerUrl?: string | null;
serverName?: string | null;
showBannerGradient?: boolean | null;
sysModel?: string | null;
theme?: string | null;
}
export interface ServerData {
activationCodeData?: ActivationCodeData | null;
connectPluginVersion?: string;
connectState?: ConnectState;
description?: string;
deviceCount?: number;
expireTime?: number;
flashProduct?: string;
flashVendor?: string;
guid?: string;
keyfile?: string;
locale?: string;
name?: string;
osVersion?: string;
osVersionBranch?: "stable" | "next" | "preview" | "test";
registered: boolean;
regExp?: number;
regUpdatesExpired?: boolean;
regGen?: number;
regGuid?: string;
regTy?: string;
state: ServerState;
wanFQDN?: string;
}
export interface UserInfo {
"custom:ips_id"?: string;
email?: string;
email_verifed?: "true" | "false";
preferred_username?: string;
sub?: string;
username?: string;
identities?: string;
"cognito:groups"?: string[];
}
export interface ExternalSignIn {
type: SignIn;
apiKey: string;
user: UserInfo;
}
export interface ExternalSignOut {
type: SignOut | OemSignOut;
}
export interface ExternalKeyActions {
type: PurchaseActionTypes | AccountKeyActionTypes;
keyUrl: string;
}
export interface ExternalUpdateOsAction {
type: DowngradeOs | UpdateOs;
sha256: string;
}
export interface ServerPayload {
type: ServerActionTypes;
server: ServerData;
}
export interface ServerTroubleshoot {
type: Troubleshoot;
server: ServerData;
}
export type ExternalActions = ExternalSignIn | ExternalSignOut | ExternalKeyActions | ExternalUpdateOsAction;
export type UpcActions = ServerPayload | ServerTroubleshoot;
export type SendPayloads = ExternalActions[] | UpcActions[];
export interface ExternalPayload {
type: "forUpc";
actions: ExternalActions[];
sender: string;
}
export interface UpcPayload {
actions: UpcActions[];
sender: string;
type: "fromUpc";
}
export type QueryPayloads = ExternalPayload | UpcPayload;
export interface WatcherOptions {
baseUrl?: string;
skipCurrentUrl?: boolean;
dataToParse?: string;
}
export interface CallbackConfig {
encryptionKey: string;
/**
* When true (default), encrypted callback data will be placed in the URL hash
* instead of a query parameter to avoid leaking data via referrers.
* Set to false to use a query parameter instead.
*/
useHash?: boolean;
}