@backstage/plugin-notifications-backend-module-slack 0.4.3 → 0.4.4-next.0

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,14 @@
1
1
  # @backstage/plugin-notifications-backend-module-slack
2
2
 
3
+ ## 0.4.4-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@1.9.3-next.0
9
+ - @backstage/plugin-catalog-node@2.2.3-next.0
10
+ - @backstage/plugin-notifications-node@0.2.28-next.0
11
+
3
12
  ## 0.4.3
4
13
 
5
14
  ### Patch Changes
@@ -0,0 +1,117 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "notifications": {
6
+ "type": "object",
7
+ "properties": {
8
+ "processors": {
9
+ "type": "object",
10
+ "properties": {
11
+ "slack": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "token": {
17
+ "type": "string",
18
+ "description": "Slack Bot Token. Usually starts with `xoxb-`.",
19
+ "visibility": "secret"
20
+ },
21
+ "broadcastChannels": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "string"
25
+ },
26
+ "description": "Broadcast notification receivers when receiver is set to config These can be Slack User IDs, Slack User Email addresses, Slack Channel Names, or Slack Channel IDs. Any valid identifier that chat.postMessage can accept.",
27
+ "deprecated": "Use broadcastRoutes instead for more granular control"
28
+ },
29
+ "username": {
30
+ "type": "string",
31
+ "description": "Optional username to display as the sender of the notification"
32
+ },
33
+ "broadcastRoutes": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "properties": {
38
+ "origin": {
39
+ "type": "string",
40
+ "description": "The origin to match (e.g., 'plugin:catalog', 'external:my-service')"
41
+ },
42
+ "topic": {
43
+ "type": "string",
44
+ "description": "The topic to match (e.g., 'entity-updated', 'alerts')"
45
+ },
46
+ "channel": {
47
+ "anyOf": [
48
+ {
49
+ "type": "string"
50
+ },
51
+ {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "string"
55
+ }
56
+ }
57
+ ],
58
+ "description": "The Slack channel(s) to send to. Can be channel IDs, channel names, or user IDs."
59
+ }
60
+ },
61
+ "required": [
62
+ "channel"
63
+ ]
64
+ },
65
+ "description": "Routes for broadcast notifications based on origin and/or topic. Routes are evaluated in order, first match wins. Origin+topic matches take precedence over origin-only matches."
66
+ },
67
+ "concurrencyLimit": {
68
+ "type": "number",
69
+ "description": "Concurrency limit for Slack notifications per backend instance of the notifications plugin, defaults to 10."
70
+ },
71
+ "throttleInterval": {
72
+ "anyOf": [
73
+ {
74
+ "type": "object",
75
+ "properties": {
76
+ "years": {
77
+ "type": "number"
78
+ },
79
+ "months": {
80
+ "type": "number"
81
+ },
82
+ "weeks": {
83
+ "type": "number"
84
+ },
85
+ "days": {
86
+ "type": "number"
87
+ },
88
+ "hours": {
89
+ "type": "number"
90
+ },
91
+ "minutes": {
92
+ "type": "number"
93
+ },
94
+ "seconds": {
95
+ "type": "number"
96
+ },
97
+ "milliseconds": {
98
+ "type": "number"
99
+ }
100
+ },
101
+ "description": "Human friendly durations object."
102
+ },
103
+ {
104
+ "type": "string"
105
+ }
106
+ ],
107
+ "description": "Throttle duration between Slack notifications per backend instance of the notifications plugin, defaults to 1 minute."
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-notifications-backend-module-slack",
3
- "version": "0.4.3",
3
+ "version": "0.4.4-next.0",
4
4
  "description": "The slack backend module for the notifications plugin.",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -25,7 +25,7 @@
25
25
  "types": "dist/index.d.ts",
26
26
  "files": [
27
27
  "dist",
28
- "config.d.ts",
28
+ "config.schema.json",
29
29
  "migrations"
30
30
  ],
31
31
  "scripts": {
@@ -38,14 +38,14 @@
38
38
  "test": "backstage-cli package test"
39
39
  },
40
40
  "dependencies": {
41
- "@backstage/backend-plugin-api": "^1.9.2",
42
- "@backstage/catalog-model": "^1.9.0",
43
- "@backstage/config": "^1.3.8",
44
- "@backstage/errors": "^1.3.1",
45
- "@backstage/plugin-catalog-node": "^2.2.2",
46
- "@backstage/plugin-notifications-common": "^0.2.3",
47
- "@backstage/plugin-notifications-node": "^0.2.27",
48
- "@backstage/types": "^1.2.2",
41
+ "@backstage/backend-plugin-api": "1.9.3-next.0",
42
+ "@backstage/catalog-model": "1.9.0",
43
+ "@backstage/config": "1.3.8",
44
+ "@backstage/errors": "1.3.1",
45
+ "@backstage/plugin-catalog-node": "2.2.3-next.0",
46
+ "@backstage/plugin-notifications-common": "0.2.3",
47
+ "@backstage/plugin-notifications-node": "0.2.28-next.0",
48
+ "@backstage/types": "1.2.2",
49
49
  "@slack/bolt": "^3.21.4",
50
50
  "@slack/types": "^2.14.0",
51
51
  "@slack/web-api": "^7.5.0",
@@ -54,13 +54,13 @@
54
54
  "p-throttle": "^4.1.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@backstage/backend-test-utils": "^1.11.4",
58
- "@backstage/cli": "^0.36.3",
59
- "@backstage/test-utils": "^1.7.19",
57
+ "@backstage/backend-test-utils": "1.11.5-next.0",
58
+ "@backstage/cli": "0.36.4-next.0",
59
+ "@backstage/test-utils": "1.7.20-next.0",
60
60
  "@faker-js/faker": "^10.0.0",
61
61
  "msw": "^2.0.0"
62
62
  },
63
- "configSchema": "config.d.ts",
63
+ "configSchema": "config.schema.json",
64
64
  "typesVersions": {
65
65
  "*": {
66
66
  "package.json": [
package/config.d.ts DELETED
@@ -1,68 +0,0 @@
1
- /*
2
- * Copyright 2025 The Backstage Authors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { HumanDuration } from '@backstage/types';
17
-
18
- export interface Config {
19
- notifications?: {
20
- processors?: {
21
- slack?: Array<{
22
- /**
23
- * Slack Bot Token. Usually starts with `xoxb-`.
24
- * @visibility secret
25
- */
26
- token?: string;
27
- /**
28
- * Broadcast notification receivers when receiver is set to config
29
- * These can be Slack User IDs, Slack User Email addresses, Slack Channel
30
- * Names, or Slack Channel IDs. Any valid identifier that chat.postMessage can accept.
31
- * @deprecated Use broadcastRoutes instead for more granular control
32
- */
33
- broadcastChannels?: string[];
34
- /**
35
- * Optional username to display as the sender of the notification
36
- */
37
- username?: string;
38
- /**
39
- * Routes for broadcast notifications based on origin and/or topic.
40
- * Routes are evaluated in order, first match wins.
41
- * Origin+topic matches take precedence over origin-only matches.
42
- */
43
- broadcastRoutes?: Array<{
44
- /**
45
- * The origin to match (e.g., 'plugin:catalog', 'external:my-service')
46
- */
47
- origin?: string;
48
- /**
49
- * The topic to match (e.g., 'entity-updated', 'alerts')
50
- */
51
- topic?: string;
52
- /**
53
- * The Slack channel(s) to send to. Can be channel IDs, channel names, or user IDs.
54
- */
55
- channel: string | string[];
56
- }>;
57
- /**
58
- * Concurrency limit for Slack notifications per backend instance of the notifications plugin, defaults to 10.
59
- */
60
- concurrencyLimit?: number;
61
- /**
62
- * Throttle duration between Slack notifications per backend instance of the notifications plugin, defaults to 1 minute.
63
- */
64
- throttleInterval?: HumanDuration | string;
65
- }>;
66
- };
67
- };
68
- }