UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

59 lines (58 loc) 4.57 kB
import { PayloadAction } from "@reduxjs/toolkit"; import type { UnifiedAppNotification, NotificationTemplates } from "../../interfaces/models/AppNotification"; export interface AppNotificationsState { notifications: UnifiedAppNotification[]; unreadCount: number; loading: boolean; hasMore: boolean; page: number; limit: number; notificationTemplates?: Partial<NotificationTemplates>; currentProjectId?: string; } export declare const appNotificationsSlice: import("@reduxjs/toolkit").Slice<AppNotificationsState, { setProjectContext: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<string>) => void; setLimit: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<number>) => void; setNotificationTemplates: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<Partial<NotificationTemplates>>) => void; resetNotifications: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void; loadMore: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void; setLoading: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<boolean>) => void; addNotifications: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<{ notifications: UnifiedAppNotification[]; isFirstPage?: boolean; }>) => void; markAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<string>) => void; markAllAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void; setUnreadCount: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<number>) => void; handleError: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void; }, "appNotifications", "appNotifications", import("@reduxjs/toolkit").SliceSelectors<AppNotificationsState>>; export declare const setProjectContext: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/setProjectContext">, setLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setLimit">, setNotificationTemplates: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<NotificationTemplates>, "appNotifications/setNotificationTemplates">, resetNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/resetNotifications">, loadMore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/loadMore">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "appNotifications/setLoading">, addNotifications: import("@reduxjs/toolkit").ActionCreatorWithPayload<{ notifications: UnifiedAppNotification[]; isFirstPage?: boolean; }, "appNotifications/addNotifications">, markAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/markAsReadLocally">, markAllAsReadLocally: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/markAllAsReadLocally">, setUnreadCount: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setUnreadCount">, handleError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/handleError">; declare const _default: import("@reduxjs/toolkit").Reducer<AppNotificationsState>; export default _default; export declare const selectAppNotifications: (state: { appNotifications: AppNotificationsState; }) => UnifiedAppNotification[]; export declare const selectUnreadCount: (state: { appNotifications: AppNotificationsState; }) => number; export declare const selectAppNotificationsLoading: (state: { appNotifications: AppNotificationsState; }) => boolean; export declare const selectAppNotificationsHasMore: (state: { appNotifications: AppNotificationsState; }) => boolean; export declare const selectAppNotificationsPage: (state: { appNotifications: AppNotificationsState; }) => number; export declare const selectAppNotificationsLimit: (state: { appNotifications: AppNotificationsState; }) => number; export declare const selectNotificationTemplates: (state: { appNotifications: AppNotificationsState; }) => Partial<NotificationTemplates> | undefined; export declare const selectCurrentProjectId: (state: { appNotifications: AppNotificationsState; }) => string | undefined;