@checkstack/notification-teams-backend 0.0.28 → 0.0.29

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,25 @@
1
1
  # @checkstack/notification-teams-backend
2
2
 
3
+ ## 0.0.29
4
+
5
+ ### Patch Changes
6
+
7
+ - 8d1ef12: ## Downstream consumer bumps for the anomaly detection + cache system rollout
8
+
9
+ Packages on this branch were updated as part of the anomaly detection feature (schema annotations on result fields, plugin metadata for the modular cache system) but were not listed in the upstream changesets.
10
+
11
+ - **`@checkstack/healthcheck-common`** (minor) — new RPC contract additions and schema changes supporting per-field anomaly metadata.
12
+ - **`@checkstack/cache-memory-common`** (minor) — new package providing access rules + plugin metadata for the in-memory cache backend.
13
+ - **healthcheck plugins** (patch) — adopt the new `x-anomaly-*` schema annotations on their result fields so anomaly detection works automatically against their checks. No public API changes.
14
+ - **integration / notification / auth / queue / collector plugins** (patch) — minor internal updates as consumers of upstream API changes (cache plugin registry, schema additions). No public API changes.
15
+
16
+ - Updated dependencies [8d1ef12]
17
+ - Updated dependencies [8d1ef12]
18
+ - Updated dependencies [8d1ef12]
19
+ - @checkstack/common@0.7.0
20
+ - @checkstack/notification-backend@0.2.0
21
+ - @checkstack/backend-api@0.13.0
22
+
3
23
  ## 0.0.28
4
24
 
5
25
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/notification-teams-backend",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@checkstack/backend-api": "0.12.0",
19
19
  "@checkstack/common": "0.6.5",
20
- "@checkstack/notification-backend": "0.1.22",
20
+ "@checkstack/notification-backend": "0.1.23",
21
21
  "zod": "^4.2.1"
22
22
  },
23
23
  "devDependencies": {
package/src/index.test.ts CHANGED
@@ -59,7 +59,7 @@ describe("Microsoft Teams Notification Strategy", () => {
59
59
  expect(card.type).toBe("AdaptiveCard");
60
60
  expect(card.version).toBe("1.4");
61
61
  expect(card.$schema).toBe(
62
- "http://adaptivecards.io/schemas/adaptive-card.json"
62
+ "http://adaptivecards.io/schemas/adaptive-card.json",
63
63
  );
64
64
 
65
65
  const body = card.body as Array<Record<string, unknown>>;
@@ -138,7 +138,7 @@ describe("Microsoft Teams Notification Strategy", () => {
138
138
 
139
139
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
140
140
  url: RequestInfo | URL,
141
- options?: RequestInit
141
+ options?: RequestInit,
142
142
  ) => {
143
143
  capturedUrl = url.toString();
144
144
  capturedBody = options?.body as string;
@@ -186,7 +186,7 @@ describe("Microsoft Teams Notification Strategy", () => {
186
186
 
187
187
  const mockFetch = spyOn(globalThis, "fetch").mockImplementation((async (
188
188
  _url: RequestInfo | URL,
189
- options?: RequestInit
189
+ options?: RequestInit,
190
190
  ) => {
191
191
  capturedBody = options?.body as string;
192
192
  return new Response(JSON.stringify({ id: "msg-789" }), {
@@ -222,14 +222,14 @@ describe("Microsoft Teams Notification Strategy", () => {
222
222
  },
223
223
  ],
224
224
  }),
225
- }
225
+ },
226
226
  );
227
227
 
228
228
  const parsedBody = JSON.parse(capturedBody!);
229
229
  expect(parsedBody.body.contentType).toBe("html");
230
230
  expect(parsedBody.attachments).toHaveLength(1);
231
231
  expect(parsedBody.attachments[0].contentType).toBe(
232
- "application/vnd.microsoft.card.adaptive"
232
+ "application/vnd.microsoft.card.adaptive",
233
233
  );
234
234
 
235
235
  const cardContent = JSON.parse(parsedBody.attachments[0].content);
@@ -246,9 +246,9 @@ describe("Microsoft Teams Notification Strategy", () => {
246
246
  JSON.stringify({
247
247
  error: { code: "Forbidden", message: "Access denied" },
248
248
  }),
249
- { status: 403 }
249
+ { status: 403 },
250
250
  );
251
- }) as unknown as typeof fetch
251
+ }) as unknown as typeof fetch,
252
252
  );
253
253
 
254
254
  try {
package/src/index.ts CHANGED
@@ -24,7 +24,7 @@ const teamsConfigSchemaV1 = z.object({
24
24
  tenantId: configString({}).describe("Azure AD Tenant ID"),
25
25
  clientId: configString({}).describe("Azure AD Application (Client) ID"),
26
26
  clientSecret: configString({ "x-secret": true }).describe(
27
- "Azure AD Client Secret"
27
+ "Azure AD Client Secret",
28
28
  ),
29
29
  });
30
30
 
@@ -203,7 +203,7 @@ const teamsStrategy: NotificationStrategy<TeamsConfig> = {
203
203
  const parts = idTokenClaims.split(".");
204
204
  if (parts.length === 3) {
205
205
  const payload = JSON.parse(
206
- Buffer.from(parts[1], "base64url").toString()
206
+ Buffer.from(parts[1], "base64url").toString(),
207
207
  ) as { oid?: string };
208
208
  if (payload.oid) {
209
209
  return payload.oid;
@@ -226,7 +226,7 @@ const teamsStrategy: NotificationStrategy<TeamsConfig> = {
226
226
  } satisfies StrategyOAuthConfig<TeamsConfig>,
227
227
 
228
228
  async send(
229
- context: NotificationSendContext<TeamsConfig>
229
+ context: NotificationSendContext<TeamsConfig>,
230
230
  ): Promise<NotificationDeliveryResult> {
231
231
  const { notification, strategyConfig, logger } = context;
232
232
 
@@ -324,7 +324,7 @@ const teamsStrategy: NotificationStrategy<TeamsConfig> = {
324
324
  ],
325
325
  }),
326
326
  signal: AbortSignal.timeout(10_000),
327
- }
327
+ },
328
328
  );
329
329
 
330
330
  if (!messageResponse.ok) {
@@ -346,8 +346,7 @@ const teamsStrategy: NotificationStrategy<TeamsConfig> = {
346
346
  externalId: messageData.id,
347
347
  };
348
348
  } catch (error) {
349
- const message =
350
- extractErrorMessage(error, "Unknown Graph API error");
349
+ const message = extractErrorMessage(error, "Unknown Graph API error");
351
350
  logger.error("Teams notification error", { error: message });
352
351
  return {
353
352
  success: false,
@@ -367,7 +366,7 @@ export default createBackendPlugin({
367
366
  register(env) {
368
367
  // Get the notification strategy extension point
369
368
  const extensionPoint = env.getExtensionPoint(
370
- notificationStrategyExtensionPoint
369
+ notificationStrategyExtensionPoint,
371
370
  );
372
371
 
373
372
  // Register the Teams strategy with our plugin metadata