UNPKG

globular-element

Version:

Collection of webcomponent to work with globular

32 lines (31 loc) 1.26 kB
import { Notification, NotificationType } from "globular-web-client/resource/resource_pb"; /** * The notification controller is used to send and receive notifications. */ export declare class NotificationController { constructor(); /** * Initialyse the user and application notifications */ static initNotifications(): void; /** * Send application notifications. * @param notification The notification can contain html text. */ static sendNotifications(recipient: string, mac: string, text: string, type: NotificationType, callback: () => void, onError: (err: any) => void): void; /** * Retreive the list of nofitications * @param callback The success callback with the list of notifications. * @param errorCallback The error callback with the error message. */ static getNotifications(type: NotificationType, callback: (notifications: Array<Notification>) => void, errorCallback: (err: any) => void): void; /** * Remove a notification. * @param notification The notification to remove. */ static removeNotification(notification: Notification): void; /** * Remove all notification. */ static clearNotifications(type: NotificationType): void; }