@@ -14,10 +14,6 @@ declare const __brand: unique symbol;
1414
1515type Brand < B > = { [ __brand ] : B } ;
1616
17- export interface AuthState {
18- accounts : Account [ ] ;
19- }
20-
2117export type Branded < T , B > = T & Brand < B > ;
2218
2319export type AuthCode = Branded < string , 'AuthCode' > ;
@@ -48,29 +44,49 @@ export interface Account {
4844 hasRequiredScopes ?: boolean ;
4945}
5046
51- export type SettingsValue =
47+ /**
48+ * All allowed Config and Filter Settings values to be stored in the application.
49+ */
50+ export type SettingsValue = ConfigSettingsValue | FilterSettingsValue [ ] ;
51+
52+ /**
53+ * All Config Settings values to be stored in the application.
54+ */
55+ export type ConfigSettingsValue =
5256 | boolean
5357 | number
5458 | FetchType
55- | FilterValue [ ]
5659 | GroupBy
5760 | OpenPreference
5861 | Percentage
5962 | Theme ;
6063
61- export type FilterValue =
64+ /**
65+ * All Filter Settings values to be stored in the application.
66+ */
67+ export type FilterSettingsValue =
6268 | FilterStateType
6369 | Reason
6470 | SearchToken
6571 | SubjectType
6672 | UserType ;
6773
68- export type SettingsState = AppearanceSettingsState &
74+ /**
75+ * All allowed Config and Filter Settings keys to be stored in the application.
76+ */
77+ export type SettingsState = ConfigSettingsState & FilterSettingsState ;
78+
79+ /**
80+ * All Config Settings keys to be stored in the application.
81+ */
82+ export type ConfigSettingsState = AppearanceSettingsState &
6983 NotificationSettingsState &
7084 TraySettingsState &
71- SystemSettingsState &
72- FilterSettingsState ;
85+ SystemSettingsState ;
7386
87+ /**
88+ * Settings related to the appearance of the application.
89+ */
7490export interface AppearanceSettingsState {
7591 theme : Theme ;
7692 increaseContrast : boolean ;
@@ -79,6 +95,9 @@ export interface AppearanceSettingsState {
7995 wrapNotificationTitle : boolean ;
8096}
8197
98+ /**
99+ * Settings related to the notifications within the application.
100+ */
82101export interface NotificationSettingsState {
83102 groupBy : GroupBy ;
84103 fetchType : FetchType ;
@@ -93,12 +112,18 @@ export interface NotificationSettingsState {
93112 delayNotificationState : boolean ;
94113}
95114
115+ /**
116+ * Settings related to the tray / menu bar behavior.
117+ */
96118export interface TraySettingsState {
97119 showNotificationsCountInTray : boolean ;
98120 useUnreadActiveIcon : boolean ;
99121 useAlternateIdleIcon : boolean ;
100122}
101123
124+ /**
125+ * Settings related to the system behavior of the application.
126+ */
102127export interface SystemSettingsState {
103128 openLinks : OpenPreference ;
104129 keyboardShortcut : boolean ;
@@ -108,6 +133,9 @@ export interface SystemSettingsState {
108133 openAtStartup : boolean ;
109134}
110135
136+ /**
137+ * Settings related to the filtering of notifications within the application.
138+ */
111139export interface FilterSettingsState {
112140 filterIncludeSearchTokens : SearchToken [ ] ;
113141 filterExcludeSearchTokens : SearchToken [ ] ;
@@ -117,6 +145,10 @@ export interface FilterSettingsState {
117145 filterReasons : Reason [ ] ;
118146}
119147
148+ export interface AuthState {
149+ accounts : Account [ ] ;
150+ }
151+
120152export interface GitifyState {
121153 auth ?: AuthState ;
122154 settings ?: SettingsState ;
0 commit comments