rename to metadata

Signed-off-by: Frank Ye <franky@spotify.com>
This commit is contained in:
Frank Ye
2025-05-30 14:05:19 -04:00
parent 9152ba8f36
commit b345e53dd3
10 changed files with 41 additions and 42 deletions
@@ -40,6 +40,7 @@
},
"dependencies": {
"@backstage/config": "workspace:^",
"@backstage/types": "workspace:^",
"@material-ui/icons": "^4.9.1"
},
"devDependencies": {
+7 -8
View File
@@ -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)
+7 -9
View File
@@ -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 */