active
active: () => Promise<ActiveNotification[]>
cancel
cancel: (notifications: number[]) => Promise<void>
cancelAll
cancelAll: () => Promise<void>
channels
channels: () => Promise<Channel[]>
createChannel
createChannel: (channel: Channel) => Promise<void>
isPermissionGranted
isPermissionGranted: () => Promise<boolean>
Type declaration
- (): Promise<boolean>
Returns Promise<boolean>
onAction
onAction: (cb: (notification: Options) => void) => Promise<PluginListener>
onNotificationReceived
onNotificationReceived: (
cb: (notification: Options) => void,
) => Promise<PluginListener>
pending
pending: () => Promise<PendingNotification[]>
registerActionTypes
registerActionTypes: (types: ActionType[]) => Promise<void>
removeActive
removeActive: (notifications: { id: number; tag?: string }[]) => Promise<void>
removeAllActive
removeAllActive: () => Promise<void>
removeChannel
removeChannel: (id: string) => Promise<void>
requestPermission
requestPermission: () => Promise<NotificationPermission>
sendNotification
sendNotification: (options: string | Options) => void
Type declaration
- (options: string | Options): void
Parameters
- options: string | Options
Returns void
Retrieves the list of active notifications.