feat: define signal type for notifications

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-02-15 14:39:44 +02:00
parent 06773d802a
commit 9873c44c24
10 changed files with 130 additions and 65 deletions
+15
View File
@@ -3,6 +3,12 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// @public (undocumented)
export type NewNotificationSignal = {
action: 'new_notification';
notification_id: string;
};
// @public (undocumented)
type Notification_2 = {
id: string;
@@ -28,9 +34,18 @@ export type NotificationPayload = {
icon?: string;
};
// @public (undocumented)
export type NotificationReadSignal = {
action: 'notification_read' | 'notification_unread';
notification_ids: string[];
};
// @public (undocumented)
export type NotificationSeverity = 'critical' | 'high' | 'normal' | 'low';
// @public (undocumented)
export type NotificationSignal = NewNotificationSignal | NotificationReadSignal;
// @public (undocumented)
export type NotificationStatus = {
unread: number;
+15
View File
@@ -51,3 +51,18 @@ export type NotificationStatus = {
unread: number;
read: number;
};
/** @public */
export type NewNotificationSignal = {
action: 'new_notification';
notification_id: string;
};
/** @public */
export type NotificationReadSignal = {
action: 'notification_read' | 'notification_unread';
notification_ids: string[];
};
/** @public */
export type NotificationSignal = NewNotificationSignal | NotificationReadSignal;