17782: Fixes 'no-mixed-operators' compile warnings.
[arvados.git] / src / store / snackbar / snackbar-actions.ts
index dd34895f77c1d7bfa92ffae94e385329d1c2fbef..c04371543f34058ca39ee54f091889baf6367675 100644 (file)
@@ -2,18 +2,26 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { unionize, ofType, UnionOf } from "~/common/unionize";
+import { unionize, ofType, UnionOf } from "common/unionize";
+
+export interface SnackbarMessage {
+    message: string;
+    hideDuration: number;
+    kind: SnackbarKind;
+    link?: string;
+}
 
 export enum SnackbarKind {
-    SUCCESS,
-    ERROR,
-    INFO,
-    WARNING
+    SUCCESS = 1,
+    ERROR = 2,
+    INFO = 3,
+    WARNING = 4
 }
 
 export const snackbarActions = unionize({
-    OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number, kind?: SnackbarKind}>(),
-    CLOSE_SNACKBAR: ofType<{}>()
+    OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number, kind?: SnackbarKind, link?: string}>(),
+    CLOSE_SNACKBAR: ofType<{}>(),
+    SHIFT_MESSAGES: ofType<{}>()
 });
 
 export type SnackbarAction = UnionOf<typeof snackbarActions>;