@stacksjs/chat 0.47.2 → 0.48.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/README.md +33 -40
- package/package.json +9 -10
package/README.md
CHANGED
|
@@ -1,62 +1,47 @@
|
|
|
1
|
-
# Stacks
|
|
1
|
+
# Stacks Chat
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Stacks Chat is driver system for sending messages through chat apps.
|
|
4
4
|
|
|
5
5
|
## ☘️ Features
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- ⚡️
|
|
10
|
-
|
|
11
|
-
wip
|
|
7
|
+
- 📦 Send Chats
|
|
12
8
|
|
|
13
9
|
## 🤖 Usage
|
|
14
10
|
|
|
15
|
-
wip
|
|
16
|
-
|
|
17
11
|
```bash
|
|
18
|
-
pnpm i -D @stacksjs/
|
|
12
|
+
pnpm i -D @stacksjs/chat
|
|
19
13
|
```
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
You may now use it in your project:
|
|
22
16
|
|
|
23
|
-
```
|
|
24
|
-
import
|
|
17
|
+
```ts
|
|
18
|
+
import * as chat from '@stacksjs/chat'
|
|
19
|
+
/* Then choose a driver. E.g for Slack */
|
|
20
|
+
const notification = chat.slack
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 🤖 Drivers
|
|
22
|
+
notification.send(ChatOptions)
|
|
30
23
|
|
|
31
|
-
|
|
24
|
+
interface ChatOptions {
|
|
25
|
+
webhookUrl: string
|
|
26
|
+
content: string
|
|
27
|
+
}
|
|
28
|
+
```
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
- Mailgun
|
|
35
|
-
- Mailjet
|
|
36
|
-
- Netcore
|
|
37
|
-
- Nodemailer
|
|
38
|
-
- Post Mark
|
|
39
|
-
- Ses
|
|
40
|
-
- Mandrill
|
|
41
|
-
- EmailJS
|
|
30
|
+
### Drivers
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
Drivers are configured with the following environment variables:
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
- Nexmo
|
|
47
|
-
- Gupshup
|
|
48
|
-
- Plivo
|
|
49
|
-
- SMS77
|
|
50
|
-
- SNS
|
|
51
|
-
- Telnyx
|
|
52
|
-
- Termii
|
|
34
|
+
#### Discord
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
- None
|
|
55
37
|
|
|
56
|
-
|
|
57
|
-
- Slack
|
|
38
|
+
#### Slack
|
|
58
39
|
|
|
59
|
-
|
|
40
|
+
```bash
|
|
41
|
+
SLACK_APPLICATION_ID=SAID123
|
|
42
|
+
SLACK_CLIENT_ID=SCID123
|
|
43
|
+
SLACK_SECRET_KEY=SSK123
|
|
44
|
+
```
|
|
60
45
|
|
|
61
46
|
## 🧪 Testing
|
|
62
47
|
|
|
@@ -82,6 +67,14 @@ For casual chit-chat with others using this package:
|
|
|
82
67
|
|
|
83
68
|
[Join the Stacks Discord Server](https://discord.ow3.org)
|
|
84
69
|
|
|
70
|
+
## 🙏🏼 Credits
|
|
71
|
+
|
|
72
|
+
Many thanks to the following core technologies & people who have contributed to this package:
|
|
73
|
+
|
|
74
|
+
- [Chris Breuer](https://github.com/chrisbbreuer)
|
|
75
|
+
- [Novu](https://novu.co/)
|
|
76
|
+
- [All Contributors](../../contributors)
|
|
77
|
+
|
|
85
78
|
## 📄 License
|
|
86
79
|
|
|
87
80
|
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/chat",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.48.1",
|
|
5
5
|
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks Chat Integration. Easy sending of messages for chat services",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -18,10 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"chat",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"stacks"
|
|
21
|
+
"stacks",
|
|
22
|
+
"discord",
|
|
23
|
+
"slack"
|
|
25
24
|
],
|
|
26
25
|
"main": "dist/index.mjs",
|
|
27
26
|
"module": "dist/index.mjs",
|
|
@@ -43,15 +42,15 @@
|
|
|
43
42
|
"@novu/node": "^0.10.0",
|
|
44
43
|
"@novu/slack": "^0.10.0",
|
|
45
44
|
"@novu/stateless": "^0.10.0",
|
|
46
|
-
"@stacksjs/cli": "0.
|
|
47
|
-
"@stacksjs/config": "0.
|
|
48
|
-
"@stacksjs/error-handling": "0.
|
|
49
|
-
"@stacksjs/types": "0.
|
|
45
|
+
"@stacksjs/cli": "0.48.1",
|
|
46
|
+
"@stacksjs/config": "0.48.1",
|
|
47
|
+
"@stacksjs/error-handling": "0.48.1",
|
|
48
|
+
"@stacksjs/types": "0.48.1"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
51
|
"mkdist": "^1.0.0",
|
|
53
52
|
"typescript": "^4.9.4",
|
|
54
|
-
"@stacksjs/testing": "0.
|
|
53
|
+
"@stacksjs/testing": "0.48.1"
|
|
55
54
|
},
|
|
56
55
|
"scripts": {
|
|
57
56
|
"build": "mkdist -d",
|