aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores.types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores.types.ts')
-rw-r--r--src/stores.types.ts378
1 files changed, 378 insertions, 0 deletions
diff --git a/src/stores.types.ts b/src/stores.types.ts
new file mode 100644
index 000000000..66c8e9b85
--- /dev/null
+++ b/src/stores.types.ts
@@ -0,0 +1,378 @@
1export interface FerdiStores {
2 app: AppStore;
3 communityRecipes: CommunityRecipesStore;
4 features: FeaturesStore;
5 globalError: GlobalErrorStore;
6 news: NewsStore;
7 recipePreviews: RecipePreviewsStore;
8 recipes: RecipeStore;
9 requests: RequestsStore;
10 router: RouterStore;
11 services: ServicesStore;
12 settings: SettingsStore;
13 todos: TodosStore;
14 ui: UIStore;
15 user: UserStore;
16 workspaces: WorkspacesStore;
17}
18
19interface Stores {
20 app: AppStore;
21 communityRecipes: CommunityRecipesStore;
22 features: FeaturesStore;
23 globalError: GlobalErrorStore;
24 news: NewsStore;
25 recipePreviews: RecipePreviewsStore;
26 recipes: RecipeStore;
27 requests: RequestsStore;
28 router: RouterStore;
29 services: ServicesStore;
30 settings: SettingsStore;
31 todos: TodosStore;
32 ui: UIStore;
33 user: UserStore;
34 workspaces: WorkspacesStore;
35}
36
37interface Actions {
38 app: AppStore;
39 news: NewsStore;
40 recipePreviews: RecipePreviewsStore;
41 recipes: RecipeStore;
42 requests: RequestsStore;
43 services: ServicesStore;
44 settings: SettingsStore;
45 todos: TodosStore;
46 ui: UIStore;
47 user: UserStore;
48 workspaces: WorkspacesStore;
49}
50
51interface Api {
52 app: AppStore;
53 features: FeaturesStore;
54 local: {};
55 news: NewsStore;
56 recipePreviews: RecipePreviewsStore;
57 recipes: RecipeStore;
58 services: ServicesStore;
59 user: UserStore;
60}
61
62interface AppStore {
63 actions: Actions;
64 accentColor: string;
65 api: Api;
66 authRequestFailed: () => void;
67 autoLaunchOnStart: () => void;
68 clearAppCacheRequest: () => void;
69 dictionaries: [];
70 fetchDataInterval: 4;
71 getAppCacheSizeRequest: () => void;
72 healthCheckRequest: () => void;
73 isClearingAllCache: () => void;
74 isFocused: () => void;
75 isFullScreen: () => void;
76 isOnline: () => void;
77 isSystemDarkModeEnabled: () => void;
78 isSystemMuteOverridden: () => void;
79 locale: () => void;
80 stores: Stores;
81 timeOfflineStart: () => void;
82 timeSuspensionStart: () => void;
83 updateStatus: () => void;
84 updateStatusTypes: {
85 CHECKING: 'CHECKING';
86 AVAILABLE: 'AVAILABLE';
87 NOT_AVAILABLE: 'NOT_AVAILABLE';
88 DOWNLOADED: 'DOWNLOADED';
89 FAILED: 'FAILED';
90 };
91 _reactions: any[];
92 _status: () => void;
93 actionStatus: () => void;
94 cacheSize: () => void;
95 debugInfo: () => void;
96}
97
98interface CommunityRecipesStore {
99 actions: Actions;
100 stores: Stores;
101 _actions: [];
102 _reactions: [];
103 communityRecipes: () => void;
104}
105
106interface FeaturesStore {
107 actions: Actions;
108 api: Api;
109 defaultFeaturesRequest: () => void;
110 features: () => void;
111 featuresRequest: () => void;
112 stores: Stores;
113 _reactions: any[];
114 _status: () => void;
115 _updateFeatures: () => void;
116 actionStatus: () => void;
117 anonymousFeatures: () => void;
118}
119
120interface GlobalErrorStore {
121 actions: Actions;
122 api: Api;
123 error: () => void;
124 messages: () => void;
125 response: () => void;
126 stores: Stores;
127 _handleRequests: () => void;
128 _reactions: [];
129 _status: () => void;
130 actionStatus: () => void;
131}
132
133interface NewsStore {
134 actions: Actions;
135 api: Api;
136 hideNewsRequest: () => void;
137 latestNewsRequest: () => void;
138 stores: Stores;
139 _reactions: [];
140 _status: () => void;
141 actionStatus: () => void;
142 latest: () => void;
143}
144
145interface RecipePreviewsStore {
146 actions: Actions;
147 allRecipePreviewsRequest: () => void;
148 api: Api;
149 searchRecipePreviewsRequest: () => void;
150 stores: Stores;
151 _reactions: [];
152 _status: () => void;
153 actionStatus: () => void;
154 all: () => void;
155 dev: () => void;
156 searchResults: () => void;
157}
158
159interface RecipeStore {
160 actions: Actions;
161 allRecipesRequest: () => void;
162 api: Api;
163 getRecipeUpdatesRequest: () => void;
164 installRecipeRequest: () => void;
165 stores: Stores;
166 _reactions: any[];
167 _status: () => void;
168 actionStatus: () => void;
169 active: () => void;
170 all: () => void;
171 recipeIdForServices: () => void;
172}
173
174interface RequestsStore {
175 actions: Actions;
176 api: Api;
177 localServerPort: () => void;
178 retries: number;
179 retryDelay: number;
180 servicesRequest: () => void;
181 showRequiredRequestsError: () => void;
182 stores: Stores;
183 userInfoRequest: () => void;
184 _reactions: any[];
185 _status: () => void;
186 actionStatus: () => void;
187 areRequiredRequestsLoading: () => void;
188 areRequiredRequestsSuccessful: () => void;
189}
190
191interface RouterStore {
192 go: () => void;
193 goBack: () => void;
194 goForward: () => void;
195 history: () => void;
196 location: () => void;
197 push: () => void;
198 replace: () => void;
199}
200
201interface ServicesStore {
202 actions: Actions;
203 api: Api;
204 clearCacheRequest: () => void;
205 createServiceRequest: () => void;
206 deleteServiceRequest: () => void;
207 filterNeedle: () => void;
208 lastUsedServices: () => void;
209 reorderServicesRequest: () => void;
210 serviceMaintenanceTick: () => void;
211 stores: Stores;
212 updateServiceRequest: () => void;
213 _reactions: any[];
214 _status: () => void;
215 actionStatus: () => void;
216 active: () => void;
217 activeSettings: () => void;
218 all: () => void;
219 allDisplayed: () => void;
220 allDisplayedUnordered: () => void;
221 enabled: () => void;
222 filtered: () => void;
223 isTodosServiceActive: () => void;
224 isTodosServiceAdded: () => void;
225}
226
227interface SettingsStore {
228 actions: Actions;
229 api: Api;
230 fileSystemSettingsTypes: any[];
231 startup: boolean;
232 stores: Stores;
233 updateAppSettingsRequest: () => void;
234 _fileSystemSettingsCache: () => void;
235 _reactions: [];
236 _status: () => void;
237 actionStatus: () => void;
238 all: () => void;
239 app: AppStore;
240 migration: () => void;
241 proxy: () => void;
242 service: ServicesStore;
243 stats: () => void;
244}
245
246interface TodosStore {
247 actions: Actions;
248 api: Api;
249 isFeatureActive: () => void;
250 isFeatureEnabled: () => void;
251 isInitialized: true;
252 stores: Stores;
253 userAgentModel: () => void;
254 webview: () => void;
255 _actions: any[];
256 _allReactions: any[];
257 _firstLaunchReaction: () => void;
258 _goToService: () => void;
259 _handleNewWindowEvent: () => void;
260 _onTodosClientInitialized: () => void;
261 _openDevTools: () => void;
262 _reactions: any[];
263 _reload: () => void;
264 _routeCheckReaction: () => void;
265 _setFeatureEnabledReaction: () => void;
266 _updateSettings: () => void;
267 _updateTodosConfig: () => void;
268 isFeatureEnabledByUser: () => void;
269 isTodoUrlValid: () => void;
270 isTodosPanelForceHidden: () => void;
271 isTodosPanelVisible: () => void;
272 isUsingPredefinedTodoServer: () => void;
273 settings: () => void;
274 todoRecipeId: () => void;
275 todoUrl: () => void;
276 userAgent: () => void;
277 width: () => void;
278 _handleClientMessage: () => void;
279 _handleHostMessage: () => void;
280 _resize: () => void;
281 _setTodosWebview: () => void;
282 _toggleTodosFeatureVisibility: () => void;
283 _toggleTodosPanel: () => void;
284}
285
286interface UIStore {
287 actions: Actions;
288 api: Api;
289 isOsDarkThemeActive: () => void;
290 showServicesUpdatedInfoBar: () => void;
291 stores: Stores;
292 _reactions: [];
293 _status: () => void;
294 actionStatus: () => void;
295 isDarkThemeActive: () => void;
296 isSplitModeActive: () => void;
297 showMessageBadgesEvenWhenMuted: () => void;
298 theme: () => void;
299}
300
301interface UserStore {
302 BASE_ROUTE: '/auth';
303 CHANGE_SERVER_ROUTE: '/auth/server';
304 IMPORT_ROUTE: '/auth/signup/import';
305 INVITE_ROUTE: '/auth/signup/invite';
306 LOGIN_ROUTE: '/auth/login';
307 LOGOUT_ROUTE: '/auth/logout';
308 PASSWORD_ROUTE: '/auth/password';
309 SETUP_ROUTE: '/auth/signup/setup';
310 SIGNUP_ROUTE: '/auth/signup';
311 WELCOME_ROUTE: '/auth/welcome';
312 accountType: () => void;
313 actionStatus: () => void;
314 actions: Actions;
315 api: Api;
316 authToken: () => void;
317 deleteAccountRequest: () => void;
318 fetchUserInfoInterval: null;
319 getLegacyServicesRequest: () => void;
320 getUserInfoRequest: () => void;
321 hasCompletedSignup: () => void;
322 id: () => void;
323 inviteRequest: () => void;
324 isImportLegacyServicesCompleted: () => void;
325 isImportLegacyServicesExecuting: () => void;
326 isLoggingOut: () => void;
327 loginRequest: () => void;
328 logoutReason: () => void;
329 logoutReasonTypes: { SERVER: 'SERVER' };
330 passwordRequest: () => void;
331 signupRequest: () => void;
332 stores: Stores;
333 updateUserInfoRequest: () => void;
334 userData: () => void;
335 _reactions: any[];
336 _requireAuthenticatedUser: () => void;
337 _status: () => void;
338 changeServerRoute: () => void;
339 data: () => void;
340 importRoute: () => void;
341 inviteRoute: () => void;
342 isLoggedIn: () => void;
343 isTokenExpired: () => void;
344 legacyServices: () => void;
345 loginRoute: () => void;
346 logoutRoute: () => void;
347 passwordRoute: () => void;
348 setupRoute: () => void;
349 signupRoute: () => void;
350 team: () => void;
351}
352
353interface WorkspacesStore {
354 activeWorkspace: () => void;
355 filterServicesByActiveWorkspace: () => void;
356 isFeatureActive: () => void;
357 isFeatureEnabled: () => void;
358 isSettingsRouteActive: () => void;
359 isSwitchingWorkspace: () => void;
360 isWorkspaceDrawerOpen: () => void;
361 nextWorkspace: () => void;
362 stores: Stores;
363 workspaceBeingEdited: () => void;
364 _actions: any[];
365 _activateLastUsedWorkspaceReaction: () => void;
366 _allActions: any[];
367 _allReactions: any[];
368 _cleanupInvalidServiceReferences: () => void;
369 _getWorkspaceById: () => void;
370 _openDrawerWithSettingsReaction: () => void;
371 _reactions: any[];
372 _setActiveServiceOnWorkspaceSwitchReaction: () => void;
373 _setFeatureEnabledReaction: () => void;
374 _setWorkspaceBeingEditedReaction: () => void;
375 _toggleKeepAllWorkspacesLoadedSetting: () => void;
376 _updateSettings: () => void;
377 _wasDrawerOpenBeforeSettingsRoute: null;
378}