@stacksjs/sms 0.47.4 → 0.48.2

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.
Files changed (2) hide show
  1. package/README.md +82 -35
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,60 +1,99 @@
1
- # Stacks Notifications
1
+ # Stacks SMS
2
2
 
3
- wip
3
+ Stacks SMS is driver system for sending SMS messages.
4
4
 
5
5
  ## ☘️ Features
6
6
 
7
- wip
7
+ - 📦 Send SMS
8
8
 
9
- - ⚡️
9
+ ## 🤖 Usage
10
10
 
11
- wip
11
+ ```bash
12
+ pnpm i -D @stacksjs/sms
13
+ ```
12
14
 
13
- ## 🤖 Usage
15
+ You may now use it in your project:
16
+
17
+ ```ts
18
+ import * as sms from '@stacksjs/sms'
19
+ /* Then choose a driver. E.g for twilio */
20
+ const notification = sms.twilio
21
+
22
+ notification.send(SMSOptions)
23
+
24
+ interface SMSOptions {
25
+ to: string
26
+ content: string
27
+ from?: string
28
+ attachments?: AttachmentOptions[]
29
+ id?: string
30
+ }
31
+ ```
14
32
 
15
- wip
33
+ ### Drivers
34
+
35
+ Drivers are configured with the following environment variables:
36
+
37
+ #### Twilio
16
38
 
17
39
  ```bash
18
- pnpm i -D @stacksjs/notifications
40
+ TWILIO_ACCOUNT_SID=ACtest
41
+ TWILIO_AUTH_TOKEN=testtoken
42
+ TWILIO_FROM_NUMBER=+112345
43
+ TWILIO_TO_NUMBER=+145678
19
44
  ```
20
45
 
21
- Now, you can use it in your project:
46
+ #### Nexmo
47
+
48
+ ```bash
49
+ VONAGE_API_KEY=VN123
50
+ VONAGE_API_SECRET=testkey
51
+ VONAGE_FROM_NUMBER=+112345
52
+ ```
53
+
54
+ #### Gupshup
55
+
56
+ ```bash
57
+ GUPSHUP_USER_ID=GU123
58
+ GUPSHUP_PASSWORD=password
59
+ ```
22
60
 
23
- ```js
24
- import notifications from '@stacksjs/notifications'
61
+ #### Plivo
25
62
 
26
- // wip
63
+ ```bash
64
+ PLIVO_ACCOUNT_ID=PA123
65
+ PLIVO_AUTH_TOKEN=testtoken
66
+ PLIVO_FROM_NUMBER=+112345
27
67
  ```
28
68
 
29
- ## 🤖 Drivers
69
+ #### SMS77
30
70
 
31
- ### Email
71
+ ```bash
72
+ SMS77_API_KEY=SA123
73
+ SMS77_FROM=from@example.com
74
+ ```
32
75
 
33
- - Sendgrid
34
- - Mailgun
35
- - Mailjet
36
- - Netcore
37
- - Nodemailer
38
- - Post Mark
39
- - Ses
40
- - Mandrill
41
- - EmailJS
76
+ #### SNS
42
77
 
43
- ### SMS
78
+ ```bash
79
+ SMS77_API_KEY=SA123
80
+ SMS77_FROM=from@example.com
81
+ ```
44
82
 
45
- - Twilio
46
- - Nexmo
47
- - Gupshup
48
- - Plivo
49
- - SMS77
50
- - SNS
51
- - Telnyx
52
- - Termii
83
+ #### Telnyx
53
84
 
54
- ### Chat
85
+ ```bash
86
+ TELNYX_API_KEY=TA123
87
+ TELNYX_MESSAGE_PROFILE_ID=testprofileid
88
+ TELNYX_FROM=from@example.com
89
+ ```
90
+
91
+ #### Termii
55
92
 
56
- - Discord
57
- - Slack
93
+ ```bash
94
+ TERMII_API_KEY=TermA123
95
+ TERMII_SENDER=from@example.com
96
+ ```
58
97
 
59
98
  Learn more in the docs.
60
99
 
@@ -82,6 +121,14 @@ For casual chit-chat with others using this package:
82
121
 
83
122
  [Join the Stacks Discord Server](https://discord.ow3.org)
84
123
 
124
+ ## 🙏🏼 Credits
125
+
126
+ Many thanks to the following core technologies & people who have contributed to this package:
127
+
128
+ - [Chris Breuer](https://github.com/chrisbbreuer)
129
+ - [Novu](https://novu.co/)
130
+ - [All Contributors](../../contributors)
131
+
85
132
  ## 📄 License
86
133
 
87
134
  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/sms",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks SMS integration. Painlessly create & manage your inboxes, templates, and send sms.",
7
7
  "author": "Chris Breuer",
@@ -55,15 +55,15 @@
55
55
  "@novu/telnyx": "^0.10.0",
56
56
  "@novu/termii": "^0.10.0",
57
57
  "@novu/twilio": "^0.10.0",
58
- "@stacksjs/cli": "0.47.4",
59
- "@stacksjs/config": "0.47.4",
60
- "@stacksjs/error-handling": "0.47.4",
61
- "@stacksjs/types": "0.47.4"
58
+ "@stacksjs/cli": "0.48.2",
59
+ "@stacksjs/config": "0.48.2",
60
+ "@stacksjs/error-handling": "0.48.2",
61
+ "@stacksjs/types": "0.48.2"
62
62
  },
63
63
  "devDependencies": {
64
64
  "mkdist": "^1.0.0",
65
65
  "typescript": "^4.9.4",
66
- "@stacksjs/testing": "0.47.4"
66
+ "@stacksjs/testing": "0.48.2"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "mkdist -d",