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