-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
41 lines (34 loc) · 1.15 KB
/
types.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
type GmailLabel = GoogleAppsScript.Gmail.GmailLabel;
type GmailMessage = GoogleAppsScript.Gmail.GmailMessage;
type GmailThread = GoogleAppsScript.Gmail.GmailThread;
interface Actions {
read: "Immediately" | false = false;
archive: "Immediately" | "WhenRead" | false = false;
}
interface ThreadScreenState {
thread: GmailThread;
// Actions
mutexLabels?: GmailLabel[] = undefined;
labelsToApply?: {
mutex: GmailLabel[];
other: GmailLabel[];
};
unmergedActions?: Actions[] = undefined;
actionsToApply?: Actions;
// Thread info
threadFirstMessage?: GmailMessage;
threadFirstMessageIsSent?: boolean = undefined;
threadContactAddress?: string = undefined;
threadLabels?: GmailLabel[] = undefined;
threadIsRead?: boolean = undefined;
threadIsStarred?: boolean = undefined;
// Reference threads info
referenceThreads?: GmailThread[] = undefined;
referenceThread?: GmailThread = undefined;
referenceLabels?: GmailLabel[] = undefined;
// Contact threads info
toContactThreads?: GmailThread[] = undefined;
}
type S<T extends keyof ThreadScreenState = never> =
//
ThreadScreenState & Record<T, NonNullable<ThreadScreenState[T]>>;