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