Merge branch '19051-handle-quotes-in-search' into main
[arvados-workbench2.git] / src / store / snackbar / snackbar-actions.ts
index 55d9f3a8651b86afecc516aa48dc1af0abc412e1..c04371543f34058ca39ee54f091889baf6367675 100644 (file)
@@ -2,11 +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 = 1,
+    ERROR = 2,
+    INFO = 3,
+    WARNING = 4
+}
 
 export const snackbarActions = unionize({
-    OPEN_SNACKBAR: ofType<{message: string; hideDuration?: number}>(),
-    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>;