@checkstack/notification-backstage-backend 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @checkstack/notification-backstage-backend
2
2
 
3
+ ## 0.1.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 32d52c6: Bulk notifications affecting multiple systems and collapse lifecycle events into a single card.
8
+
9
+ Notifications now carry an optional `subjects` array (the entities they affect) and an optional `collapseKey` (so related notifications collapse into one row per recipient). Incidents, maintenances, anomalies, healthchecks, and dependency-impact events route through these new fields, so an incident affecting three systems produces one in-app notification + one external send per subscriber instead of three. Lifecycle updates for the same entity (created → updated → resolved) also collapse, with an expandable "+N updates" timeline.
10
+
11
+ Subject kinds are namespaced as `<pluginId>.<localKind>` and built via type-safe helpers exported from each domain's common package (`createSystemSubject`, `incidentCollapseKey`, etc.). The frontend kind registry (`registerSubjectKind`) lets plugins bind icon + label for their kinds; unknown kinds fall back to a generic chip.
12
+
13
+ All notification strategies (SMTP, Slack, Discord, Teams, Telegram, Pushover, Gotify, Webex, Backstage) render the affected subjects natively in their format (HTML cards, Slack blocks, Discord embed fields, adaptive cards, markdown lists, etc.).
14
+
15
+ - Updated dependencies [32d52c6]
16
+ - Updated dependencies [32d52c6]
17
+ - Updated dependencies [32d52c6]
18
+ - Updated dependencies [32d52c6]
19
+ - @checkstack/notification-backend@1.0.0
20
+ - @checkstack/backend-api@0.14.0
21
+
22
+ ## 0.1.26
23
+
24
+ ### Patch Changes
25
+
26
+ - @checkstack/backend-api@0.13.1
27
+ - @checkstack/notification-backend@0.2.1
28
+
3
29
  ## 0.1.25
4
30
 
5
31
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/notification-backstage-backend",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -13,9 +13,9 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@checkstack/backend-api": "0.12.0",
17
- "@checkstack/notification-backend": "0.1.23",
18
- "@checkstack/common": "0.6.5",
16
+ "@checkstack/backend-api": "0.13.1",
17
+ "@checkstack/notification-backend": "0.2.1",
18
+ "@checkstack/common": "0.7.0",
19
19
  "zod": "^4.2.1"
20
20
  },
21
21
  "devDependencies": {
package/src/index.ts CHANGED
@@ -187,10 +187,23 @@ const backstageStrategy: NotificationStrategy<
187
187
  };
188
188
  }
189
189
 
190
- // Build the notification payload
191
- const description = notification.body
190
+ // Build the notification payload. Backstage's notifications plugin only
191
+ // accepts a single description string and a single link, so subjects
192
+ // are appended to the description as a bulleted list — names hyperlink
193
+ // when URLs are present.
194
+ let description = notification.body
192
195
  ? markdownToPlainText(notification.body)
193
196
  : undefined;
197
+ const subjects = notification.subjects ?? [];
198
+ if (subjects.length > 0) {
199
+ const lines = subjects.map((subject) =>
200
+ subject.url
201
+ ? `- [${subject.name}](${subject.url})`
202
+ : `- ${subject.name}`,
203
+ );
204
+ const block = `**Affected:**\n${lines.join("\n")}`;
205
+ description = description ? `${description}\n\n${block}` : block;
206
+ }
194
207
 
195
208
  const payload = {
196
209
  recipients: {