@kumbify/sdk 1.0.8 → 1.0.9
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 +9 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,11 +108,10 @@ const smsClient = new KSMSClient({
|
|
|
108
108
|
|
|
109
109
|
```ts
|
|
110
110
|
// 📤 Send an SMS Message
|
|
111
|
-
|
|
112
111
|
await smsClient.sendSMS({
|
|
113
112
|
message: "Your verification code is 123456",
|
|
114
113
|
from: "kumbify-app",
|
|
115
|
-
to: "+1234567890",
|
|
114
|
+
to: ["+1234567890"],
|
|
116
115
|
});
|
|
117
116
|
|
|
118
117
|
console.log("SMS sent successfully!");
|
|
@@ -124,8 +123,7 @@ console.log("SMS sent successfully!");
|
|
|
124
123
|
| --------- | ------ | ------------------------------------ |
|
|
125
124
|
| `message` | string | SMS content |
|
|
126
125
|
| `from` | string | Sender identifier (visible to users) |
|
|
127
|
-
| `to` | string |
|
|
128
|
-
|
|
126
|
+
| `to` | string | List of recipient phone numbers |
|
|
129
127
|
---
|
|
130
128
|
|
|
131
129
|
### Example Usage All Together
|
|
@@ -151,7 +149,7 @@ await mailClient.sendSimpleMail({
|
|
|
151
149
|
await smsClient.sendSMS({
|
|
152
150
|
message: "Your code is 1234",
|
|
153
151
|
from: "KumbifyApp",
|
|
154
|
-
to: "+1234567890",
|
|
152
|
+
to: ["+1234567890"],
|
|
155
153
|
});
|
|
156
154
|
```
|
|
157
155
|
|
|
@@ -159,14 +157,14 @@ await smsClient.sendSMS({
|
|
|
159
157
|
|
|
160
158
|
### Tips & Best Practices
|
|
161
159
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
160
|
+
- Store your API keys in environment variables (never hardcode them).
|
|
161
|
+
- Always handle promise rejections with `try/catch`.
|
|
162
|
+
- Log or inspect response objects to monitor delivery success.
|
|
165
163
|
|
|
166
164
|
---
|
|
167
165
|
|
|
168
166
|
### Supported Environments
|
|
169
167
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
- Node.js
|
|
169
|
+
- TypeScript
|
|
170
|
+
- Any JavaScript project that supports npm packages
|
package/package.json
CHANGED