@checkstack/incident-common 0.3.4 → 0.4.1

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,30 @@
1
1
  # @checkstack/incident-common
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0b9fc58: Fix workspace:\* protocol resolution in published packages
8
+
9
+ Published packages now correctly have resolved dependency versions instead of `workspace:*` references. This is achieved by using `bun publish` which properly resolves workspace protocol references.
10
+
11
+ - Updated dependencies [0b9fc58]
12
+ - @checkstack/common@0.6.1
13
+ - @checkstack/frontend-api@0.3.4
14
+ - @checkstack/signal-common@0.1.5
15
+
16
+ ## 0.4.0
17
+
18
+ ### Minor Changes
19
+
20
+ - cce5453: Add notification suppression for incidents
21
+
22
+ - Added `suppressNotifications` field to incidents, allowing active incidents to optionally suppress health check notifications
23
+ - When enabled, health status change notifications will not be sent for affected systems while the incident is active (not resolved)
24
+ - Mirrors the existing maintenance notification suppression pattern
25
+ - Added toggle UI in the IncidentEditor dialog
26
+ - Added `hasActiveIncidentWithSuppression` RPC endpoint for service-to-service queries
27
+
3
28
  ## 0.3.4
4
29
 
5
30
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/incident-common",
3
- "version": "0.3.4",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -8,16 +8,16 @@
8
8
  }
9
9
  },
10
10
  "dependencies": {
11
- "@checkstack/common": "workspace:*",
12
- "@checkstack/frontend-api": "workspace:*",
13
- "@checkstack/signal-common": "workspace:*",
11
+ "@checkstack/common": "0.6.0",
12
+ "@checkstack/frontend-api": "0.3.3",
13
+ "@checkstack/signal-common": "0.1.4",
14
14
  "@orpc/contract": "^1.13.2",
15
15
  "zod": "^4.2.1"
16
16
  },
17
17
  "devDependencies": {
18
18
  "typescript": "^5.7.2",
19
- "@checkstack/tsconfig": "workspace:*",
20
- "@checkstack/scripts": "workspace:*"
19
+ "@checkstack/tsconfig": "0.0.2",
20
+ "@checkstack/scripts": "0.1.0"
21
21
  },
22
22
  "scripts": {
23
23
  "typecheck": "tsc --noEmit",
@@ -108,6 +108,18 @@ export const incidentContract = {
108
108
  })
109
109
  .input(z.object({ id: z.string() }))
110
110
  .output(z.object({ success: z.boolean() })),
111
+
112
+ /**
113
+ * Check if a system has an active incident with notification suppression enabled.
114
+ * Used by the health check system to suppress notifications during acknowledged incidents.
115
+ */
116
+ hasActiveIncidentWithSuppression: proc({
117
+ operationType: "query",
118
+ userType: "service",
119
+ access: [incidentAccess.incident.read],
120
+ })
121
+ .input(z.object({ systemId: z.string() }))
122
+ .output(z.object({ suppressed: z.boolean() })),
111
123
  };
112
124
 
113
125
  // Export contract type
package/src/schemas.ts CHANGED
@@ -29,6 +29,7 @@ export const IncidentSchema = z.object({
29
29
  description: z.string().optional(),
30
30
  status: IncidentStatusEnum,
31
31
  severity: IncidentSeverityEnum,
32
+ suppressNotifications: z.boolean(),
32
33
  createdAt: z.date(),
33
34
  updatedAt: z.date(),
34
35
  });
@@ -68,6 +69,7 @@ export const CreateIncidentInputSchema = z.object({
68
69
  title: z.string().min(1, "Title is required"),
69
70
  description: z.string().optional(),
70
71
  severity: IncidentSeverityEnum,
72
+ suppressNotifications: z.boolean().optional().default(false),
71
73
  systemIds: z.array(z.string()).min(1, "At least one system is required"),
72
74
  initialMessage: z
73
75
  .string()
@@ -81,6 +83,7 @@ export const UpdateIncidentInputSchema = z.object({
81
83
  title: z.string().min(1).optional(),
82
84
  description: z.string().nullable().optional(),
83
85
  severity: IncidentSeverityEnum.optional(),
86
+ suppressNotifications: z.boolean().optional(),
84
87
  systemIds: z.array(z.string()).min(1).optional(),
85
88
  });
86
89
  export type UpdateIncidentInput = z.infer<typeof UpdateIncidentInputSchema>;