export const SHOW_NOTIFICATION = 'RA/SHOW_NOTIFICATION' ; export type NotificationType = 'success' | 'info' | 'warning' | 'error' ; export interface NotificationOptions { autoHideDuration ? : number ; messageArgs ? : any ; multiLine ? : boolean ; undoable ? : boolean ; } export interface NotificationPayload { readonly message : string ; readonly type : NotificationType ; readonly notificationOptions ? : NotificationOptions ; } export interface ShowNotificationAction { readonly type : typeof SHOW_NOTIFICATION ; readonly payload : NotificationPayload ; } see https see https export const showNotification = ( message , type = 'info' , notificationOptions ? ) : ShowNotificationAction => ( { type : SHOW_NOTIFICATION , payload : { ... notificationOptions , type , message , } , } ) ; export const HIDE_NOTIFICATION = 'RA/HIDE_NOTIFICATION' ; export interface HideNotificationAction { readonly type : typeof HIDE_NOTIFICATION ; } export const hideNotification = ( ) : HideNotificationAction => ( { type : HIDE_NOTIFICATION , } ) ; export const RESET_NOTIFICATION = 'RA/RESET_NOTIFICATION' ; export interface ResetNotificationAction { readonly type : typeof RESET_NOTIFICATION ; } export const resetNotification = ( ) : ResetNotificationAction => ( { type : RESET_NOTIFICATION , } ) ;