stackverify 1.0.0 → 1.0.3

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/package.json +8 -2
  2. package/src/README.md +79 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stackverify",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Node.js SDK for StackVerify API (SMS, Email, WhatsApp)",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -8,7 +8,13 @@
8
8
  "build": "cp src/index.js dist/index.js",
9
9
  "test": "node test/sms.test.js"
10
10
  },
11
- "keywords": ["stackverify", "sms", "whatsapp", "email", "sdk"],
11
+ "keywords": [
12
+ "stackverify",
13
+ "sms",
14
+ "whatsapp",
15
+ "email",
16
+ "sdk"
17
+ ],
12
18
  "author": "morgan miller",
13
19
  "license": "MIT",
14
20
  "dependencies": {
package/src/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # StackVerify SDK
2
+
3
+ A simple Node.js SDK to interact with the StackVerify API for sending SMS and checking message status.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install stackverify
9
+ ```
10
+ # Usage
11
+ ```
12
+ import StackVerify from "stackverify";
13
+
14
+ // Initialize the SDK
15
+ const stack = new StackVerify({ apiKey: "YOUR_API_KEY" });
16
+
17
+ // Send an SMS and check status
18
+ async function main() {
19
+ try {
20
+ const response = await stack.sendSMS({
21
+ recipients: ["+1234567890"], // array of phone numbers
22
+ body: "Hello! This is a test message.",
23
+ sender_id: "SMS"
24
+ });
25
+ console.log("SMS sent:", response);
26
+
27
+ const status = await stack.getSMSStatus(response.message_id);
28
+ console.log("SMS status:", status);
29
+
30
+ } catch (err) {
31
+ console.error("Error:", err.message);
32
+ }
33
+ }
34
+
35
+ main();
36
+
37
+ ```
38
+ # Api
39
+
40
+ new StackVerify({ apiKey, baseUrl })
41
+
42
+ apiKey (string) — Your StackVerify API key (required)
43
+
44
+ baseUrl (string) — API base URL (default: https://stackverify.site/api/v1)
45
+
46
+ sendSMS({ recipients, body, sender_id })
47
+
48
+ Send an SMS.
49
+
50
+ recipients — array of phone numbers (required)
51
+
52
+ body — SMS message text (required)
53
+
54
+ sender_id — your sender ID (required)
55
+
56
+ getSMSStatus(messageId)
57
+
58
+ Get the status of a sent message.
59
+
60
+ messageId — ID returned by sendSMS (required)
61
+ ## Badges
62
+
63
+
64
+ [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
65
+ [![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://opensource.org/licenses/)
66
+ [![AGPL License](https://img.shields.io/badge/license-AGPL-blue.svg)](http://www.gnu.org/licenses/agpl-3.0)
67
+
68
+
69
+ ## Authors
70
+
71
+ - [@morgan miller](https://www.github.com/Frost-bit-star)
72
+
73
+ - [@samwuel simiyu](https://github.com/Trojan-254)
74
+
75
+ ## 🔗 Links
76
+ [![website](https://img.shields.io/badge/my_portfolio-000?style=for-the-badge&logo=ko-fi&logoColor=white)](https://stackverify.site/)
77
+ [![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/)
78
+ [![twitter](https://img.shields.io/badge/twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/)
79
+