wb.notifications
WorkbookNotifications
Workbook-level notifications sub-API. Provides toast/notification operations without requiring apps to import from `@mog/kernel/services/notifications`.
9 methods
subscribe
→ CallableDisposablesubscribe(listener: (notifications: Notification[]) => void): CallableDisposable;| Parameter | Type | Required |
|---|---|---|
| listener | (notifications: Notification[]) => void | required |
Subscribe to notification changes. Returns CallableDisposable — call directly or .dispose() to unsubscribe.
notify
→ stringnotify(message: string, options?: NotificationOptions): string;| Parameter | Type | Required |
|---|---|---|
| message | string | required |
| options | NotificationOptions | optional |
Show a notification. Returns the notification ID.
info
→ stringinfo(message: string, options?: Omit<NotificationOptions, 'type'>): string;| Parameter | Type | Required |
|---|---|---|
| message | string | required |
| options | Omit<NotificationOptions, 'type'> | optional |
Show an info notification. Returns the notification ID.
success
→ stringsuccess(message: string, options?: Omit<NotificationOptions, 'type'>): string;| Parameter | Type | Required |
|---|---|---|
| message | string | required |
| options | Omit<NotificationOptions, 'type'> | optional |
Show a success notification. Returns the notification ID.
warning
→ stringwarning(message: string, options?: Omit<NotificationOptions, 'type'>): string;| Parameter | Type | Required |
|---|---|---|
| message | string | required |
| options | Omit<NotificationOptions, 'type'> | optional |
Show a warning notification. Returns the notification ID.
error
→ stringerror(message: string, options?: Omit<NotificationOptions, 'type'>): string;| Parameter | Type | Required |
|---|---|---|
| message | string | required |
| options | Omit<NotificationOptions, 'type'> | optional |
Show an error notification. Returns the notification ID.
dismiss
→ voiddismiss(id: string): void;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Dismiss a notification by ID
dismissAll
→ voiddismissAll(): void;Dismiss all notifications