@rkitwork/whatsapp-ramukjar-cloud-sdk 1.0.0 → 1.0.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.
- package/README.md +71 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @rkitwork/whatsapp-ramukjar-cloud-sdk
|
|
2
|
+
|
|
3
|
+
A secure, type-safe WhatsApp Cloud API SDK for **sending and receiving messages**. Supports **NestJS** and **ExpressJS** frameworks out-of-the-box.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Send **text, media, and template messages** via WhatsApp Cloud API
|
|
10
|
+
- Handle incoming WhatsApp **webhooks** (messages, status updates)
|
|
11
|
+
- Fully **TypeScript typed** and safe
|
|
12
|
+
- Works in **NestJS** or plain **ExpressJS**
|
|
13
|
+
- Easy to install and use with your npm account
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @rkitwork/whatsapp-ramukjar-cloud-sdk
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
### 1. Initialize WhatsAppService
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { WhatsAppService } from '@rkitwork/whatsapp-ramukjar-cloud-sdk';
|
|
31
|
+
|
|
32
|
+
const token = 'YOUR_WHATSAPP_ACCESS_TOKEN';
|
|
33
|
+
const phoneNumberId = 'YOUR_PHONE_NUMBER_ID';
|
|
34
|
+
|
|
35
|
+
const whatsapp = new WhatsAppService(token, phoneNumberId);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### 2. Send a Text Message
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { textMessage } from '@rkitwork/whatsapp-ramukjar-cloud-sdk';
|
|
44
|
+
|
|
45
|
+
await whatsapp.sendMessage('RECIPIENT_NUMBER', textMessage('Hello World!'));
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> `textMessage` is a helper function that returns a proper WhatsApp Cloud API payload.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Support / Donations
|
|
58
|
+
|
|
59
|
+
If you find this SDK helpful and want to support my work, you can donate:
|
|
60
|
+
|
|
61
|
+
- **Buy Me a Coffee:** [https://www.buymeacoffee.com/rkitwork](https://www.buymeacoffee.com/rkitwork)
|
|
62
|
+
|
|
63
|
+
Your support helps me maintain and improve this SDK and create more open-source tools for developers. Thank you! ❤️
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT © rkitwork
|
|
70
|
+
|
|
71
|
+
|