-
Notifications
You must be signed in to change notification settings - Fork 36
/
RuntimeMessage.d.ts
130 lines (108 loc) · 3.92 KB
/
RuntimeMessage.d.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
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
125
126
127
128
129
130
namespace RuntimeMessage {
interface DkimMessage {
readonly module: string;
readonly method: string;
}
namespace SignRules {
interface SignRulesMessage extends DkimMessage {
readonly module: "SignRules";
}
interface getDefaultRules extends SignRulesMessage {
readonly method: "getDefaultRules";
}
interface getUserRules extends SignRulesMessage {
readonly method: "getUserRules";
}
interface exportUserRules extends SignRulesMessage {
readonly method: "exportUserRules";
}
interface importUserRules extends SignRulesMessage {
readonly method: "importUserRules";
readonly parameters: {
readonly data: any,
readonly replace: boolean,
}
}
interface addRule extends SignRulesMessage {
readonly method: "addRule";
readonly parameters: {
readonly domain: string?,
readonly listId: string?,
readonly addr: string,
readonly sdid: string,
readonly type: type,
readonly priority: number?,
readonly enabled: boolean,
}
}
interface updateRule extends SignRulesMessage {
readonly method: "updateRule";
readonly parameters: {
readonly id: number,
readonly propertyName: string,
readonly newValue: any,
}
}
interface deleteRules extends SignRulesMessage {
readonly method: "deleteRules";
readonly parameters: {
readonly ids: number[],
}
}
type Messages = getDefaultRules | getUserRules | exportUserRules | importUserRules | addRule | updateRule | deleteRules;
}
namespace KeyDb {
interface KeyDbMessage extends DkimMessage {
readonly module: "KeyDb";
}
interface getKeys extends KeyDbMessage {
readonly method: "getKeys";
}
interface updateKey extends KeyDbMessage {
readonly method: "updateKey";
readonly parameters: {
readonly id: number;
readonly propertyName: string;
readonly newValue: any;
}
}
interface deleteKeys extends KeyDbMessage {
readonly method: "deleteKeys";
readonly parameters: {
readonly ids: number[];
}
}
type Messages = getKeys | updateKey | deleteKeys;
}
namespace DisplayAction {
interface DisplayActionMessage extends DkimMessage {
readonly module: "DisplayAction";
readonly parameters: {
readonly tabId: number;
}
}
interface queryButtonState extends DisplayActionMessage {
readonly method: "queryButtonState";
}
interface queryButtonStateResult {
readonly reverifyDKIMSignature: boolean;
readonly policyAddUserException: boolean;
readonly markKeyAsSecure: boolean;
readonly updateKey: boolean;
}
interface reverifyDKIMSignature extends DisplayActionMessage {
readonly method: "reverifyDKIMSignature";
}
interface policyAddUserException extends DisplayActionMessage {
readonly method: "policyAddUserException";
}
interface markKeyAsSecure extends DisplayActionMessage {
readonly method: "markKeyAsSecure";
}
interface updateKey extends DisplayActionMessage {
readonly method: "updateKey";
}
type Messages = queryButtonState | reverifyDKIMSignature | policyAddUserException | markKeyAsSecure | updateKey;
}
type Messages = SignRules.Messages | KeyDb.Messages | DisplayAction.Messages;
}