@backstage/plugin-notifications-backend 0.2.0 → 0.2.1-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 +18 -0
- package/README.md +15 -3
- package/dist/index.cjs.js +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @backstage/plugin-notifications-backend
|
|
2
2
|
|
|
3
|
+
## 0.2.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ee09dfc: Updated documentation for sending messages by external services.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/catalog-model@1.5.0-next.0
|
|
10
|
+
- @backstage/plugin-auth-node@0.4.13-next.0
|
|
11
|
+
- @backstage/backend-common@0.21.8-next.0
|
|
12
|
+
- @backstage/backend-plugin-api@0.6.18-next.0
|
|
13
|
+
- @backstage/catalog-client@1.6.5-next.0
|
|
14
|
+
- @backstage/plugin-notifications-node@0.1.4-next.0
|
|
15
|
+
- @backstage/config@1.2.0
|
|
16
|
+
- @backstage/errors@1.2.4
|
|
17
|
+
- @backstage/plugin-events-node@0.3.4-next.0
|
|
18
|
+
- @backstage/plugin-notifications-common@0.0.3
|
|
19
|
+
- @backstage/plugin-signals-node@0.1.4-next.0
|
|
20
|
+
|
|
3
21
|
## 0.2.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -71,7 +71,19 @@ export const myPlugin = createBackendPlugin({
|
|
|
71
71
|
});
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
## Sending
|
|
74
|
+
## Sending Notifications By Backend Plugins
|
|
75
75
|
|
|
76
|
-
To be able to send notifications to users, you have to integrate the `@backstage/plugin-notifications-node`
|
|
77
|
-
to your application and plugins.
|
|
76
|
+
To be able to send notifications to users by other plugins, you have to integrate the `@backstage/plugin-notifications-node`
|
|
77
|
+
to your application and plugins. For the API, please refer documentation there.
|
|
78
|
+
|
|
79
|
+
## Sending Notifications By External Services
|
|
80
|
+
|
|
81
|
+
External services can create new messages by sending POST request to the REST API.
|
|
82
|
+
|
|
83
|
+
To be able to do so, `external access` needs to be enabled as described in the [documentation](https://backstage.io/docs/auth/service-to-service-auth), e.g. via the `static tokens`.
|
|
84
|
+
|
|
85
|
+
Once the API can be accessed, the request can look like:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
curl -X POST [YOUR_SERVER_URL]/api/notifications -H "Content-Type: application/json" -H "Authorization: Bearer [BASE64_ENCODED_ACCESS_TOKEN]" -d '{"recipients":{"type":"entity","entityRef":"user:development/guest"},"payload": {"title": "Title of user-targeted external message","description": "The description","link": "http://foo.com/bar","severity": "high","topic": "The topic"}}'
|
|
89
|
+
```
|
package/dist/index.cjs.js
CHANGED
|
@@ -708,7 +708,7 @@ var __accessCheck = (obj, member, msg) => {
|
|
|
708
708
|
};
|
|
709
709
|
var __privateGet = (obj, member, getter) => {
|
|
710
710
|
__accessCheck(obj, member, "read from private field");
|
|
711
|
-
return
|
|
711
|
+
return member.get(obj);
|
|
712
712
|
};
|
|
713
713
|
var __privateAdd = (obj, member, value) => {
|
|
714
714
|
if (member.has(obj))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-notifications-backend",
|
|
3
|
-
"version": "0.2.0",
|
|
3
|
+
"version": "0.2.1-next.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "backend-plugin"
|
|
6
6
|
},
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"test": "backstage-cli package test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@backstage/backend-common": "^0.21.
|
|
35
|
-
"@backstage/backend-plugin-api": "^0.6.
|
|
36
|
-
"@backstage/catalog-client": "^1.6.
|
|
37
|
-
"@backstage/catalog-model": "^1.
|
|
34
|
+
"@backstage/backend-common": "^0.21.8-next.0",
|
|
35
|
+
"@backstage/backend-plugin-api": "^0.6.18-next.0",
|
|
36
|
+
"@backstage/catalog-client": "^1.6.5-next.0",
|
|
37
|
+
"@backstage/catalog-model": "^1.5.0-next.0",
|
|
38
38
|
"@backstage/config": "^1.2.0",
|
|
39
39
|
"@backstage/errors": "^1.2.4",
|
|
40
|
-
"@backstage/plugin-auth-node": "^0.4.
|
|
41
|
-
"@backstage/plugin-events-node": "^0.3.
|
|
40
|
+
"@backstage/plugin-auth-node": "^0.4.13-next.0",
|
|
41
|
+
"@backstage/plugin-events-node": "^0.3.4-next.0",
|
|
42
42
|
"@backstage/plugin-notifications-common": "^0.0.3",
|
|
43
|
-
"@backstage/plugin-notifications-node": "^0.1.
|
|
44
|
-
"@backstage/plugin-signals-node": "^0.1.
|
|
43
|
+
"@backstage/plugin-notifications-node": "^0.1.4-next.0",
|
|
44
|
+
"@backstage/plugin-signals-node": "^0.1.4-next.0",
|
|
45
45
|
"express": "^4.17.1",
|
|
46
46
|
"express-promise-router": "^4.1.0",
|
|
47
47
|
"knex": "^3.0.0",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"yn": "^4.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@backstage/backend-defaults": "^0.2.
|
|
55
|
-
"@backstage/backend-test-utils": "^0.3.
|
|
56
|
-
"@backstage/cli": "^0.26.
|
|
57
|
-
"@backstage/plugin-auth-backend": "^0.22.
|
|
58
|
-
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.
|
|
59
|
-
"@backstage/plugin-events-backend": "^0.3.
|
|
60
|
-
"@backstage/plugin-signals-backend": "^0.1.
|
|
54
|
+
"@backstage/backend-defaults": "^0.2.18-next.0",
|
|
55
|
+
"@backstage/backend-test-utils": "^0.3.8-next.0",
|
|
56
|
+
"@backstage/cli": "^0.26.5-next.0",
|
|
57
|
+
"@backstage/plugin-auth-backend": "^0.22.5-next.0",
|
|
58
|
+
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.4-next.0",
|
|
59
|
+
"@backstage/plugin-events-backend": "^0.3.5-next.0",
|
|
60
|
+
"@backstage/plugin-signals-backend": "^0.1.4-next.0",
|
|
61
61
|
"@types/express": "^4.17.6",
|
|
62
62
|
"@types/supertest": "^2.0.8",
|
|
63
63
|
"msw": "^1.0.0",
|