@dapplets/dapplet-extension
Version:
The Bridge to the Augmented Web.
43 lines (42 loc) • 980 B
TypeScript
import { JsonValue, StorageRef } from '../types';
import Base from './base';
export type NotificationAction = {
action: string;
title: string;
icon?: string;
};
export type NotificationPayload = {
title: string;
message?: string;
actions?: NotificationAction[];
timeout?: number;
payload?: JsonValue;
icon?: StorageRef;
teaser?: string;
};
export declare enum NotificationType {
Announcement = 0,
System = 1,
Application = 2
}
export declare enum NotificationStatus {
Default = 0,
Highlighted = 1,
Resolved = 2
}
export declare class Notification extends Base {
getId: () => string;
id: string;
source?: string;
type?: NotificationType;
group?: string;
status?: NotificationStatus;
createdAt?: Date | number;
icon?: StorageRef;
title: string;
message?: string;
actions?: NotificationAction[];
expiresAt?: Date | number;
payload?: JsonValue;
teaser?: string;
}