UNPKG

@dapplets/dapplet-extension

Version:
23 lines (22 loc) 1.16 kB
import { Notification, NotificationPayload, NotificationType } from '../../common/models/notification'; import NotificationBrowserStorage from '../browserStorages/notificationBrowserStorage'; export declare class NotificationService { notificationBrowserStorage: NotificationBrowserStorage; getNotifications(type: NotificationType): Promise<Notification[]>; createAndShowNotification(notify: NotificationPayload & { type?: NotificationType; source?: string; }, tabId: number): Promise<void>; createNotification(notify: NotificationPayload & { type?: NotificationType; source?: string; }): Promise<string>; showNotification(notificationId: string, tabId: number): Promise<void>; deleteNotification(id: string | string[]): Promise<void>; deleteAllNotifications(): Promise<void>; markNotificationAsViewed(id: string | string[]): Promise<void>; markAllNotificationsAsViewed(): Promise<void>; resolveNotificationAction(notificationId: string, action: string, tabId: number): Promise<void>; getUnreadNotificationsCount(source?: string): Promise<number>; private _updateBadge; }