@@ -40,6 +40,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "workspace:^",
|
||||
"@backstage/types": "workspace:^",
|
||||
"@material-ui/icons": "^4.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
|
||||
// @public (undocumented)
|
||||
export type ChannelSetting = {
|
||||
@@ -31,9 +32,7 @@ export type NewNotificationSignal = {
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
type Notification_2<
|
||||
T extends Record<string, unknown> = Record<string, unknown>,
|
||||
> = {
|
||||
type Notification_2 = {
|
||||
id: string;
|
||||
user: string | null;
|
||||
created: Date;
|
||||
@@ -41,14 +40,12 @@ type Notification_2<
|
||||
read?: Date;
|
||||
updated?: Date;
|
||||
origin: string;
|
||||
payload: NotificationPayload<T>;
|
||||
payload: NotificationPayload;
|
||||
};
|
||||
export { Notification_2 as Notification };
|
||||
|
||||
// @public (undocumented)
|
||||
export type NotificationPayload<
|
||||
T extends Record<string, unknown> = Record<string, unknown>,
|
||||
> = {
|
||||
export type NotificationPayload = {
|
||||
title: string;
|
||||
description?: string;
|
||||
link?: string;
|
||||
@@ -56,7 +53,9 @@ export type NotificationPayload<
|
||||
topic?: string;
|
||||
scope?: string;
|
||||
icon?: string;
|
||||
attributes?: T;
|
||||
metadata?: {
|
||||
[KMetadataKey in string]?: JsonValue;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { JsonValue } from '@backstage/types';
|
||||
|
||||
/** @public */
|
||||
export type NotificationSeverity = 'critical' | 'high' | 'normal' | 'low';
|
||||
|
||||
/** @public */
|
||||
export type NotificationPayload<
|
||||
T extends Record<string, unknown> = Record<string, unknown>,
|
||||
> = {
|
||||
export type NotificationPayload = {
|
||||
/**
|
||||
* Notification title
|
||||
*/
|
||||
@@ -53,15 +53,13 @@ export type NotificationPayload<
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* Optional additional customizable attributes.
|
||||
* Optional additional customizable metadata.
|
||||
*/
|
||||
attributes?: T;
|
||||
metadata?: { [KMetadataKey in string]?: JsonValue };
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export type Notification<
|
||||
T extends Record<string, unknown> = Record<string, unknown>,
|
||||
> = {
|
||||
export type Notification = {
|
||||
/**
|
||||
* Unique identifier for the notification
|
||||
*/
|
||||
@@ -95,7 +93,7 @@ export type Notification<
|
||||
/**
|
||||
* Actual notification payload
|
||||
*/
|
||||
payload: NotificationPayload<T>;
|
||||
payload: NotificationPayload;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
|
||||
Reference in New Issue
Block a user