botcast-sdk 1.0.3 → 1.0.4
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 +129 -247
- package/dist/client.cjs +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -0
- package/dist/modules/base.cjs +3 -2
- package/dist/modules/base.d.ts +1 -1
- package/dist/modules/base.d.ts.map +1 -1
- package/dist/modules/base.js +3 -2
- package/dist/modules/instances.cjs +12 -2
- package/dist/modules/instances.d.ts +11 -2
- package/dist/modules/instances.d.ts.map +1 -1
- package/dist/modules/instances.js +12 -2
- package/dist/modules/messages.cjs +15 -0
- package/dist/modules/messages.d.ts +3 -1
- package/dist/modules/messages.d.ts.map +1 -1
- package/dist/modules/messages.js +15 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# botcast-sdk
|
|
2
2
|
|
|
3
|
-
Node.js and TypeScript
|
|
3
|
+
Official Node.js and TypeScript SDK for [Botcast](https://botcast.site) — a high-performance, multi-instance API gateway supporting both **WhatsApp** and **Telegram MTProto** (`teleproto`).
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/botcast-sdk)
|
|
6
6
|
[](https://www.npmjs.com/package/botcast-sdk)
|
|
@@ -11,14 +11,17 @@ Node.js and TypeScript client for [Botcast](https://botcast.site), a multi-insta
|
|
|
11
11
|
|
|
12
12
|
## Features
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
14
|
+
- **Multi-Platform Support**: Connect and control both **WhatsApp** and **Telegram MTProto** instances with a single unified SDK.
|
|
15
|
+
- **Zero Runtime Dependencies**: Built directly on native `fetch` and modern standard web APIs.
|
|
16
|
+
- **Strict TypeScript Types**: Fully typed request parameters, response models, error classes, and event payloads.
|
|
17
|
+
- **Dual Authentication**:
|
|
18
|
+
- **WhatsApp**: Scan QR code string or request an 8-digit PIN code without a camera.
|
|
19
|
+
- **Telegram**: Scan QR code via *Telegram > Settings > Devices > Link Desktop Device* or authenticate via phone verification code with optional Cloud 2FA password.
|
|
20
|
+
- **Unified Messaging**: Send text messages, automated OTP codes, images, videos, audio, voice notes (PTT), documents, stickers, locations, contact cards, and interactive polls.
|
|
21
|
+
- **Message Operations**: Edit sent messages, delete for everyone (revoke), mark as read, reactions, pin messages, and forward.
|
|
22
|
+
- **Chat & History Management**: Query dialogs, contact lists, and message history for both platforms.
|
|
23
|
+
- **Group Administration**: Create groups, manage participants, configure permission modes, and share invite links (WhatsApp).
|
|
24
|
+
- **Real-Time Webhooks**: Built-in router and middleware for processing inbound messages and connection events across Express, Fastify, Next.js, or raw Node HTTP.
|
|
22
25
|
|
|
23
26
|
---
|
|
24
27
|
|
|
@@ -36,30 +39,31 @@ bun add botcast-sdk
|
|
|
36
39
|
|
|
37
40
|
---
|
|
38
41
|
|
|
39
|
-
## Quick
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
### 1. WhatsApp Client
|
|
40
45
|
|
|
41
46
|
```typescript
|
|
42
47
|
import { BotcastClient } from 'botcast-sdk';
|
|
43
48
|
|
|
44
|
-
const
|
|
49
|
+
const whatsappBot = new BotcastClient({
|
|
45
50
|
baseUrl: 'https://botcast.site', // or your self-hosted server URL
|
|
51
|
+
platform: 'whatsapp', // 'whatsapp' (default) or 'telegram'
|
|
46
52
|
instanceId: 'your_instance_id',
|
|
47
53
|
instanceToken: 'your_instance_token',
|
|
48
54
|
});
|
|
49
55
|
|
|
50
56
|
async function main() {
|
|
51
|
-
//
|
|
52
|
-
const status = await
|
|
53
|
-
console.log(`
|
|
57
|
+
// Check connectivity
|
|
58
|
+
const status = await whatsappBot.getStatus();
|
|
59
|
+
console.log(`WhatsApp state: ${status.status} (${status.phoneNumber || 'Unpaired'})`);
|
|
54
60
|
|
|
55
|
-
//
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
});
|
|
59
|
-
console.log('Message ID:', result.messageId);
|
|
61
|
+
// Send a text message
|
|
62
|
+
const res = await whatsappBot.messages.sendText('201012345678', 'Hello from WhatsApp via Botcast SDK!');
|
|
63
|
+
console.log('Message sent! ID:', res.messageId);
|
|
60
64
|
|
|
61
|
-
//
|
|
62
|
-
const otp = await
|
|
65
|
+
// Send a secure 6-digit OTP code
|
|
66
|
+
const otp = await whatsappBot.messages.sendOTP('201012345678', {
|
|
63
67
|
appName: 'My App',
|
|
64
68
|
expiryMinutes: 5,
|
|
65
69
|
});
|
|
@@ -69,12 +73,54 @@ async function main() {
|
|
|
69
73
|
main().catch(console.error);
|
|
70
74
|
```
|
|
71
75
|
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### 2. Telegram MTProto Client
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
import { BotcastClient } from 'botcast-sdk';
|
|
82
|
+
|
|
83
|
+
const telegramBot = new BotcastClient({
|
|
84
|
+
baseUrl: 'https://botcast.site',
|
|
85
|
+
platform: 'telegram',
|
|
86
|
+
instanceId: 'your_telegram_instance_id',
|
|
87
|
+
instanceToken: 'your_telegram_instance_token',
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
async function main() {
|
|
91
|
+
// Check connectivity
|
|
92
|
+
const status = await telegramBot.getStatus();
|
|
93
|
+
console.log(`Telegram state: ${status.status}`);
|
|
94
|
+
|
|
95
|
+
// Send a text message to a phone number or @username
|
|
96
|
+
const res = await telegramBot.messages.sendText('+1234567890', 'Hello from Telegram MTProto!');
|
|
97
|
+
console.log('Message ID:', res.messageId);
|
|
98
|
+
|
|
99
|
+
// Send a photo
|
|
100
|
+
await telegramBot.messages.sendImage('+1234567890', {
|
|
101
|
+
url: 'https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800',
|
|
102
|
+
caption: 'Welcome flyer',
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// Send OTP
|
|
106
|
+
const otp = await telegramBot.messages.sendOTP('+1234567890', {
|
|
107
|
+
appName: 'Security Portal',
|
|
108
|
+
});
|
|
109
|
+
console.log('Telegram OTP sent:', otp.codeSent);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
main().catch(console.error);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
72
117
|
### CommonJS (require)
|
|
73
118
|
|
|
74
119
|
```javascript
|
|
75
120
|
const { BotcastClient } = require('botcast-sdk');
|
|
76
121
|
|
|
77
122
|
const client = new BotcastClient({
|
|
123
|
+
platform: 'telegram', // or 'whatsapp'
|
|
78
124
|
instanceId: 'your_instance_id',
|
|
79
125
|
instanceToken: 'your_instance_token',
|
|
80
126
|
});
|
|
@@ -82,108 +128,86 @@ const client = new BotcastClient({
|
|
|
82
128
|
|
|
83
129
|
---
|
|
84
130
|
|
|
85
|
-
## API
|
|
131
|
+
## API Reference
|
|
86
132
|
|
|
87
|
-
### 1. Device
|
|
133
|
+
### 1. Device Pairing and Lifecycle (`client.instances`)
|
|
88
134
|
|
|
89
135
|
```typescript
|
|
90
136
|
// 1. Get live status
|
|
91
137
|
const status = await client.instances.getStatus();
|
|
92
|
-
console.log('
|
|
138
|
+
console.log('State:', status.status); // 'connected' | 'qr_ready' | 'stopped' | 'connecting'
|
|
93
139
|
|
|
94
140
|
// 2. Option A: Get QR code string for camera scanning
|
|
141
|
+
// (WhatsApp: Linked Devices | Telegram: Settings > Devices > Link Desktop Device)
|
|
95
142
|
const qr = await client.getQR(); // or client.instances.getQR()
|
|
96
|
-
console.log('
|
|
97
|
-
|
|
98
|
-
// 3. Option B: Request 8-digit phone PIN code (link without scanning)
|
|
99
|
-
const pair = await client.pairWithCode('201012345678'); // or client.instances.pairWithCode(...)
|
|
100
|
-
console.log('Enter this PIN on WhatsApp notification:', pair.code); // e.g. "8492-0193"
|
|
143
|
+
console.log('QR DataURL:', qr.qr);
|
|
101
144
|
|
|
102
|
-
//
|
|
103
|
-
|
|
104
|
-
await client.
|
|
105
|
-
|
|
145
|
+
// 3. Option B: Request Phone Pairing / Login Code
|
|
146
|
+
// (WhatsApp sends 8-digit PIN | Telegram sends verification code into app)
|
|
147
|
+
const pair = await client.pairWithCode('+1234567890');
|
|
148
|
+
console.log('Code request status:', pair);
|
|
106
149
|
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
console.log('Exists on WhatsApp:', check.exists, 'JID:', check.jid);
|
|
150
|
+
// 4. Complete Telegram Phone Login (with optional 2FA cloud password)
|
|
151
|
+
await client.instances.verifyCode('+1234567890', '12345', 'myCloudPassword2fa');
|
|
110
152
|
|
|
111
|
-
//
|
|
112
|
-
await client.instances.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
// 7. Manage sandbox allowed numbers (developer tier)
|
|
118
|
-
const allowed = await client.instances.getAllowedNumbers();
|
|
119
|
-
await client.instances.setAllowedNumbers(['201012345678', '966500000000']);
|
|
153
|
+
// 5. Socket engine controls
|
|
154
|
+
await client.instances.start(); // Boots socket / MTProto connection
|
|
155
|
+
await client.instances.stop(); // Suspends socket session
|
|
156
|
+
await client.instances.logout(); // Unlinks device and clears session credentials
|
|
120
157
|
```
|
|
121
158
|
|
|
122
159
|
---
|
|
123
160
|
|
|
124
|
-
### 2. Message
|
|
161
|
+
### 2. Message Dispatching (`client.messages`)
|
|
162
|
+
|
|
163
|
+
All messaging methods work across both **WhatsApp** and **Telegram**:
|
|
125
164
|
|
|
126
165
|
```typescript
|
|
127
|
-
// 1. Text message
|
|
128
|
-
await client.messages.sendText('
|
|
129
|
-
mentions: ['
|
|
130
|
-
quotedMsgId: 'MSG_ID_TO_REPLY_TO',
|
|
166
|
+
// 1. Text message
|
|
167
|
+
await client.messages.sendText('+1234567890', 'Hello World', {
|
|
168
|
+
mentions: ['1234567890'], // WhatsApp mentions
|
|
131
169
|
});
|
|
132
170
|
|
|
133
|
-
// 2. Image
|
|
134
|
-
await client.messages.sendImage('
|
|
171
|
+
// 2. Image / Photo
|
|
172
|
+
await client.messages.sendImage('+1234567890', {
|
|
135
173
|
url: 'https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800',
|
|
136
174
|
caption: 'Photo preview',
|
|
137
175
|
});
|
|
138
176
|
|
|
139
|
-
// 3. Video
|
|
140
|
-
await client.messages.sendVideo('
|
|
177
|
+
// 3. Video
|
|
178
|
+
await client.messages.sendVideo('+1234567890', {
|
|
141
179
|
url: 'https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4',
|
|
142
180
|
caption: 'Product tutorial video',
|
|
143
|
-
ptv: false,
|
|
144
181
|
});
|
|
145
182
|
|
|
146
|
-
// 4. Voice note
|
|
147
|
-
await client.messages.sendVoice('
|
|
183
|
+
// 4. Voice note and audio
|
|
184
|
+
await client.messages.sendVoice('+1234567890', {
|
|
148
185
|
url: 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3',
|
|
149
186
|
});
|
|
150
187
|
|
|
151
|
-
// 5. Document
|
|
152
|
-
await client.messages.sendDocument('
|
|
188
|
+
// 5. Document / PDF / File
|
|
189
|
+
await client.messages.sendDocument('+1234567890', {
|
|
153
190
|
url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',
|
|
154
191
|
fileName: 'Invoice_2026.pdf',
|
|
155
|
-
mimetype: 'application/pdf',
|
|
156
192
|
caption: 'Monthly invoice statement',
|
|
157
193
|
});
|
|
158
194
|
|
|
159
|
-
// 6.
|
|
160
|
-
await client.messages.
|
|
161
|
-
url: 'https://raw.githubusercontent.com/WhatsApp/stickers/main/Android/app/src/main/assets/1/01_Cider_Happy.webp',
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
// 7. Location coordinates
|
|
165
|
-
await client.messages.sendLocation('201012345678', {
|
|
195
|
+
// 6. Location coordinates
|
|
196
|
+
await client.messages.sendLocation('+1234567890', {
|
|
166
197
|
latitude: 24.7136,
|
|
167
198
|
longitude: 46.6753,
|
|
168
199
|
name: 'Kingdom Tower',
|
|
169
200
|
address: 'King Fahd Rd, Riyadh, Saudi Arabia',
|
|
170
201
|
});
|
|
171
202
|
|
|
172
|
-
//
|
|
173
|
-
await client.messages.sendContact('
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// 9. Interactive poll
|
|
179
|
-
await client.messages.sendPoll('201012345678', {
|
|
180
|
-
name: 'How do you rate Botcast API speed?',
|
|
181
|
-
values: ['Fast', 'Good', 'Needs improvement'],
|
|
182
|
-
selectableCount: 1,
|
|
203
|
+
// 7. Contact Card
|
|
204
|
+
await client.messages.sendContact('+1234567890', {
|
|
205
|
+
firstName: 'Support Agent',
|
|
206
|
+
phone: '+1234567890',
|
|
183
207
|
});
|
|
184
208
|
|
|
185
|
-
//
|
|
186
|
-
const otp = await client.messages.sendOTP('
|
|
209
|
+
// 8. Automated OTP verification code
|
|
210
|
+
const otp = await client.messages.sendOTP('+1234567890', {
|
|
187
211
|
appName: 'Botcast Portal',
|
|
188
212
|
expiryMinutes: 5,
|
|
189
213
|
});
|
|
@@ -191,7 +215,7 @@ const otp = await client.messages.sendOTP('201012345678', {
|
|
|
191
215
|
|
|
192
216
|
---
|
|
193
217
|
|
|
194
|
-
### 3. Message
|
|
218
|
+
### 3. Message Operations (`client.messages`)
|
|
195
219
|
|
|
196
220
|
```typescript
|
|
197
221
|
const msgKey = {
|
|
@@ -200,19 +224,19 @@ const msgKey = {
|
|
|
200
224
|
id: '3EB0ABCDEF1234567890',
|
|
201
225
|
};
|
|
202
226
|
|
|
203
|
-
// 1. Edit sent message
|
|
227
|
+
// 1. Edit sent message
|
|
204
228
|
await client.messages.edit('201012345678', msgKey, 'Corrected text content');
|
|
205
229
|
|
|
206
230
|
// 2. Delete message for everyone (revoke)
|
|
207
231
|
await client.messages.delete('201012345678', msgKey);
|
|
208
232
|
|
|
209
|
-
// 3. Mark message as read
|
|
233
|
+
// 3. Mark message as read
|
|
210
234
|
await client.messages.markAsRead(msgKey);
|
|
211
235
|
|
|
212
|
-
// 4. Emoji reaction
|
|
236
|
+
// 4. Emoji reaction
|
|
213
237
|
await client.messages.react('201012345678', msgKey, '👍');
|
|
214
238
|
|
|
215
|
-
// 5. Pin message
|
|
239
|
+
// 5. Pin message
|
|
216
240
|
await client.messages.pin('201012345678', msgKey, 1, 86400);
|
|
217
241
|
|
|
218
242
|
// 6. Forward message
|
|
@@ -221,173 +245,31 @@ await client.messages.forward('201012345678', { conversation: 'Forwarded message
|
|
|
221
245
|
|
|
222
246
|
---
|
|
223
247
|
|
|
224
|
-
### 4. Chats,
|
|
248
|
+
### 4. Chats, Contacts, and History (`client.chats`)
|
|
225
249
|
|
|
226
250
|
```typescript
|
|
227
|
-
// 1. List
|
|
228
|
-
const { chats
|
|
251
|
+
// 1. List chats / dialogs
|
|
252
|
+
const { chats } = await client.chats.list({ limit: 50 });
|
|
229
253
|
|
|
230
|
-
// 2. List
|
|
254
|
+
// 2. List contacts
|
|
231
255
|
const { contacts } = await client.chats.listContacts({ limit: 100 });
|
|
232
256
|
|
|
233
|
-
// 3. List
|
|
257
|
+
// 3. List messages for a chat
|
|
234
258
|
const { messages } = await client.chats.listMessages({ chatJid: '201012345678@s.whatsapp.net', limit: 50 });
|
|
235
259
|
|
|
236
|
-
// 4. Modify chat state (archive, mute, pin, delete)
|
|
260
|
+
// 4. Modify WhatsApp chat state (archive, mute, pin, delete)
|
|
237
261
|
await client.chats.archive('201012345678@s.whatsapp.net');
|
|
238
|
-
await client.chats.unarchive('201012345678@s.whatsapp.net');
|
|
239
262
|
await client.chats.mute('201012345678@s.whatsapp.net', 8 * 60 * 60 * 1000); // 8 hours
|
|
240
|
-
await client.chats.unmute('201012345678@s.whatsapp.net');
|
|
241
263
|
await client.chats.pin('201012345678@s.whatsapp.net');
|
|
242
|
-
await client.chats.unpin('201012345678@s.whatsapp.net');
|
|
243
|
-
await client.chats.deleteChat('201012345678@s.whatsapp.net');
|
|
244
|
-
|
|
245
|
-
// 5. Set disappearing messages timer
|
|
246
|
-
await client.chats.setDisappearing('201012345678', 86400, true);
|
|
247
|
-
|
|
248
|
-
// 6. Request older history from linked phone
|
|
249
|
-
await client.chats.fetchHistory({ count: 50 });
|
|
250
|
-
|
|
251
|
-
// 7. Trigger immediate sync
|
|
252
|
-
await client.instances.sync();
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
### 5. Profile, presence, and business details (`client.profile`)
|
|
258
|
-
|
|
259
|
-
```typescript
|
|
260
|
-
// 1. Get and update bio status
|
|
261
|
-
const bio = await client.profile.getStatus('201012345678');
|
|
262
|
-
await client.profile.setStatus('Available via Botcast API');
|
|
263
|
-
|
|
264
|
-
// 2. Update display name
|
|
265
|
-
await client.profile.setName('Botcast Agent');
|
|
266
|
-
|
|
267
|
-
// 3. Profile picture management
|
|
268
|
-
const pic = await client.profile.getPicture('201012345678', true); // High-res
|
|
269
|
-
await client.profile.setPicture({ url: 'https://botcast.site/logo.png' });
|
|
270
|
-
await client.profile.removePicture();
|
|
271
|
-
|
|
272
|
-
// 4. Inspect WhatsApp Business profile
|
|
273
|
-
const biz = await client.profile.getBusinessProfile('201012345678');
|
|
274
|
-
console.log('Business category:', biz.businessProfile.category);
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
### 6. Group administration (`client.groups`)
|
|
280
|
-
|
|
281
|
-
```typescript
|
|
282
|
-
// 1. Create a WhatsApp group
|
|
283
|
-
const group = await client.groups.create('VIP Customers', ['201012345678', '966500000000']);
|
|
284
|
-
const groupJid = group.group.id;
|
|
285
|
-
|
|
286
|
-
// 2. List groups and fetch metadata
|
|
287
|
-
const { groups } = await client.groups.list();
|
|
288
|
-
const { metadata } = await client.groups.getMetadata(groupJid);
|
|
289
|
-
|
|
290
|
-
// 3. Participant management (add, remove, promote, demote)
|
|
291
|
-
await client.groups.addParticipants(groupJid, ['201099999999']);
|
|
292
|
-
await client.groups.removeParticipants(groupJid, ['201099999999']);
|
|
293
|
-
await client.groups.promoteParticipants(groupJid, ['201012345678']);
|
|
294
|
-
await client.groups.demoteParticipants(groupJid, ['201012345678']);
|
|
295
|
-
|
|
296
|
-
// 4. Update group subject and description
|
|
297
|
-
await client.groups.updateSubject(groupJid, 'New Group Title');
|
|
298
|
-
await client.groups.updateDescription(groupJid, 'Official VIP discussion group.');
|
|
299
|
-
|
|
300
|
-
// 5. Update group settings
|
|
301
|
-
await client.groups.updateSettings(groupJid, 'announcement'); // Admins only send messages
|
|
302
|
-
await client.groups.updateSettings(groupJid, 'not_announcement'); // All members can chat
|
|
303
|
-
await client.groups.updateSettings(groupJid, 'locked'); // Admins only edit info
|
|
304
|
-
await client.groups.updateSettings(groupJid, 'unlocked');
|
|
305
|
-
|
|
306
|
-
// 6. Shareable invite codes and links
|
|
307
|
-
const invite = await client.groups.getInviteCode(groupJid);
|
|
308
|
-
console.log('Invite link:', invite.link);
|
|
309
|
-
await client.groups.revokeInviteCode(groupJid);
|
|
310
|
-
await client.groups.acceptInvite('InviteCodeString');
|
|
311
|
-
const info = await client.groups.getInviteInfo('InviteCodeString');
|
|
312
|
-
|
|
313
|
-
// 7. Join requests moderation (admin approval mode)
|
|
314
|
-
const pending = await client.groups.getJoinRequests(groupJid);
|
|
315
|
-
await client.groups.updateJoinRequests(groupJid, ['201012345678'], 'approve');
|
|
316
|
-
|
|
317
|
-
// 8. Ephemeral messages and member add mode
|
|
318
|
-
await client.groups.setEphemeral(groupJid, 86400); // 24h
|
|
319
|
-
await client.groups.setMemberAddMode(groupJid, 'admin_add'); // Only admins add
|
|
320
|
-
|
|
321
|
-
// 9. Leave group
|
|
322
|
-
await client.groups.leave(groupJid);
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
---
|
|
326
|
-
|
|
327
|
-
### 7. Privacy and blocklist (`client.profile`)
|
|
328
|
-
|
|
329
|
-
```typescript
|
|
330
|
-
// 1. Block and unblock contacts
|
|
331
|
-
await client.profile.block('201012345678');
|
|
332
|
-
await client.profile.unblock('201012345678');
|
|
333
|
-
|
|
334
|
-
// 2. Get blocklist
|
|
335
|
-
const { blocklist } = await client.profile.getBlocklist();
|
|
336
|
-
|
|
337
|
-
// 3. Get and update privacy visibility settings
|
|
338
|
-
const privacy = await client.profile.getPrivacySettings();
|
|
339
|
-
// Options: 'all' | 'contacts' | 'contact_blacklist' | 'none'
|
|
340
|
-
await client.profile.updatePrivacySetting('lastSeen', 'all');
|
|
341
|
-
await client.profile.updatePrivacySetting('online', 'all');
|
|
342
|
-
await client.profile.updatePrivacySetting('profilePicture', 'contacts');
|
|
343
|
-
await client.profile.updatePrivacySetting('status', 'contacts');
|
|
344
|
-
await client.profile.updatePrivacySetting('readReceipts', 'all');
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
### 8. 24-hour status stories and broadcasts (`client.broadcast`)
|
|
350
|
-
|
|
351
|
-
```typescript
|
|
352
|
-
// 1. Publish status story (text, image, video, or audio)
|
|
353
|
-
await client.broadcast.sendStatusStory({
|
|
354
|
-
type: 'text',
|
|
355
|
-
text: 'New update available on Botcast.',
|
|
356
|
-
backgroundColor: '#10b981',
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
// 2. Get broadcast list info
|
|
360
|
-
const list = await client.broadcast.getListInfo('1234567890@broadcast');
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
365
|
-
### 9. Rate limits and safety controls (`client.instances`)
|
|
366
|
-
|
|
367
|
-
```typescript
|
|
368
|
-
// 1. Read current limits
|
|
369
|
-
const limits = await client.instances.getLimits();
|
|
370
|
-
console.log('Daily message limit:', limits.daily_message_limit);
|
|
371
|
-
console.log('Daily new contacts limit:', limits.daily_new_contacts_limit);
|
|
372
|
-
|
|
373
|
-
// 2. Update limits (pass 0 to disable)
|
|
374
|
-
await client.instances.setDailyMessageLimit(1000);
|
|
375
|
-
await client.instances.setDailyNewContactsLimit(100);
|
|
376
|
-
|
|
377
|
-
// Or update both at once
|
|
378
|
-
await client.instances.updateLimits({
|
|
379
|
-
daily_message_limit: 500,
|
|
380
|
-
daily_new_contacts_limit: 50,
|
|
381
|
-
});
|
|
382
264
|
```
|
|
383
265
|
|
|
384
266
|
---
|
|
385
267
|
|
|
386
|
-
###
|
|
268
|
+
### 5. Webhook Event Handling
|
|
387
269
|
|
|
388
|
-
The SDK includes
|
|
270
|
+
The SDK includes a built-in event dispatcher and middleware for handling inbound webhooks from both WhatsApp and Telegram:
|
|
389
271
|
|
|
390
|
-
#### Express
|
|
272
|
+
#### Express Example
|
|
391
273
|
|
|
392
274
|
```typescript
|
|
393
275
|
import express from 'express';
|
|
@@ -397,13 +279,14 @@ const app = express();
|
|
|
397
279
|
app.use(express.json());
|
|
398
280
|
|
|
399
281
|
const client = new BotcastClient({
|
|
282
|
+
platform: 'telegram', // or 'whatsapp'
|
|
400
283
|
instanceId: 'inst_123',
|
|
401
284
|
instanceToken: 'tok_abc',
|
|
402
285
|
});
|
|
403
286
|
|
|
404
287
|
// Listen for incoming messages
|
|
405
288
|
client.webhook.onMessage(async (event) => {
|
|
406
|
-
console.log(`Message from ${event.
|
|
289
|
+
console.log(`Message from ${event.sender}: ${event.message} [Platform: ${event.platform || 'whatsapp'}]`);
|
|
407
290
|
|
|
408
291
|
if (event.message.trim().toLowerCase() === 'ping') {
|
|
409
292
|
await client.messages.sendText(event.sender, 'pong');
|
|
@@ -412,7 +295,7 @@ client.webhook.onMessage(async (event) => {
|
|
|
412
295
|
|
|
413
296
|
// Listen for connection changes
|
|
414
297
|
client.webhook.onConnection(async (event) => {
|
|
415
|
-
console.log(`Instance
|
|
298
|
+
console.log(`Instance status updated: ${event.status}`);
|
|
416
299
|
});
|
|
417
300
|
|
|
418
301
|
// Mount middleware on your webhook route
|
|
@@ -423,7 +306,7 @@ app.listen(3000, () => console.log('Webhook server running on port 3000'));
|
|
|
423
306
|
|
|
424
307
|
---
|
|
425
308
|
|
|
426
|
-
## Error
|
|
309
|
+
## Error Handling
|
|
427
310
|
|
|
428
311
|
`botcast-sdk` maps API status codes to typed error classes:
|
|
429
312
|
|
|
@@ -439,16 +322,16 @@ import {
|
|
|
439
322
|
} from 'botcast-sdk';
|
|
440
323
|
|
|
441
324
|
try {
|
|
442
|
-
await client.messages.sendText('
|
|
325
|
+
await client.messages.sendText('+1234567890', 'Hello World');
|
|
443
326
|
} catch (error) {
|
|
444
327
|
if (error instanceof BotcastAuthError) {
|
|
445
328
|
console.error('Invalid instance credentials or token.');
|
|
446
329
|
} else if (error instanceof BotcastPaymentRequiredError) {
|
|
447
|
-
console.error('Instance requires
|
|
330
|
+
console.error('Instance requires payment confirmation.');
|
|
448
331
|
} else if (error instanceof BotcastSubscriptionExpiredError) {
|
|
449
|
-
console.error('
|
|
332
|
+
console.error('Subscription expired on:', error.expiresAt);
|
|
450
333
|
} else if (error instanceof BotcastRateLimitError) {
|
|
451
|
-
console.error('Daily
|
|
334
|
+
console.error('Daily message limit reached.');
|
|
452
335
|
} else if (error instanceof BotcastValidationError) {
|
|
453
336
|
console.error('Validation error:', error.message, error.details);
|
|
454
337
|
} else if (error instanceof BotcastNotFoundError) {
|
|
@@ -465,12 +348,11 @@ try {
|
|
|
465
348
|
|
|
466
349
|
- Website: [https://botcast.site](https://botcast.site)
|
|
467
350
|
- Documentation: [https://botcast.site/docs](https://botcast.site/docs)
|
|
468
|
-
-
|
|
469
|
-
-
|
|
470
|
-
- GitHub repository: [https://github.com/ANOOBALSA/Botcast](https://github.com/ANOOBALSA/Botcast)
|
|
351
|
+
- NPM Package: [https://www.npmjs.com/package/botcast-sdk](https://www.npmjs.com/package/botcast-sdk)
|
|
352
|
+
- GitHub Repository: [https://github.com/ANOOBALSA/Botcast](https://github.com/ANOOBALSA/Botcast)
|
|
471
353
|
|
|
472
354
|
---
|
|
473
355
|
|
|
474
356
|
## License
|
|
475
357
|
|
|
476
|
-
MIT
|
|
358
|
+
MIT © [Botcast](https://botcast.site)
|
package/dist/client.cjs
CHANGED
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAgC;IAE9C,iDAAiD;IAC1C,SAAS,EAAE,eAAe,CAAC;IAElC,6EAA6E;IACtE,QAAQ,EAAE,cAAc,CAAC;IAEhC,0DAA0D;IACnD,KAAK,EAAE,WAAW,CAAC;IAE1B,iDAAiD;IAC1C,MAAM,EAAE,YAAY,CAAC;IAE5B,0DAA0D;IACnD,OAAO,EAAE,aAAa,CAAC;IAE9B,gDAAgD;IACzC,SAAS,EAAE,eAAe,CAAC;IAElC,mCAAmC;IAC5B,OAAO,EAAE,cAAc,CAAC;IAE/B;;;;;;;;;;;;;;;;;;OAkBG;gBACS,MAAM,EAAE,mBAAmB;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,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12 @@ class BaseModule {
|
|
|
8
8
|
this.config = config;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Builds the instance-specific URL path prefix:
|
|
11
|
+
* Builds the instance-specific URL path prefix: `/:platform/:instanceId/:instanceToken/...`
|
|
12
12
|
*/
|
|
13
13
|
buildPath(subPath) {
|
|
14
|
+
const platform = this.config.platform || 'whatsapp';
|
|
14
15
|
const cleanSubPath = subPath.startsWith('/') ? subPath.slice(1) : subPath;
|
|
15
|
-
return
|
|
16
|
+
return `/${platform}/${encodeURIComponent(this.config.instanceId)}/${encodeURIComponent(this.config.instanceToken)}/${cleanSubPath}`;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Executes an HTTP request against the Botcast API Gateway with retry & error translation.
|
package/dist/modules/base.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare class BaseModule {
|
|
|
10
10
|
protected config: Required<BotcastClientConfig>;
|
|
11
11
|
constructor(config: Required<BotcastClientConfig>);
|
|
12
12
|
/**
|
|
13
|
-
* Builds the instance-specific URL path prefix:
|
|
13
|
+
* Builds the instance-specific URL path prefix: `/:platform/:instanceId/:instanceToken/...`
|
|
14
14
|
*/
|
|
15
15
|
protected buildPath(subPath: string): string;
|
|
16
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/modules/base.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;IACrE,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,qBAAa,UAAU;IACrB,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;gBAEpC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IAIjD;;OAEG;IACH,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/modules/base.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;IACrE,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,qBAAa,UAAU;IACrB,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;gBAEpC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IAIjD;;OAEG;IACH,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAM5C;;OAEG;IACU,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC;IAyFlE,OAAO,CAAC,eAAe;CAuBxB"}
|
package/dist/modules/base.js
CHANGED
|
@@ -5,11 +5,12 @@ export class BaseModule {
|
|
|
5
5
|
this.config = config;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Builds the instance-specific URL path prefix:
|
|
8
|
+
* Builds the instance-specific URL path prefix: `/:platform/:instanceId/:instanceToken/...`
|
|
9
9
|
*/
|
|
10
10
|
buildPath(subPath) {
|
|
11
|
+
const platform = this.config.platform || 'whatsapp';
|
|
11
12
|
const cleanSubPath = subPath.startsWith('/') ? subPath.slice(1) : subPath;
|
|
12
|
-
return
|
|
13
|
+
return `/${platform}/${encodeURIComponent(this.config.instanceId)}/${encodeURIComponent(this.config.instanceToken)}/${cleanSubPath}`;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Executes an HTTP request against the Botcast API Gateway with retry & error translation.
|
|
@@ -22,9 +22,9 @@ class InstancesModule extends base_js_1.BaseModule {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Generates
|
|
25
|
+
* Generates a pairing / login code for phone number authentication.
|
|
26
26
|
*
|
|
27
|
-
* @param phoneNumber
|
|
27
|
+
* @param phoneNumber Phone number with country code (e.g. `201000000000` or `15551234567`)
|
|
28
28
|
*/
|
|
29
29
|
async pairWithCode(phoneNumber) {
|
|
30
30
|
return this.request({
|
|
@@ -33,6 +33,16 @@ class InstancesModule extends base_js_1.BaseModule {
|
|
|
33
33
|
body: { phoneNumber },
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Completes phone code verification (e.g. for Telegram login with optional 2FA password).
|
|
38
|
+
*/
|
|
39
|
+
async verifyCode(phoneNumber, code, password) {
|
|
40
|
+
return this.request({
|
|
41
|
+
method: 'POST',
|
|
42
|
+
path: this.buildPath('verify-code'),
|
|
43
|
+
body: { phoneNumber, code, password },
|
|
44
|
+
});
|
|
45
|
+
}
|
|
36
46
|
/**
|
|
37
47
|
* Boots up the WhatsApp socket connection.
|
|
38
48
|
*
|
|
@@ -10,11 +10,20 @@ export declare class InstancesModule extends BaseModule {
|
|
|
10
10
|
*/
|
|
11
11
|
getQR(): Promise<InstanceQRResponse>;
|
|
12
12
|
/**
|
|
13
|
-
* Generates
|
|
13
|
+
* Generates a pairing / login code for phone number authentication.
|
|
14
14
|
*
|
|
15
|
-
* @param phoneNumber
|
|
15
|
+
* @param phoneNumber Phone number with country code (e.g. `201000000000` or `15551234567`)
|
|
16
16
|
*/
|
|
17
17
|
pairWithCode(phoneNumber: string): Promise<PairCodeResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Completes phone code verification (e.g. for Telegram login with optional 2FA password).
|
|
20
|
+
*/
|
|
21
|
+
verifyCode(phoneNumber: string, code: string, password?: string): Promise<{
|
|
22
|
+
success: boolean;
|
|
23
|
+
status: string;
|
|
24
|
+
user?: any;
|
|
25
|
+
message?: string;
|
|
26
|
+
}>;
|
|
18
27
|
/**
|
|
19
28
|
* Boots up the WhatsApp socket connection.
|
|
20
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../src/modules/instances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,eAAgB,SAAQ,UAAU;IAC7C;;OAEG;IACU,SAAS,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAOzD;;OAEG;IACU,KAAK,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAOjD;;;;OAIG;IACU,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQzE;;;;OAIG;IACU,KAAK,CAAC,KAAK,GAAE,OAAe,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAA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G;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAI/H;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAM5F"}
|
|
@@ -19,9 +19,9 @@ export class InstancesModule extends BaseModule {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Generates
|
|
22
|
+
* Generates a pairing / login code for phone number authentication.
|
|
23
23
|
*
|
|
24
|
-
* @param phoneNumber
|
|
24
|
+
* @param phoneNumber Phone number with country code (e.g. `201000000000` or `15551234567`)
|
|
25
25
|
*/
|
|
26
26
|
async pairWithCode(phoneNumber) {
|
|
27
27
|
return this.request({
|
|
@@ -30,6 +30,16 @@ export class InstancesModule extends BaseModule {
|
|
|
30
30
|
body: { phoneNumber },
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Completes phone code verification (e.g. for Telegram login with optional 2FA password).
|
|
35
|
+
*/
|
|
36
|
+
async verifyCode(phoneNumber, code, password) {
|
|
37
|
+
return this.request({
|
|
38
|
+
method: 'POST',
|
|
39
|
+
path: this.buildPath('verify-code'),
|
|
40
|
+
body: { phoneNumber, code, password },
|
|
41
|
+
});
|
|
42
|
+
}
|
|
33
43
|
/**
|
|
34
44
|
* Boots up the WhatsApp socket connection.
|
|
35
45
|
*
|
|
@@ -35,6 +35,13 @@ class MessagesModule extends base_js_1.BaseModule {
|
|
|
35
35
|
* @param options OTP configuration (code, app name, expiry minutes)
|
|
36
36
|
*/
|
|
37
37
|
async sendOTP(recipient, options) {
|
|
38
|
+
if (this.config.platform === 'telegram') {
|
|
39
|
+
return this.send({
|
|
40
|
+
recipient,
|
|
41
|
+
type: 'otp',
|
|
42
|
+
...options,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
38
45
|
return this.request({
|
|
39
46
|
method: 'POST',
|
|
40
47
|
path: this.buildPath('otp'),
|
|
@@ -126,6 +133,14 @@ class MessagesModule extends base_js_1.BaseModule {
|
|
|
126
133
|
* Sends a contact vCard card.
|
|
127
134
|
*/
|
|
128
135
|
async sendContact(recipient, contact, options) {
|
|
136
|
+
if (this.config.platform === 'telegram') {
|
|
137
|
+
return this.send({
|
|
138
|
+
recipient,
|
|
139
|
+
type: 'contact',
|
|
140
|
+
...contact,
|
|
141
|
+
...options,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
129
144
|
return this.request({
|
|
130
145
|
method: 'POST',
|
|
131
146
|
path: this.buildPath('messages/contact'),
|
|
@@ -83,7 +83,9 @@ export declare class MessagesModule extends BaseModule {
|
|
|
83
83
|
* Sends a contact vCard card.
|
|
84
84
|
*/
|
|
85
85
|
sendContact(recipient: string, contact: {
|
|
86
|
-
displayName
|
|
86
|
+
displayName?: string;
|
|
87
|
+
firstName?: string;
|
|
88
|
+
phone?: string;
|
|
87
89
|
vcard?: string;
|
|
88
90
|
contacts?: Array<{
|
|
89
91
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/modules/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,mBAAmB,EAMnB,cAAc,EACd,UAAU,EACV,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,cAAe,SAAQ,UAAU;IAC5C;;OAEG;IACU,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ7E;;;;;;OAMG;IACU,QAAQ,CACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,mBAAm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CACjB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,UAAU,GACd,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAQ/D;;OAEG;IACU,UAAU,CACrB,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE,GAC9B,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAS/D;;OAEG;IACU,KAAK,CAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAQ/D;;;;;;;OAOG;IACU,GAAG,CACd,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,UAAU,EACf,IAAI,GAAE,CAAC,GAAG,CAAK,EACf,QAAQ,GAAE,MAAc,GACvB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;CAOhE"}
|
package/dist/modules/messages.js
CHANGED
|
@@ -32,6 +32,13 @@ export class MessagesModule extends BaseModule {
|
|
|
32
32
|
* @param options OTP configuration (code, app name, expiry minutes)
|
|
33
33
|
*/
|
|
34
34
|
async sendOTP(recipient, options) {
|
|
35
|
+
if (this.config.platform === 'telegram') {
|
|
36
|
+
return this.send({
|
|
37
|
+
recipient,
|
|
38
|
+
type: 'otp',
|
|
39
|
+
...options,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
35
42
|
return this.request({
|
|
36
43
|
method: 'POST',
|
|
37
44
|
path: this.buildPath('otp'),
|
|
@@ -123,6 +130,14 @@ export class MessagesModule extends BaseModule {
|
|
|
123
130
|
* Sends a contact vCard card.
|
|
124
131
|
*/
|
|
125
132
|
async sendContact(recipient, contact, options) {
|
|
133
|
+
if (this.config.platform === 'telegram') {
|
|
134
|
+
return this.send({
|
|
135
|
+
recipient,
|
|
136
|
+
type: 'contact',
|
|
137
|
+
...contact,
|
|
138
|
+
...options,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
126
141
|
return this.request({
|
|
127
142
|
method: 'POST',
|
|
128
143
|
path: this.buildPath('messages/contact'),
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ export interface BotcastClientConfig {
|
|
|
10
10
|
* Default: `https://botcast.site`
|
|
11
11
|
*/
|
|
12
12
|
baseUrl?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Platform type: 'whatsapp' or 'telegram'. Default: 'whatsapp'.
|
|
15
|
+
*/
|
|
16
|
+
platform?: 'whatsapp' | 'telegram';
|
|
13
17
|
/**
|
|
14
18
|
* Your unique Botcast Instance ID.
|
|
15
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAEnC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "botcast-sdk",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Official TypeScript/JavaScript SDK for Botcast WhatsApp Multi-Instance API Gateway",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Official TypeScript/JavaScript SDK for Botcast WhatsApp & Telegram MTProto Multi-Instance API Gateway",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -33,9 +33,14 @@
|
|
|
33
33
|
"whatsapp",
|
|
34
34
|
"whatsapp-api",
|
|
35
35
|
"whatsapp-gateway",
|
|
36
|
+
"telegram",
|
|
37
|
+
"telegram-api",
|
|
38
|
+
"mtproto",
|
|
39
|
+
"teleproto",
|
|
36
40
|
"baileys",
|
|
37
41
|
"multi-instance",
|
|
38
42
|
"whatsapp-bot",
|
|
43
|
+
"telegram-bot",
|
|
39
44
|
"otp",
|
|
40
45
|
"messaging",
|
|
41
46
|
"sms-alternative",
|