feat: allow broadcast notifications
Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
@@ -27,9 +27,14 @@ export type NotificationServiceOptions = {
|
||||
signalService: SignalService;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export type NotificationReceivers =
|
||||
| { type: 'entity'; entityRef: string | string[] }
|
||||
| { type: 'broadcast' };
|
||||
|
||||
/** @public */
|
||||
export type NotificationSendOptions = {
|
||||
entityRef: string | string[];
|
||||
receivers: NotificationReceivers;
|
||||
title: string;
|
||||
description: string;
|
||||
link: string;
|
||||
|
||||
@@ -18,6 +18,6 @@ import { NotificationSendOptions } from './DefaultNotificationService';
|
||||
import { Notification } from '@backstage/plugin-notifications-common';
|
||||
|
||||
/** @public */
|
||||
export type NotificationService = {
|
||||
export interface NotificationService {
|
||||
send(options: NotificationSendOptions): Promise<Notification[]>;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user