wuzapi 1.8.5 → 1.9.0
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 +86 -13
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/admin.d.ts +9 -1
- package/dist/modules/admin.js +12 -0
- package/dist/modules/admin.js.map +1 -1
- package/dist/modules/call.d.ts +9 -0
- package/dist/modules/chat.d.ts +13 -1
- package/dist/modules/chat.js +32 -0
- package/dist/modules/chat.js.map +1 -1
- package/dist/modules/session.d.ts +13 -1
- package/dist/modules/session.js +19 -0
- package/dist/modules/session.js.map +1 -1
- package/dist/modules/status.d.ts +9 -0
- package/dist/modules/user.d.ts +5 -1
- package/dist/modules/user.js +6 -0
- package/dist/modules/user.js.map +1 -1
- package/dist/types/admin.d.ts +45 -0
- package/dist/types/call.d.ts +7 -0
- package/dist/types/chat.d.ts +15 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/session.d.ts +10 -0
- package/dist/types/status.d.ts +6 -0
- package/dist/types/user.d.ts +4 -0
- package/dist/wuzapi-client.d.ts +4 -0
- package/dist/wuzapi-client.js +9 -42
- package/dist/wuzapi-client.js.map +1 -1
- package/dist/wuzapi-client2.js +69 -0
- package/dist/wuzapi-client2.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@ A comprehensive TypeScript client library for the [WuzAPI WhatsApp API](https://
|
|
|
11
11
|
- 📦 **Tree Shakable** - Import only what you need
|
|
12
12
|
- 🔧 **Easy Configuration** - Simple setup with minimal configuration
|
|
13
13
|
- 📖 **Well Documented** - Extensive documentation and examples
|
|
14
|
+
- 📞 **Call Management** - Reject incoming calls
|
|
15
|
+
- 📝 **Status Updates** - Set WhatsApp status text
|
|
14
16
|
|
|
15
17
|
## 📦 Installation
|
|
16
18
|
|
|
@@ -351,6 +353,19 @@ await client.session.testS3();
|
|
|
351
353
|
await client.session.deleteS3Config();
|
|
352
354
|
```
|
|
353
355
|
|
|
356
|
+
### HMAC Configuration
|
|
357
|
+
|
|
358
|
+
```typescript
|
|
359
|
+
// Configure HMAC key for webhook signing (minimum 32 characters)
|
|
360
|
+
await client.session.configureHmac("your_hmac_key_minimum_32_characters_long");
|
|
361
|
+
|
|
362
|
+
// Get HMAC configuration status
|
|
363
|
+
const hmacConfig = await client.session.getHmacConfig();
|
|
364
|
+
|
|
365
|
+
// Delete HMAC configuration
|
|
366
|
+
await client.session.deleteHmacConfig();
|
|
367
|
+
```
|
|
368
|
+
|
|
354
369
|
</details>
|
|
355
370
|
|
|
356
371
|
<details>
|
|
@@ -533,14 +548,40 @@ await client.chat.sendContact({
|
|
|
533
548
|
### Media Download
|
|
534
549
|
|
|
535
550
|
```typescript
|
|
536
|
-
// Download
|
|
537
|
-
const
|
|
551
|
+
// Download image
|
|
552
|
+
const image = await client.chat.downloadImage({
|
|
538
553
|
Url: "https://mmg.whatsapp.net/d/f/...",
|
|
539
554
|
MediaKey: "media-key...",
|
|
540
555
|
Mimetype: "image/jpeg",
|
|
541
556
|
FileSHA256: "file-hash...",
|
|
542
557
|
FileLength: 2039,
|
|
543
558
|
});
|
|
559
|
+
|
|
560
|
+
// Download sticker
|
|
561
|
+
const sticker = await client.chat.downloadSticker({
|
|
562
|
+
Url: "https://mmg.whatsapp.net/d/f/...",
|
|
563
|
+
MediaKey: "media-key...",
|
|
564
|
+
Mimetype: "image/webp",
|
|
565
|
+
FileSHA256: "file-hash...",
|
|
566
|
+
FileLength: 1024,
|
|
567
|
+
});
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
### Chat Management
|
|
571
|
+
|
|
572
|
+
```typescript
|
|
573
|
+
// Archive a chat
|
|
574
|
+
await client.chat.archiveChat("5491155554444@s.whatsapp.net", true);
|
|
575
|
+
|
|
576
|
+
// Unarchive a chat
|
|
577
|
+
await client.chat.archiveChat("5491155554444@s.whatsapp.net", false);
|
|
578
|
+
|
|
579
|
+
// Request unavailable message (for messages that couldn't be decrypted)
|
|
580
|
+
await client.chat.requestUnavailableMessage(
|
|
581
|
+
"5491155554444@s.whatsapp.net", // chat JID
|
|
582
|
+
"5491155554444@s.whatsapp.net", // sender JID
|
|
583
|
+
"ABCD1234" // message ID
|
|
584
|
+
);
|
|
544
585
|
```
|
|
545
586
|
|
|
546
587
|
</details>
|
|
@@ -563,6 +604,10 @@ const contacts = await client.user.getContacts();
|
|
|
563
604
|
|
|
564
605
|
// Send user presence (online/offline status)
|
|
565
606
|
await client.user.sendPresence("available"); // or "unavailable"
|
|
607
|
+
|
|
608
|
+
// Get LID (Linked ID) from phone number
|
|
609
|
+
const lid = await client.user.getLid("5491155554444");
|
|
610
|
+
console.log("LID:", lid.LID);
|
|
566
611
|
```
|
|
567
612
|
|
|
568
613
|
</details>
|
|
@@ -657,6 +702,9 @@ await client.group.updateParticipants(
|
|
|
657
702
|
// List all users
|
|
658
703
|
const users = await client.admin.listUsers({ token: "admin-token" });
|
|
659
704
|
|
|
705
|
+
// Get a specific user by ID
|
|
706
|
+
const user = await client.admin.getUser("user-id-string", { token: "admin-token" });
|
|
707
|
+
|
|
660
708
|
// Add new user
|
|
661
709
|
const newUser = await client.admin.addUser(
|
|
662
710
|
{
|
|
@@ -687,6 +735,18 @@ const newUser = await client.admin.addUser(
|
|
|
687
735
|
// Delete user by ID (ID is a string)
|
|
688
736
|
await client.admin.deleteUser("user-id-string", { token: "admin-token" });
|
|
689
737
|
|
|
738
|
+
// Update/edit a user
|
|
739
|
+
await client.admin.updateUser(
|
|
740
|
+
"user-id-string",
|
|
741
|
+
{
|
|
742
|
+
name: "Updated Name",
|
|
743
|
+
webhook: "https://new-webhook.com/webhook",
|
|
744
|
+
events: "Message,ReadReceipt",
|
|
745
|
+
history: 100,
|
|
746
|
+
},
|
|
747
|
+
{ token: "admin-token" }
|
|
748
|
+
);
|
|
749
|
+
|
|
690
750
|
// Delete user completely (full deletion including all data)
|
|
691
751
|
await client.admin.deleteUserComplete("user-id-string", {
|
|
692
752
|
token: "admin-token",
|
|
@@ -916,6 +976,29 @@ newsletters.Newsletters.forEach((newsletter) => {
|
|
|
916
976
|
|
|
917
977
|
</details>
|
|
918
978
|
|
|
979
|
+
<details>
|
|
980
|
+
<summary><strong>📝 Status Module</strong> - WhatsApp status updates</summary>
|
|
981
|
+
|
|
982
|
+
```typescript
|
|
983
|
+
// Set status text message
|
|
984
|
+
await client.status.setStatusText("Hello from WuzAPI! 🎉");
|
|
985
|
+
```
|
|
986
|
+
|
|
987
|
+
</details>
|
|
988
|
+
|
|
989
|
+
<details>
|
|
990
|
+
<summary><strong>📞 Call Module</strong> - Call management</summary>
|
|
991
|
+
|
|
992
|
+
```typescript
|
|
993
|
+
// Reject an incoming call
|
|
994
|
+
await client.call.rejectCall(
|
|
995
|
+
"5491155554444", // call_from: phone number of caller
|
|
996
|
+
"CALL_ID_12345" // call_id: unique call identifier from webhook
|
|
997
|
+
);
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
</details>
|
|
1001
|
+
|
|
919
1002
|
---
|
|
920
1003
|
|
|
921
1004
|
## 🎣 Webhook Event Handling
|
|
@@ -1362,17 +1445,7 @@ MIT License - see the [LICENSE](LICENSE) file for details.
|
|
|
1362
1445
|
|
|
1363
1446
|
## 📊 Changelog
|
|
1364
1447
|
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
- ✅ **Chat History**: Added chat history new endpoint
|
|
1368
|
-
- ✅ **Phone Pairing**: Alternative to QR code login
|
|
1369
|
-
- ✅ **Interactive Messages**: Buttons, lists, and polls
|
|
1370
|
-
- ✅ **Message Management**: Edit and delete messages
|
|
1371
|
-
- ✅ **Advanced Groups**: Full participant management
|
|
1372
|
-
- ✅ **Newsletter Support**: Business newsletter features
|
|
1373
|
-
- ✅ **Enhanced Webhooks**: Update and delete webhook configs
|
|
1374
|
-
- ✅ **Proxy Support**: Configure proxy for connections
|
|
1375
|
-
- ✅ **History Sync**: Request message history after login
|
|
1448
|
+
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
|
|
1376
1449
|
|
|
1377
1450
|
---
|
|
1378
1451
|
|
package/dist/index.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ export { ChatModule } from './modules/chat.js';
|
|
|
8
8
|
export { GroupModule } from './modules/group.js';
|
|
9
9
|
export { WebhookModule } from './modules/webhook.js';
|
|
10
10
|
export { NewsletterModule } from './modules/newsletter.js';
|
|
11
|
+
export { StatusModule } from './modules/status.js';
|
|
12
|
+
export { CallModule } from './modules/call.js';
|
|
11
13
|
export { WuzapiClient as default } from './wuzapi-client.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const wuzapiClient = require("./wuzapi-
|
|
3
|
+
const wuzapiClient = require("./wuzapi-client2.js");
|
|
4
4
|
const client = require("./client.js");
|
|
5
5
|
const webhook = require("./webhook.js");
|
|
6
6
|
const types_index = require("./types/index.js");
|
|
@@ -11,6 +11,8 @@ const modules_chat = require("./modules/chat.js");
|
|
|
11
11
|
const modules_group = require("./modules/group.js");
|
|
12
12
|
const modules_webhook = require("./modules/webhook.js");
|
|
13
13
|
const modules_newsletter = require("./modules/newsletter.js");
|
|
14
|
+
exports.CallModule = wuzapiClient.CallModule;
|
|
15
|
+
exports.StatusModule = wuzapiClient.StatusModule;
|
|
14
16
|
exports.WuzapiClient = wuzapiClient.WuzapiClient;
|
|
15
17
|
exports.default = wuzapiClient.WuzapiClient;
|
|
16
18
|
exports.WuzapiError = client.WuzapiError;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/modules/admin.d.ts
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
2
|
import { RequestOptions } from '../types/common.js';
|
|
3
|
-
import { User, CreateUserRequest, CreateUserResponse, DeleteUserResponse } from '../types/admin.js';
|
|
3
|
+
import { User, CreateUserRequest, CreateUserResponse, DeleteUserResponse, UpdateUserRequest, UpdateUserResponse } from '../types/admin.js';
|
|
4
4
|
export declare class AdminModule extends BaseClient {
|
|
5
5
|
/**
|
|
6
6
|
* List all users
|
|
7
7
|
*/
|
|
8
8
|
listUsers(options?: RequestOptions): Promise<User[]>;
|
|
9
|
+
/**
|
|
10
|
+
* Get a user by ID
|
|
11
|
+
*/
|
|
12
|
+
getUser(id: string, options?: RequestOptions): Promise<User>;
|
|
9
13
|
/**
|
|
10
14
|
* Add a new user
|
|
11
15
|
*/
|
|
12
16
|
addUser(user: CreateUserRequest, options?: RequestOptions): Promise<CreateUserResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Update/edit a user by ID
|
|
19
|
+
*/
|
|
20
|
+
updateUser(id: string, user: UpdateUserRequest, options?: RequestOptions): Promise<UpdateUserResponse>;
|
|
13
21
|
/**
|
|
14
22
|
* Delete a user by ID
|
|
15
23
|
*/
|
package/dist/modules/admin.js
CHANGED
|
@@ -8,12 +8,24 @@ class AdminModule extends client.BaseClient {
|
|
|
8
8
|
async listUsers(options) {
|
|
9
9
|
return this.get("/admin/users", options);
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Get a user by ID
|
|
13
|
+
*/
|
|
14
|
+
async getUser(id, options) {
|
|
15
|
+
return this.get(`/admin/users/${id}`, options);
|
|
16
|
+
}
|
|
11
17
|
/**
|
|
12
18
|
* Add a new user
|
|
13
19
|
*/
|
|
14
20
|
async addUser(user, options) {
|
|
15
21
|
return this.post("/admin/users", user, options);
|
|
16
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Update/edit a user by ID
|
|
25
|
+
*/
|
|
26
|
+
async updateUser(id, user, options) {
|
|
27
|
+
return this.put(`/admin/users/${id}`, user, options);
|
|
28
|
+
}
|
|
17
29
|
/**
|
|
18
30
|
* Delete a user by ID
|
|
19
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sources":["../../src/modules/admin.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n User,\n CreateUserRequest,\n CreateUserResponse,\n DeleteUserResponse,\n} from \"../types/admin.js\";\n\nexport class AdminModule extends BaseClient {\n /**\n * List all users\n */\n async listUsers(options?: RequestOptions): Promise<User[]> {\n return this.get<User[]>(\"/admin/users\", options);\n }\n\n /**\n * Add a new user\n */\n async addUser(\n user: CreateUserRequest,\n options?: RequestOptions\n ): Promise<CreateUserResponse> {\n return this.post<CreateUserResponse>(\"/admin/users\", user, options);\n }\n\n /**\n * Delete a user by ID\n */\n async deleteUser(\n id: string,\n options?: RequestOptions\n ): Promise<DeleteUserResponse> {\n return this.delete<DeleteUserResponse>(`/admin/users/${id}`, options);\n }\n\n /**\n * Delete a user completely (full deletion) by ID\n */\n async deleteUserComplete(\n id: string,\n options?: RequestOptions\n ): Promise<DeleteUserResponse> {\n return this.delete<DeleteUserResponse>(`/admin/users/${id}/full`, options);\n }\n}\n"],"names":["BaseClient"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"admin.js","sources":["../../src/modules/admin.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n User,\n CreateUserRequest,\n CreateUserResponse,\n DeleteUserResponse,\n UpdateUserRequest,\n UpdateUserResponse,\n} from \"../types/admin.js\";\n\nexport class AdminModule extends BaseClient {\n /**\n * List all users\n */\n async listUsers(options?: RequestOptions): Promise<User[]> {\n return this.get<User[]>(\"/admin/users\", options);\n }\n\n /**\n * Get a user by ID\n */\n async getUser(id: string, options?: RequestOptions): Promise<User> {\n return this.get<User>(`/admin/users/${id}`, options);\n }\n\n /**\n * Add a new user\n */\n async addUser(\n user: CreateUserRequest,\n options?: RequestOptions\n ): Promise<CreateUserResponse> {\n return this.post<CreateUserResponse>(\"/admin/users\", user, options);\n }\n\n /**\n * Update/edit a user by ID\n */\n async updateUser(\n id: string,\n user: UpdateUserRequest,\n options?: RequestOptions\n ): Promise<UpdateUserResponse> {\n return this.put<UpdateUserResponse>(`/admin/users/${id}`, user, options);\n }\n\n /**\n * Delete a user by ID\n */\n async deleteUser(\n id: string,\n options?: RequestOptions\n ): Promise<DeleteUserResponse> {\n return this.delete<DeleteUserResponse>(`/admin/users/${id}`, options);\n }\n\n /**\n * Delete a user completely (full deletion) by ID\n */\n async deleteUserComplete(\n id: string,\n options?: RequestOptions\n ): Promise<DeleteUserResponse> {\n return this.delete<DeleteUserResponse>(`/admin/users/${id}/full`, options);\n }\n}\n"],"names":["BaseClient"],"mappings":";;;AAWO,MAAM,oBAAoBA,OAAAA,WAAW;AAAA;AAAA;AAAA;AAAA,EAI1C,MAAM,UAAU,SAA2C;AACzD,WAAO,KAAK,IAAY,gBAAgB,OAAO;AAAA,EACjD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAQ,IAAY,SAAyC;AACjE,WAAO,KAAK,IAAU,gBAAgB,EAAE,IAAI,OAAO;AAAA,EACrD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QACJ,MACA,SAC6B;AAC7B,WAAO,KAAK,KAAyB,gBAAgB,MAAM,OAAO;AAAA,EACpE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,WACJ,IACA,MACA,SAC6B;AAC7B,WAAO,KAAK,IAAwB,gBAAgB,EAAE,IAAI,MAAM,OAAO;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,WACJ,IACA,SAC6B;AAC7B,WAAO,KAAK,OAA2B,gBAAgB,EAAE,IAAI,OAAO;AAAA,EACtE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,mBACJ,IACA,SAC6B;AAC7B,WAAO,KAAK,OAA2B,gBAAgB,EAAE,SAAS,OAAO;AAAA,EAC3E;AACF;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseClient } from '../client.js';
|
|
2
|
+
import { RequestOptions } from '../types/common.js';
|
|
3
|
+
import { RejectCallResponse } from '../types/call.js';
|
|
4
|
+
export declare class CallModule extends BaseClient {
|
|
5
|
+
/**
|
|
6
|
+
* Reject an incoming call
|
|
7
|
+
*/
|
|
8
|
+
rejectCall(callFrom: string, callId: string, options?: RequestOptions): Promise<RejectCallResponse>;
|
|
9
|
+
}
|
package/dist/modules/chat.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
2
|
import { RequestOptions } from '../types/common.js';
|
|
3
|
-
import { SendMessageResponse, SendTextRequest, SendTemplateRequest, SendAudioRequest, SendImageRequest, SendDocumentRequest, SendVideoRequest, SendStickerRequest, SendLocationRequest, SendContactRequest, ChatPresenceRequest, MarkReadRequest, MarkReadResponse, ReactRequest, DownloadMediaRequest, DownloadMediaResponse, DeleteMessageResponse, SendButtonsRequest, ListSection, GetChatHistoryResponse } from '../types/chat.js';
|
|
3
|
+
import { SendMessageResponse, SendTextRequest, SendTemplateRequest, SendAudioRequest, SendImageRequest, SendDocumentRequest, SendVideoRequest, SendStickerRequest, SendLocationRequest, SendContactRequest, ChatPresenceRequest, MarkReadRequest, MarkReadResponse, ReactRequest, DownloadMediaRequest, DownloadMediaResponse, DeleteMessageResponse, SendButtonsRequest, ListSection, GetChatHistoryResponse, RequestUnavailableMessageResponse, ArchiveChatResponse } from '../types/chat.js';
|
|
4
4
|
export declare class ChatModule extends BaseClient {
|
|
5
5
|
/**
|
|
6
6
|
* Send a text message
|
|
@@ -90,4 +90,16 @@ export declare class ChatModule extends BaseClient {
|
|
|
90
90
|
* Get chat message history
|
|
91
91
|
*/
|
|
92
92
|
getChatHistory(chatJid: string, limit?: number, options?: RequestOptions): Promise<GetChatHistoryResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* Request a copy of a message that couldn't be decrypted
|
|
95
|
+
*/
|
|
96
|
+
requestUnavailableMessage(chat: string, sender: string, messageId: string, options?: RequestOptions): Promise<RequestUnavailableMessageResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* Archive or unarchive a chat
|
|
99
|
+
*/
|
|
100
|
+
archiveChat(jid: string, archive: boolean, options?: RequestOptions): Promise<ArchiveChatResponse>;
|
|
101
|
+
/**
|
|
102
|
+
* Download a sticker from a message
|
|
103
|
+
*/
|
|
104
|
+
downloadSticker(request: DownloadMediaRequest, options?: RequestOptions): Promise<DownloadMediaResponse>;
|
|
93
105
|
}
|
package/dist/modules/chat.js
CHANGED
|
@@ -206,6 +206,38 @@ class ChatModule extends client.BaseClient {
|
|
|
206
206
|
options
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Request a copy of a message that couldn't be decrypted
|
|
211
|
+
*/
|
|
212
|
+
async requestUnavailableMessage(chat, sender, messageId, options) {
|
|
213
|
+
const request = {
|
|
214
|
+
chat,
|
|
215
|
+
sender,
|
|
216
|
+
id: messageId
|
|
217
|
+
};
|
|
218
|
+
return this.post(
|
|
219
|
+
"/chat/request-unavailable-message",
|
|
220
|
+
request,
|
|
221
|
+
options
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Archive or unarchive a chat
|
|
226
|
+
*/
|
|
227
|
+
async archiveChat(jid, archive, options) {
|
|
228
|
+
const request = { jid, archive };
|
|
229
|
+
return this.post("/chat/archive", request, options);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Download a sticker from a message
|
|
233
|
+
*/
|
|
234
|
+
async downloadSticker(request, options) {
|
|
235
|
+
return this.post(
|
|
236
|
+
"/chat/downloadsticker",
|
|
237
|
+
request,
|
|
238
|
+
options
|
|
239
|
+
);
|
|
240
|
+
}
|
|
209
241
|
}
|
|
210
242
|
exports.ChatModule = ChatModule;
|
|
211
243
|
//# sourceMappingURL=chat.js.map
|
package/dist/modules/chat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sources":["../../src/modules/chat.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n SendMessageResponse,\n SendTextRequest,\n SendTemplateRequest,\n SendAudioRequest,\n SendImageRequest,\n SendDocumentRequest,\n SendVideoRequest,\n SendStickerRequest,\n SendLocationRequest,\n SendContactRequest,\n ChatPresenceRequest,\n MarkReadRequest,\n MarkReadResponse,\n ReactRequest,\n DownloadMediaRequest,\n DownloadMediaResponse,\n DeleteMessageRequest,\n DeleteMessageResponse,\n SendButtonsRequest,\n SendListRequest,\n SendPollRequest,\n EditMessageRequest,\n ListSection,\n GetChatHistoryResponse,\n} from \"../types/chat.js\";\n\nexport class ChatModule extends BaseClient {\n /**\n * Send a text message\n */\n async sendText(\n request: SendTextRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/text\", request, options);\n }\n\n /**\n * Send a template message with buttons\n */\n async sendTemplate(\n request: SendTemplateRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/template\",\n request,\n options\n );\n }\n\n /**\n * Send an audio message\n */\n async sendAudio(\n request: SendAudioRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/audio\", request, options);\n }\n\n /**\n * Send an image message\n */\n async sendImage(\n request: SendImageRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/image\", request, options);\n }\n\n /**\n * Send a document message\n */\n async sendDocument(\n request: SendDocumentRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/document\",\n request,\n options\n );\n }\n\n /**\n * Send a video message\n */\n async sendVideo(\n request: SendVideoRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/video\", request, options);\n }\n\n /**\n * Send a sticker message\n */\n async sendSticker(\n request: SendStickerRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/sticker\",\n request,\n options\n );\n }\n\n /**\n * Send a location message\n */\n async sendLocation(\n request: SendLocationRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/location\",\n request,\n options\n );\n }\n\n /**\n * Send a contact message\n */\n async sendContact(\n request: SendContactRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/contact\",\n request,\n options\n );\n }\n\n /**\n * Send chat presence indication (typing indicator)\n */\n async sendPresence(\n request: ChatPresenceRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.post<void>(\"/chat/presence\", request, options);\n }\n\n /**\n * Mark messages as read\n */\n async markRead(\n request: MarkReadRequest,\n options?: RequestOptions\n ): Promise<MarkReadResponse> {\n return this.post<MarkReadResponse>(\"/chat/markread\", request, options);\n }\n\n /**\n * React to a message\n */\n async react(\n request: ReactRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/react\", request, options);\n }\n\n /**\n * Download an image from a message\n */\n async downloadImage(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloadimage\",\n request,\n options\n );\n }\n\n /**\n * Download a video from a message\n */\n async downloadVideo(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloadvideo\",\n request,\n options\n );\n }\n\n /**\n * Download an audio from a message\n */\n async downloadAudio(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloadaudio\",\n request,\n options\n );\n }\n\n /**\n * Download a document from a message\n */\n async downloadDocument(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloaddocument\",\n request,\n options\n );\n }\n\n /**\n * Delete a message\n */\n async deleteMessage(\n messageId: string,\n options?: RequestOptions\n ): Promise<DeleteMessageResponse> {\n const request: DeleteMessageRequest = { Id: messageId };\n return this.post<DeleteMessageResponse>(\"/chat/delete\", request, options);\n }\n\n /**\n * Send interactive buttons message\n */\n async sendButtons(\n request: SendButtonsRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/buttons\",\n request,\n options\n );\n }\n\n /**\n * Send list message\n */\n async sendList(\n phone: string,\n buttonText: string,\n description: string,\n topText: string,\n sections?: ListSection[],\n footerText?: string,\n id?: string,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n const request: SendListRequest = {\n Phone: phone,\n ButtonText: buttonText,\n Desc: description,\n TopText: topText,\n Sections: sections,\n FooterText: footerText,\n Id: id,\n };\n return this.post<SendMessageResponse>(\"/chat/send/list\", request, options);\n }\n\n /**\n * Send poll message\n */\n async sendPoll(\n groupJID: string,\n header: string,\n options: string[],\n id?: string,\n requestOptions?: RequestOptions\n ): Promise<SendMessageResponse> {\n const request: SendPollRequest = {\n Group: groupJID,\n Header: header,\n Options: options,\n Id: id,\n };\n return this.post<SendMessageResponse>(\n \"/chat/send/poll\",\n request,\n requestOptions\n );\n }\n\n /**\n * Edit a message\n */\n async editMessage(\n messageId: string,\n phone: string,\n newBody: string,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n const request: EditMessageRequest = {\n Id: messageId,\n Phone: phone,\n Body: newBody,\n };\n return this.post<SendMessageResponse>(\"/chat/send/edit\", request, options);\n }\n\n /**\n * Get chat message history\n */\n async getChatHistory(\n chatJid: string,\n limit?: number,\n options?: RequestOptions\n ): Promise<GetChatHistoryResponse> {\n const queryParams: string[] = [`chat_jid=${encodeURIComponent(chatJid)}`];\n\n if (limit !== undefined) {\n queryParams.push(`limit=${limit}`);\n }\n\n return this.get<GetChatHistoryResponse>(\n `/chat/history?${queryParams.join(\"&\")}`,\n options\n );\n }\n}\n"],"names":["BaseClient"],"mappings":";;;AA6BO,MAAM,mBAAmBA,OAAAA,WAAW;AAAA;AAAA;AAAA;AAAA,EAIzC,MAAM,SACJ,SACA,SAC8B;AAC9B,WAAO,KAAK,KAA0B,mBAAmB,SAAS,OAAO;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aACJ,SACA,SAC8B;AAC9B,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,SACA,SAC8B;AAC9B,WAAO,KAAK,KAA0B,oBAAoB,SAAS,OAAO;AAAA,EAC5E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,SACA,SAC8B;AAC9B,WAAO,KAAK,KAA0B,oBAAoB,SAAS,OAAO;AAAA,EAC5E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aACJ,SACA,SAC8B;AAC9B,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,SACA,SAC8B;AAC9B,WAAO,KAAK,KAA0B,oBAAoB,SAAS,OAAO;AAAA,EAC5E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,YACJ,SACA,SAC8B;AAC9B,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,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Content":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n SendMessageResponse,\n SendTextRequest,\n SendTemplateRequest,\n SendAudioRequest,\n SendImageRequest,\n SendDocumentRequest,\n SendVideoRequest,\n SendStickerRequest,\n SendLocationRequest,\n SendContactRequest,\n ChatPresenceRequest,\n MarkReadRequest,\n MarkReadResponse,\n ReactRequest,\n DownloadMediaRequest,\n DownloadMediaResponse,\n DeleteMessageRequest,\n DeleteMessageResponse,\n SendButtonsRequest,\n SendListRequest,\n SendPollRequest,\n EditMessageRequest,\n ListSection,\n GetChatHistoryResponse,\n RequestUnavailableMessageRequest,\n RequestUnavailableMessageResponse,\n ArchiveChatRequest,\n ArchiveChatResponse,\n} from \"../types/chat.js\";\n\nexport class ChatModule extends BaseClient {\n /**\n * Send a text message\n */\n async sendText(\n request: SendTextRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/text\", request, options);\n }\n\n /**\n * Send a template message with buttons\n */\n async sendTemplate(\n request: SendTemplateRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/template\",\n request,\n options\n );\n }\n\n /**\n * Send an audio message\n */\n async sendAudio(\n request: SendAudioRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/audio\", request, options);\n }\n\n /**\n * Send an image message\n */\n async sendImage(\n request: SendImageRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/image\", request, options);\n }\n\n /**\n * Send a document message\n */\n async sendDocument(\n request: SendDocumentRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/document\",\n request,\n options\n );\n }\n\n /**\n * Send a video message\n */\n async sendVideo(\n request: SendVideoRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/send/video\", request, options);\n }\n\n /**\n * Send a sticker message\n */\n async sendSticker(\n request: SendStickerRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/sticker\",\n request,\n options\n );\n }\n\n /**\n * Send a location message\n */\n async sendLocation(\n request: SendLocationRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/location\",\n request,\n options\n );\n }\n\n /**\n * Send a contact message\n */\n async sendContact(\n request: SendContactRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/contact\",\n request,\n options\n );\n }\n\n /**\n * Send chat presence indication (typing indicator)\n */\n async sendPresence(\n request: ChatPresenceRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.post<void>(\"/chat/presence\", request, options);\n }\n\n /**\n * Mark messages as read\n */\n async markRead(\n request: MarkReadRequest,\n options?: RequestOptions\n ): Promise<MarkReadResponse> {\n return this.post<MarkReadResponse>(\"/chat/markread\", request, options);\n }\n\n /**\n * React to a message\n */\n async react(\n request: ReactRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\"/chat/react\", request, options);\n }\n\n /**\n * Download an image from a message\n */\n async downloadImage(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloadimage\",\n request,\n options\n );\n }\n\n /**\n * Download a video from a message\n */\n async downloadVideo(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloadvideo\",\n request,\n options\n );\n }\n\n /**\n * Download an audio from a message\n */\n async downloadAudio(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloadaudio\",\n request,\n options\n );\n }\n\n /**\n * Download a document from a message\n */\n async downloadDocument(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloaddocument\",\n request,\n options\n );\n }\n\n /**\n * Delete a message\n */\n async deleteMessage(\n messageId: string,\n options?: RequestOptions\n ): Promise<DeleteMessageResponse> {\n const request: DeleteMessageRequest = { Id: messageId };\n return this.post<DeleteMessageResponse>(\"/chat/delete\", request, options);\n }\n\n /**\n * Send interactive buttons message\n */\n async sendButtons(\n request: SendButtonsRequest,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n return this.post<SendMessageResponse>(\n \"/chat/send/buttons\",\n request,\n options\n );\n }\n\n /**\n * Send list message\n */\n async sendList(\n phone: string,\n buttonText: string,\n description: string,\n topText: string,\n sections?: ListSection[],\n footerText?: string,\n id?: string,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n const request: SendListRequest = {\n Phone: phone,\n ButtonText: buttonText,\n Desc: description,\n TopText: topText,\n Sections: sections,\n FooterText: footerText,\n Id: id,\n };\n return this.post<SendMessageResponse>(\"/chat/send/list\", request, options);\n }\n\n /**\n * Send poll message\n */\n async sendPoll(\n groupJID: string,\n header: string,\n options: string[],\n id?: string,\n requestOptions?: RequestOptions\n ): Promise<SendMessageResponse> {\n const request: SendPollRequest = {\n Group: groupJID,\n Header: header,\n Options: options,\n Id: id,\n };\n return this.post<SendMessageResponse>(\n \"/chat/send/poll\",\n request,\n requestOptions\n );\n }\n\n /**\n * Edit a message\n */\n async editMessage(\n messageId: string,\n phone: string,\n newBody: string,\n options?: RequestOptions\n ): Promise<SendMessageResponse> {\n const request: EditMessageRequest = {\n Id: messageId,\n Phone: phone,\n Body: newBody,\n };\n return this.post<SendMessageResponse>(\"/chat/send/edit\", request, options);\n }\n\n /**\n * Get chat message history\n */\n async getChatHistory(\n chatJid: string,\n limit?: number,\n options?: RequestOptions\n ): Promise<GetChatHistoryResponse> {\n const queryParams: string[] = [`chat_jid=${encodeURIComponent(chatJid)}`];\n\n if (limit !== undefined) {\n queryParams.push(`limit=${limit}`);\n }\n\n return this.get<GetChatHistoryResponse>(\n `/chat/history?${queryParams.join(\"&\")}`,\n options\n );\n }\n\n /**\n * Request a copy of a message that couldn't be decrypted\n */\n async requestUnavailableMessage(\n chat: string,\n sender: string,\n messageId: string,\n options?: RequestOptions\n ): Promise<RequestUnavailableMessageResponse> {\n const request: RequestUnavailableMessageRequest = {\n chat,\n sender,\n id: messageId,\n };\n return this.post<RequestUnavailableMessageResponse>(\n \"/chat/request-unavailable-message\",\n request,\n options\n );\n }\n\n /**\n * Archive or unarchive a chat\n */\n async archiveChat(\n jid: string,\n archive: boolean,\n options?: RequestOptions\n ): Promise<ArchiveChatResponse> {\n const request: ArchiveChatRequest = { jid, archive };\n return this.post<ArchiveChatResponse>(\"/chat/archive\", request, options);\n }\n\n /**\n * Download a sticker from a message\n */\n async downloadSticker(\n request: DownloadMediaRequest,\n options?: RequestOptions\n ): Promise<DownloadMediaResponse> {\n return this.post<DownloadMediaResponse>(\n \"/chat/downloadsticker\",\n request,\n options\n );\n }\n}\n"],"names":["BaseClient"],"mappings":";;;AAiCO,MAAM,mBAAmBA,OAAAA,WAAW;AAAA;AAAA;AAAA;AAAA,EAIzC,MAAM,SACJ,SACA,SAC8B;AAC9B,WAAO,KAAK,KAA0B,mBAAmB,SAAS,OAAO;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aACJ,SACA,SAC8B;AAC9B,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,SACA,SAC8B;AAC9B,WAAO,KAAK,KAA0B,oBAAoB,SAAS,OAAO;AAAA,EAC5E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,SACA,SAC8B;AAC9B,WAAO,KAAK,KAA0B,oBAAoB,SAAS,OAAO;AAAA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A,IAAA;AAER,WAAO,KAAK,KAA0B,mBAAmB,SAAS,OAAO;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,eACJ,SACA,OACA,SACiC;AACjC,UAAM,cAAwB,CAAC,YAAY,mBAAmB,OAAO,CAAC,EAAE;AAExE,QAAI,UAAU,QAAW;AACvB,kBAAY,KAAK,SAAS,KAAK,EAAE;AAAA,IACnC;AAEA,WAAO,KAAK;AAAA,MACV,iBAAiB,YAAY,KAAK,GAAG,CAAC;AAAA,MACtC;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,0BACJ,MACA,QACA,WACA,SAC4C;AAC5C,UAAM,UAA4C;AAAA,MAChD;AAAA,MACA;AAAA,MACA,IAAI;AAAA,IAAA;AAEN,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,YACJ,KACA,SACA,SAC8B;AAC9B,UAAM,UAA8B,EAAE,KAAK,QAAA;AAC3C,WAAO,KAAK,KAA0B,iBAAiB,SAAS,OAAO;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,gBACJ,SACA,SACgC;AAChC,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
|
-
import { ConnectRequest, ConnectResponse, DisconnectResponse, LogoutResponse, StatusResponse, QRCodeResponse, S3TestResponse, PairPhoneResponse, HistoryResponse, ProxyResponse, HistoryCountResponse } from '../types/session.js';
|
|
2
|
+
import { ConnectRequest, ConnectResponse, DisconnectResponse, LogoutResponse, StatusResponse, QRCodeResponse, S3TestResponse, PairPhoneResponse, HistoryResponse, ProxyResponse, HistoryCountResponse, HmacConfigResponse, HmacDeleteResponse } from '../types/session.js';
|
|
3
3
|
import { S3Config, RequestOptions, S3ConfigResponse } from '../types/common.js';
|
|
4
4
|
export declare class SessionModule extends BaseClient {
|
|
5
5
|
/**
|
|
@@ -56,4 +56,16 @@ export declare class SessionModule extends BaseClient {
|
|
|
56
56
|
* Set proxy configuration
|
|
57
57
|
*/
|
|
58
58
|
setProxy(proxyURL: string, enable?: boolean, options?: RequestOptions): Promise<ProxyResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Configure HMAC key for webhook signing
|
|
61
|
+
*/
|
|
62
|
+
configureHmac(hmacKey: string, options?: RequestOptions): Promise<HmacConfigResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Get HMAC configuration status
|
|
65
|
+
*/
|
|
66
|
+
getHmacConfig(options?: RequestOptions): Promise<HmacConfigResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Delete HMAC configuration
|
|
69
|
+
*/
|
|
70
|
+
deleteHmacConfig(options?: RequestOptions): Promise<HmacDeleteResponse>;
|
|
59
71
|
}
|
package/dist/modules/session.js
CHANGED
|
@@ -91,6 +91,25 @@ class SessionModule extends client.BaseClient {
|
|
|
91
91
|
const request = { proxy_url: proxyURL, enable };
|
|
92
92
|
return this.post("/session/proxy", request, options);
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Configure HMAC key for webhook signing
|
|
96
|
+
*/
|
|
97
|
+
async configureHmac(hmacKey, options) {
|
|
98
|
+
const request = { hmac_key: hmacKey };
|
|
99
|
+
return this.post("/session/hmac/config", request, options);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get HMAC configuration status
|
|
103
|
+
*/
|
|
104
|
+
async getHmacConfig(options) {
|
|
105
|
+
return this.get("/session/hmac/config", options);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Delete HMAC configuration
|
|
109
|
+
*/
|
|
110
|
+
async deleteHmacConfig(options) {
|
|
111
|
+
return this.delete("/session/hmac/config", options);
|
|
112
|
+
}
|
|
94
113
|
}
|
|
95
114
|
exports.SessionModule = SessionModule;
|
|
96
115
|
//# sourceMappingURL=session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sources":["../../src/modules/session.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport {\n ConnectRequest,\n ConnectResponse,\n DisconnectResponse,\n LogoutResponse,\n StatusResponse,\n QRCodeResponse,\n S3TestResponse,\n PairPhoneRequest,\n PairPhoneResponse,\n HistoryResponse,\n ProxyRequest,\n ProxyResponse,\n HistoryCountRequest,\n HistoryCountResponse,\n} from \"../types/session.js\";\nimport { S3Config, RequestOptions, S3ConfigResponse } from \"../types/common.js\";\n\nexport class SessionModule extends BaseClient {\n /**\n * Connect to WhatsApp servers\n */\n async connect(\n request: ConnectRequest,\n options?: RequestOptions\n ): Promise<ConnectResponse> {\n return this.post<ConnectResponse>(\"/session/connect\", request, options);\n }\n\n /**\n * Disconnect from WhatsApp servers\n */\n async disconnect(options?: RequestOptions): Promise<DisconnectResponse> {\n return this.post<DisconnectResponse>(\n \"/session/disconnect\",\n undefined,\n options\n );\n }\n\n /**\n * Logout and finish the session\n */\n async logout(options?: RequestOptions): Promise<LogoutResponse> {\n return this.post<LogoutResponse>(\"/session/logout\", undefined, options);\n }\n\n /**\n * Get session status\n */\n async getStatus(options?: RequestOptions): Promise<StatusResponse> {\n return this.get<StatusResponse>(\"/session/status\", options);\n }\n\n /**\n * Get QR code for scanning\n */\n async getQRCode(options?: RequestOptions): Promise<QRCodeResponse> {\n return this.get<QRCodeResponse>(\"/session/qr\", options);\n }\n\n /**\n * Configure S3 storage\n */\n async configureS3(\n config: S3Config,\n options?: RequestOptions\n ): Promise<S3ConfigResponse> {\n return this.post<S3ConfigResponse>(\"/session/s3/config\", config, options);\n }\n\n /**\n * Get S3 configuration\n */\n async getS3Config(options?: RequestOptions): Promise<S3ConfigResponse> {\n return this.get<S3ConfigResponse>(\"/session/s3/config\", options);\n }\n\n /**\n * Test S3 connection\n */\n async testS3(options?: RequestOptions): Promise<S3TestResponse> {\n return this.post<S3TestResponse>(\"/session/s3/test\", undefined, options);\n }\n\n /**\n * Delete S3 configuration\n */\n async deleteS3Config(options?: RequestOptions): Promise<{ Details: string }> {\n return this.delete<{ Details: string }>(\"/session/s3/config\", options);\n }\n\n /**\n * Pair phone using verification code\n */\n async pairPhone(\n phone: string,\n options?: RequestOptions\n ): Promise<PairPhoneResponse> {\n const request: PairPhoneRequest = { Phone: phone };\n return this.post<PairPhoneResponse>(\"/session/pairphone\", request, options);\n }\n\n /**\n * Request history sync from WhatsApp servers\n */\n async requestHistory(options?: RequestOptions): Promise<HistoryResponse> {\n return this.get<HistoryResponse>(\"/session/history\", options);\n }\n\n /**\n * Set history count for WhatsApp synchronization\n */\n async setHistoryCount(\n history: number,\n options?: RequestOptions\n ): Promise<HistoryCountResponse> {\n const request: HistoryCountRequest = { history };\n return this.post<HistoryCountResponse>(\n \"/session/history\",\n request,\n options\n );\n }\n\n /**\n * Set proxy configuration\n */\n async setProxy(\n proxyURL: string,\n enable: boolean = true,\n options?: RequestOptions\n ): Promise<ProxyResponse> {\n const request: ProxyRequest = { proxy_url: proxyURL, enable: enable };\n return this.post<ProxyResponse>(\"/session/proxy\", request, options);\n }\n}\n"],"names":["BaseClient"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"session.js","sources":["../../src/modules/session.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport {\n ConnectRequest,\n ConnectResponse,\n DisconnectResponse,\n LogoutResponse,\n StatusResponse,\n QRCodeResponse,\n S3TestResponse,\n PairPhoneRequest,\n PairPhoneResponse,\n HistoryResponse,\n ProxyRequest,\n ProxyResponse,\n HistoryCountRequest,\n HistoryCountResponse,\n HmacConfigRequest,\n HmacConfigResponse,\n HmacDeleteResponse,\n} from \"../types/session.js\";\nimport { S3Config, RequestOptions, S3ConfigResponse } from \"../types/common.js\";\n\nexport class SessionModule extends BaseClient {\n /**\n * Connect to WhatsApp servers\n */\n async connect(\n request: ConnectRequest,\n options?: RequestOptions\n ): Promise<ConnectResponse> {\n return this.post<ConnectResponse>(\"/session/connect\", request, options);\n }\n\n /**\n * Disconnect from WhatsApp servers\n */\n async disconnect(options?: RequestOptions): Promise<DisconnectResponse> {\n return this.post<DisconnectResponse>(\n \"/session/disconnect\",\n undefined,\n options\n );\n }\n\n /**\n * Logout and finish the session\n */\n async logout(options?: RequestOptions): Promise<LogoutResponse> {\n return this.post<LogoutResponse>(\"/session/logout\", undefined, options);\n }\n\n /**\n * Get session status\n */\n async getStatus(options?: RequestOptions): Promise<StatusResponse> {\n return this.get<StatusResponse>(\"/session/status\", options);\n }\n\n /**\n * Get QR code for scanning\n */\n async getQRCode(options?: RequestOptions): Promise<QRCodeResponse> {\n return this.get<QRCodeResponse>(\"/session/qr\", options);\n }\n\n /**\n * Configure S3 storage\n */\n async configureS3(\n config: S3Config,\n options?: RequestOptions\n ): Promise<S3ConfigResponse> {\n return this.post<S3ConfigResponse>(\"/session/s3/config\", config, options);\n }\n\n /**\n * Get S3 configuration\n */\n async getS3Config(options?: RequestOptions): Promise<S3ConfigResponse> {\n return this.get<S3ConfigResponse>(\"/session/s3/config\", options);\n }\n\n /**\n * Test S3 connection\n */\n async testS3(options?: RequestOptions): Promise<S3TestResponse> {\n return this.post<S3TestResponse>(\"/session/s3/test\", undefined, options);\n }\n\n /**\n * Delete S3 configuration\n */\n async deleteS3Config(options?: RequestOptions): Promise<{ Details: string }> {\n return this.delete<{ Details: string }>(\"/session/s3/config\", options);\n }\n\n /**\n * Pair phone using verification code\n */\n async pairPhone(\n phone: string,\n options?: RequestOptions\n ): Promise<PairPhoneResponse> {\n const request: PairPhoneRequest = { Phone: phone };\n return this.post<PairPhoneResponse>(\"/session/pairphone\", request, options);\n }\n\n /**\n * Request history sync from WhatsApp servers\n */\n async requestHistory(options?: RequestOptions): Promise<HistoryResponse> {\n return this.get<HistoryResponse>(\"/session/history\", options);\n }\n\n /**\n * Set history count for WhatsApp synchronization\n */\n async setHistoryCount(\n history: number,\n options?: RequestOptions\n ): Promise<HistoryCountResponse> {\n const request: HistoryCountRequest = { history };\n return this.post<HistoryCountResponse>(\n \"/session/history\",\n request,\n options\n );\n }\n\n /**\n * Set proxy configuration\n */\n async setProxy(\n proxyURL: string,\n enable: boolean = true,\n options?: RequestOptions\n ): Promise<ProxyResponse> {\n const request: ProxyRequest = { proxy_url: proxyURL, enable: enable };\n return this.post<ProxyResponse>(\"/session/proxy\", request, options);\n }\n\n /**\n * Configure HMAC key for webhook signing\n */\n async configureHmac(\n hmacKey: string,\n options?: RequestOptions\n ): Promise<HmacConfigResponse> {\n const request: HmacConfigRequest = { hmac_key: hmacKey };\n return this.post<HmacConfigResponse>(\"/session/hmac/config\", request, options);\n }\n\n /**\n * Get HMAC configuration status\n */\n async getHmacConfig(options?: RequestOptions): Promise<HmacConfigResponse> {\n return this.get<HmacConfigResponse>(\"/session/hmac/config\", options);\n }\n\n /**\n * Delete HMAC configuration\n */\n async deleteHmacConfig(options?: RequestOptions): Promise<HmacDeleteResponse> {\n return this.delete<HmacDeleteResponse>(\"/session/hmac/config\", options);\n }\n}\n"],"names":["BaseClient"],"mappings":";;;AAsBO,MAAM,sBAAsBA,OAAAA,WAAW;AAAA;AAAA;AAAA;AAAA,EAI5C,MAAM,QACJ,SACA,SAC0B;AAC1B,WAAO,KAAK,KAAsB,oBAAoB,SAAS,OAAO;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,WAAW,SAAuD;AACtE,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,OAAO,SAAmD;AAC9D,WAAO,KAAK,KAAqB,mBAAmB,QAAW,OAAO;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UAAU,SAAmD;AACjE,WAAO,KAAK,IAAoB,mBAAmB,OAAO;AAAA,EAC5D;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,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A;AAAA;AAAA;AAAA,EAKA,MAAM,cAAc,SAAuD;AACzE,WAAO,KAAK,IAAwB,wBAAwB,OAAO;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,iBAAiB,SAAuD;AAC5E,WAAO,KAAK,OAA2B,wBAAwB,OAAO;AAAA,EACxE;AACF;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseClient } from '../client.js';
|
|
2
|
+
import { RequestOptions } from '../types/common.js';
|
|
3
|
+
import { SetStatusTextResponse } from '../types/status.js';
|
|
4
|
+
export declare class StatusModule extends BaseClient {
|
|
5
|
+
/**
|
|
6
|
+
* Set status text message
|
|
7
|
+
*/
|
|
8
|
+
setStatusText(body: string, options?: RequestOptions): Promise<SetStatusTextResponse>;
|
|
9
|
+
}
|
package/dist/modules/user.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
2
|
import { RequestOptions } from '../types/common.js';
|
|
3
|
-
import { UserInfoResponse, UserCheckResponse, UserAvatarResponse, ContactsResponse, UserPresenceResponse } from '../types/user.js';
|
|
3
|
+
import { UserInfoResponse, UserCheckResponse, UserAvatarResponse, ContactsResponse, UserPresenceResponse, UserLidResponse } from '../types/user.js';
|
|
4
4
|
export declare class UserModule extends BaseClient {
|
|
5
5
|
/**
|
|
6
6
|
* Get user details for specified phone numbers
|
|
@@ -22,4 +22,8 @@ export declare class UserModule extends BaseClient {
|
|
|
22
22
|
* Send user presence (available/unavailable status)
|
|
23
23
|
*/
|
|
24
24
|
sendPresence(presenceType: "available" | "unavailable", options?: RequestOptions): Promise<UserPresenceResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Get LID (Linked ID) from phone number or JID
|
|
27
|
+
*/
|
|
28
|
+
getLid(phone: string, options?: RequestOptions): Promise<UserLidResponse>;
|
|
25
29
|
}
|
package/dist/modules/user.js
CHANGED
|
@@ -36,6 +36,12 @@ class UserModule extends client.BaseClient {
|
|
|
36
36
|
const request = { type: presenceType };
|
|
37
37
|
return this.post("/user/presence", request, options);
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Get LID (Linked ID) from phone number or JID
|
|
41
|
+
*/
|
|
42
|
+
async getLid(phone, options) {
|
|
43
|
+
return this.get(`/user/lid/${encodeURIComponent(phone)}`, options);
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
exports.UserModule = UserModule;
|
|
41
47
|
//# sourceMappingURL=user.js.map
|
package/dist/modules/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sources":["../../src/modules/user.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n UserInfoRequest,\n UserInfoResponse,\n UserCheckRequest,\n UserCheckResponse,\n UserAvatarRequest,\n UserAvatarResponse,\n ContactsResponse,\n UserPresenceRequest,\n UserPresenceResponse,\n} from \"../types/user.js\";\n\nexport class UserModule extends BaseClient {\n /**\n * Get user details for specified phone numbers\n */\n async getInfo(\n phones: string[],\n options?: RequestOptions\n ): Promise<UserInfoResponse> {\n const request: UserInfoRequest = { Phone: phones };\n return this.post<UserInfoResponse>(\"/user/info\", request, options);\n }\n\n /**\n * Check if phone numbers are registered WhatsApp users\n */\n async check(\n phones: string[],\n options?: RequestOptions\n ): Promise<UserCheckResponse> {\n const request: UserCheckRequest = { Phone: phones };\n return this.post<UserCheckResponse>(\"/user/check\", request, options);\n }\n\n /**\n * Get user avatar/profile picture\n */\n async getAvatar(\n phone: string,\n preview: boolean = true,\n options?: RequestOptions\n ): Promise<UserAvatarResponse> {\n const request: UserAvatarRequest = { Phone: phone, Preview: preview };\n return this.post<UserAvatarResponse>(\"/user/avatar\", request, options);\n }\n\n /**\n * Get all contacts\n */\n async getContacts(options?: RequestOptions): Promise<ContactsResponse> {\n return this.get<ContactsResponse>(\"/user/contacts\", options);\n }\n\n /**\n * Send user presence (available/unavailable status)\n */\n async sendPresence(\n presenceType: \"available\" | \"unavailable\",\n options?: RequestOptions\n ): Promise<UserPresenceResponse> {\n const request: UserPresenceRequest = { type: presenceType };\n return this.post<UserPresenceResponse>(\"/user/presence\", request, options);\n }\n}\n"],"names":["BaseClient"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"user.js","sources":["../../src/modules/user.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n UserInfoRequest,\n UserInfoResponse,\n UserCheckRequest,\n UserCheckResponse,\n UserAvatarRequest,\n UserAvatarResponse,\n ContactsResponse,\n UserPresenceRequest,\n UserPresenceResponse,\n UserLidResponse,\n} from \"../types/user.js\";\n\nexport class UserModule extends BaseClient {\n /**\n * Get user details for specified phone numbers\n */\n async getInfo(\n phones: string[],\n options?: RequestOptions\n ): Promise<UserInfoResponse> {\n const request: UserInfoRequest = { Phone: phones };\n return this.post<UserInfoResponse>(\"/user/info\", request, options);\n }\n\n /**\n * Check if phone numbers are registered WhatsApp users\n */\n async check(\n phones: string[],\n options?: RequestOptions\n ): Promise<UserCheckResponse> {\n const request: UserCheckRequest = { Phone: phones };\n return this.post<UserCheckResponse>(\"/user/check\", request, options);\n }\n\n /**\n * Get user avatar/profile picture\n */\n async getAvatar(\n phone: string,\n preview: boolean = true,\n options?: RequestOptions\n ): Promise<UserAvatarResponse> {\n const request: UserAvatarRequest = { Phone: phone, Preview: preview };\n return this.post<UserAvatarResponse>(\"/user/avatar\", request, options);\n }\n\n /**\n * Get all contacts\n */\n async getContacts(options?: RequestOptions): Promise<ContactsResponse> {\n return this.get<ContactsResponse>(\"/user/contacts\", options);\n }\n\n /**\n * Send user presence (available/unavailable status)\n */\n async sendPresence(\n presenceType: \"available\" | \"unavailable\",\n options?: RequestOptions\n ): Promise<UserPresenceResponse> {\n const request: UserPresenceRequest = { type: presenceType };\n return this.post<UserPresenceResponse>(\"/user/presence\", request, options);\n }\n\n /**\n * Get LID (Linked ID) from phone number or JID\n */\n async getLid(\n phone: string,\n options?: RequestOptions\n ): Promise<UserLidResponse> {\n return this.get<UserLidResponse>(`/user/lid/${encodeURIComponent(phone)}`, options);\n }\n}\n"],"names":["BaseClient"],"mappings":";;;AAeO,MAAM,mBAAmBA,OAAAA,WAAW;AAAA;AAAA;AAAA;AAAA,EAIzC,MAAM,QACJ,QACA,SAC2B;AAC3B,UAAM,UAA2B,EAAE,OAAO,OAAA;AAC1C,WAAO,KAAK,KAAuB,cAAc,SAAS,OAAO;AAAA,EACnE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,MACJ,QACA,SAC4B;AAC5B,UAAM,UAA4B,EAAE,OAAO,OAAA;AAC3C,WAAO,KAAK,KAAwB,eAAe,SAAS,OAAO;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,OACA,UAAmB,MACnB,SAC6B;AAC7B,UAAM,UAA6B,EAAE,OAAO,OAAO,SAAS,QAAA;AAC5D,WAAO,KAAK,KAAyB,gBAAgB,SAAS,OAAO;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,YAAY,SAAqD;AACrE,WAAO,KAAK,IAAsB,kBAAkB,OAAO;AAAA,EAC7D;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aACJ,cACA,SAC+B;AAC/B,UAAM,UAA+B,EAAE,MAAM,aAAA;AAC7C,WAAO,KAAK,KAA2B,kBAAkB,SAAS,OAAO;AAAA,EAC3E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,OACJ,OACA,SAC0B;AAC1B,WAAO,KAAK,IAAqB,aAAa,mBAAmB,KAAK,CAAC,IAAI,OAAO;AAAA,EACpF;AACF;;"}
|
package/dist/types/admin.d.ts
CHANGED
|
@@ -68,3 +68,48 @@ export interface CreateUserResponse {
|
|
|
68
68
|
export interface DeleteUserResponse {
|
|
69
69
|
Details: string;
|
|
70
70
|
}
|
|
71
|
+
export interface UpdateUserRequest {
|
|
72
|
+
name?: string;
|
|
73
|
+
webhook?: string;
|
|
74
|
+
events?: string;
|
|
75
|
+
history?: number;
|
|
76
|
+
proxyConfig?: {
|
|
77
|
+
enabled: boolean;
|
|
78
|
+
proxyURL: string;
|
|
79
|
+
};
|
|
80
|
+
s3Config?: {
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
endpoint: string;
|
|
83
|
+
region: string;
|
|
84
|
+
bucket: string;
|
|
85
|
+
accessKey: string;
|
|
86
|
+
secretKey: string;
|
|
87
|
+
pathStyle: boolean;
|
|
88
|
+
publicURL?: string;
|
|
89
|
+
mediaDelivery: "base64" | "s3" | "both";
|
|
90
|
+
retentionDays: number;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export interface UpdateUserResponse {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
token: string;
|
|
97
|
+
webhook?: string;
|
|
98
|
+
events?: string;
|
|
99
|
+
proxy_config: {
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
proxy_url: string;
|
|
102
|
+
};
|
|
103
|
+
s3_config: {
|
|
104
|
+
access_key: string;
|
|
105
|
+
bucket: string;
|
|
106
|
+
enabled: boolean;
|
|
107
|
+
endpoint: string;
|
|
108
|
+
media_delivery: string;
|
|
109
|
+
path_style: boolean;
|
|
110
|
+
public_url: string;
|
|
111
|
+
region: string;
|
|
112
|
+
retention_days: number;
|
|
113
|
+
};
|
|
114
|
+
history?: number;
|
|
115
|
+
}
|
package/dist/types/chat.d.ts
CHANGED
|
@@ -167,3 +167,18 @@ export interface HistoryMessage {
|
|
|
167
167
|
user_id: string;
|
|
168
168
|
}
|
|
169
169
|
export type GetChatHistoryResponse = HistoryMessage[];
|
|
170
|
+
export interface RequestUnavailableMessageRequest {
|
|
171
|
+
chat: string;
|
|
172
|
+
sender: string;
|
|
173
|
+
id: string;
|
|
174
|
+
}
|
|
175
|
+
export interface RequestUnavailableMessageResponse {
|
|
176
|
+
Details: string;
|
|
177
|
+
}
|
|
178
|
+
export interface ArchiveChatRequest {
|
|
179
|
+
jid: string;
|
|
180
|
+
archive: boolean;
|
|
181
|
+
}
|
|
182
|
+
export interface ArchiveChatResponse {
|
|
183
|
+
Details: string;
|
|
184
|
+
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/session.d.ts
CHANGED
|
@@ -64,3 +64,13 @@ export interface HistoryCountResponse {
|
|
|
64
64
|
Details: string;
|
|
65
65
|
History: number;
|
|
66
66
|
}
|
|
67
|
+
export interface HmacConfigRequest {
|
|
68
|
+
hmac_key: string;
|
|
69
|
+
}
|
|
70
|
+
export interface HmacConfigResponse {
|
|
71
|
+
Details: string;
|
|
72
|
+
configured?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface HmacDeleteResponse {
|
|
75
|
+
Details: string;
|
|
76
|
+
}
|
package/dist/types/user.d.ts
CHANGED
package/dist/wuzapi-client.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { ChatModule } from './modules/chat.js';
|
|
|
6
6
|
import { GroupModule } from './modules/group.js';
|
|
7
7
|
import { WebhookModule } from './modules/webhook.js';
|
|
8
8
|
import { NewsletterModule } from './modules/newsletter.js';
|
|
9
|
+
import { StatusModule } from './modules/status.js';
|
|
10
|
+
import { CallModule } from './modules/call.js';
|
|
9
11
|
export declare class WuzapiClient {
|
|
10
12
|
readonly admin: AdminModule;
|
|
11
13
|
readonly session: SessionModule;
|
|
@@ -14,6 +16,8 @@ export declare class WuzapiClient {
|
|
|
14
16
|
readonly group: GroupModule;
|
|
15
17
|
readonly webhook: WebhookModule;
|
|
16
18
|
readonly newsletter: NewsletterModule;
|
|
19
|
+
readonly status: StatusModule;
|
|
20
|
+
readonly call: CallModule;
|
|
17
21
|
readonly users: UserModule;
|
|
18
22
|
readonly message: ChatModule;
|
|
19
23
|
constructor(config: WuzapiConfig);
|
package/dist/wuzapi-client.js
CHANGED
|
@@ -1,45 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
session;
|
|
13
|
-
user;
|
|
14
|
-
chat;
|
|
15
|
-
group;
|
|
16
|
-
webhook;
|
|
17
|
-
newsletter;
|
|
18
|
-
// Legacy aliases for convenience
|
|
19
|
-
users;
|
|
20
|
-
message;
|
|
21
|
-
constructor(config) {
|
|
22
|
-
this.admin = new modules_admin.AdminModule(config);
|
|
23
|
-
this.session = new modules_session.SessionModule(config);
|
|
24
|
-
this.user = new modules_user.UserModule(config);
|
|
25
|
-
this.chat = new modules_chat.ChatModule(config);
|
|
26
|
-
this.group = new modules_group.GroupModule(config);
|
|
27
|
-
this.webhook = new modules_webhook.WebhookModule(config);
|
|
28
|
-
this.newsletter = new modules_newsletter.NewsletterModule(config);
|
|
29
|
-
this.users = this.user;
|
|
30
|
-
this.message = this.chat;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Test connection to the API
|
|
34
|
-
*/
|
|
35
|
-
async ping(options) {
|
|
36
|
-
try {
|
|
37
|
-
await this.session.getStatus(options);
|
|
38
|
-
return true;
|
|
39
|
-
} catch {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.WuzapiClient = WuzapiClient;
|
|
3
|
+
require("./modules/admin.js");
|
|
4
|
+
require("./modules/session.js");
|
|
5
|
+
require("./modules/user.js");
|
|
6
|
+
require("./modules/chat.js");
|
|
7
|
+
require("./modules/group.js");
|
|
8
|
+
require("./modules/webhook.js");
|
|
9
|
+
require("./modules/newsletter.js");
|
|
10
|
+
const wuzapiClient = require("./wuzapi-client2.js");
|
|
11
|
+
exports.WuzapiClient = wuzapiClient.WuzapiClient;
|
|
45
12
|
//# sourceMappingURL=wuzapi-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wuzapi-client.js","sources":[
|
|
1
|
+
{"version":3,"file":"wuzapi-client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const modules_admin = require("./modules/admin.js");
|
|
3
|
+
const modules_session = require("./modules/session.js");
|
|
4
|
+
const modules_user = require("./modules/user.js");
|
|
5
|
+
const modules_chat = require("./modules/chat.js");
|
|
6
|
+
const modules_group = require("./modules/group.js");
|
|
7
|
+
const modules_webhook = require("./modules/webhook.js");
|
|
8
|
+
const modules_newsletter = require("./modules/newsletter.js");
|
|
9
|
+
const client = require("./client.js");
|
|
10
|
+
class StatusModule extends client.BaseClient {
|
|
11
|
+
/**
|
|
12
|
+
* Set status text message
|
|
13
|
+
*/
|
|
14
|
+
async setStatusText(body, options) {
|
|
15
|
+
const request = { Body: body };
|
|
16
|
+
return this.post("/status/set/text", request, options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
class CallModule extends client.BaseClient {
|
|
20
|
+
/**
|
|
21
|
+
* Reject an incoming call
|
|
22
|
+
*/
|
|
23
|
+
async rejectCall(callFrom, callId, options) {
|
|
24
|
+
const request = { call_from: callFrom, call_id: callId };
|
|
25
|
+
return this.post("/call/reject", request, options);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
class WuzapiClient {
|
|
29
|
+
admin;
|
|
30
|
+
session;
|
|
31
|
+
user;
|
|
32
|
+
chat;
|
|
33
|
+
group;
|
|
34
|
+
webhook;
|
|
35
|
+
newsletter;
|
|
36
|
+
status;
|
|
37
|
+
call;
|
|
38
|
+
// Legacy aliases for convenience
|
|
39
|
+
users;
|
|
40
|
+
message;
|
|
41
|
+
constructor(config) {
|
|
42
|
+
this.admin = new modules_admin.AdminModule(config);
|
|
43
|
+
this.session = new modules_session.SessionModule(config);
|
|
44
|
+
this.user = new modules_user.UserModule(config);
|
|
45
|
+
this.chat = new modules_chat.ChatModule(config);
|
|
46
|
+
this.group = new modules_group.GroupModule(config);
|
|
47
|
+
this.webhook = new modules_webhook.WebhookModule(config);
|
|
48
|
+
this.newsletter = new modules_newsletter.NewsletterModule(config);
|
|
49
|
+
this.status = new StatusModule(config);
|
|
50
|
+
this.call = new CallModule(config);
|
|
51
|
+
this.users = this.user;
|
|
52
|
+
this.message = this.chat;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Test connection to the API
|
|
56
|
+
*/
|
|
57
|
+
async ping(options) {
|
|
58
|
+
try {
|
|
59
|
+
await this.session.getStatus(options);
|
|
60
|
+
return true;
|
|
61
|
+
} catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.CallModule = CallModule;
|
|
67
|
+
exports.StatusModule = StatusModule;
|
|
68
|
+
exports.WuzapiClient = WuzapiClient;
|
|
69
|
+
//# sourceMappingURL=wuzapi-client2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wuzapi-client2.js","sources":["../src/modules/status.ts","../src/modules/call.ts","../src/wuzapi-client.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport { SetStatusTextRequest, SetStatusTextResponse } from \"../types/status.js\";\n\nexport class StatusModule extends BaseClient {\n /**\n * Set status text message\n */\n async setStatusText(\n body: string,\n options?: RequestOptions\n ): Promise<SetStatusTextResponse> {\n const request: SetStatusTextRequest = { Body: body };\n return this.post<SetStatusTextResponse>(\"/status/set/text\", request, options);\n }\n}\n","import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport { RejectCallRequest, RejectCallResponse } from \"../types/call.js\";\n\nexport class CallModule extends BaseClient {\n /**\n * Reject an incoming call\n */\n async rejectCall(\n callFrom: string,\n callId: string,\n options?: RequestOptions\n ): Promise<RejectCallResponse> {\n const request: RejectCallRequest = { call_from: callFrom, call_id: callId };\n return this.post<RejectCallResponse>(\"/call/reject\", request, options);\n }\n}\n","import { WuzapiConfig, RequestOptions } from \"./types/common.js\";\nimport { AdminModule } from \"./modules/admin.js\";\nimport { SessionModule } from \"./modules/session.js\";\nimport { UserModule } from \"./modules/user.js\";\nimport { ChatModule } from \"./modules/chat.js\";\nimport { GroupModule } from \"./modules/group.js\";\nimport { WebhookModule } from \"./modules/webhook.js\";\nimport { NewsletterModule } from \"./modules/newsletter.js\";\nimport { StatusModule } from \"./modules/status.js\";\nimport { CallModule } from \"./modules/call.js\";\n\nexport class WuzapiClient {\n public readonly admin: AdminModule;\n public readonly session: SessionModule;\n public readonly user: UserModule;\n public readonly chat: ChatModule;\n public readonly group: GroupModule;\n public readonly webhook: WebhookModule;\n public readonly newsletter: NewsletterModule;\n public readonly status: StatusModule;\n public readonly call: CallModule;\n\n // Legacy aliases for convenience\n public readonly users: UserModule;\n public readonly message: ChatModule;\n\n constructor(config: WuzapiConfig) {\n // Initialize all modules with the same config\n this.admin = new AdminModule(config);\n this.session = new SessionModule(config);\n this.user = new UserModule(config);\n this.chat = new ChatModule(config);\n this.group = new GroupModule(config);\n this.webhook = new WebhookModule(config);\n this.newsletter = new NewsletterModule(config);\n this.status = new StatusModule(config);\n this.call = new CallModule(config);\n\n // Legacy aliases\n this.users = this.user;\n this.message = this.chat;\n }\n\n /**\n * Test connection to the API\n */\n async ping(options?: RequestOptions): Promise<boolean> {\n try {\n await this.session.getStatus(options);\n return true;\n } catch {\n return false;\n }\n }\n}\n"],"names":["BaseClient","AdminModule","SessionModule","UserModule","ChatModule","GroupModule","WebhookModule","NewsletterModule"],"mappings":";;;;;;;;;AAIO,MAAM,qBAAqBA,OAAAA,WAAW;AAAA;AAAA;AAAA;AAAA,EAIzC,MAAM,cACF,MACA,SAC8B;AAC9B,UAAM,UAAgC,EAAE,MAAM,KAAA;AAC9C,WAAO,KAAK,KAA4B,oBAAoB,SAAS,OAAO;AAAA,EAChF;AACJ;ACXO,MAAM,mBAAmBA,OAAAA,WAAW;AAAA;AAAA;AAAA;AAAA,EAIvC,MAAM,WACF,UACA,QACA,SAC2B;AAC3B,UAAM,UAA6B,EAAE,WAAW,UAAU,SAAS,OAAA;AACnE,WAAO,KAAK,KAAyB,gBAAgB,SAAS,OAAO;AAAA,EACzE;AACJ;ACLO,MAAM,aAAa;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EAEhB,YAAY,QAAsB;AAEhC,SAAK,QAAQ,IAAIC,cAAAA,YAAY,MAAM;AACnC,SAAK,UAAU,IAAIC,gBAAAA,cAAc,MAAM;AACvC,SAAK,OAAO,IAAIC,aAAAA,WAAW,MAAM;AACjC,SAAK,OAAO,IAAIC,aAAAA,WAAW,MAAM;AACjC,SAAK,QAAQ,IAAIC,cAAAA,YAAY,MAAM;AACnC,SAAK,UAAU,IAAIC,gBAAAA,cAAc,MAAM;AACvC,SAAK,aAAa,IAAIC,mBAAAA,iBAAiB,MAAM;AAC7C,SAAK,SAAS,IAAI,aAAa,MAAM;AACrC,SAAK,OAAO,IAAI,WAAW,MAAM;AAGjC,SAAK,QAAQ,KAAK;AAClB,SAAK,UAAU,KAAK;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,KAAK,SAA4C;AACrD,QAAI;AACF,YAAM,KAAK,QAAQ,UAAU,OAAO;AACpC,aAAO;AAAA,IACT,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wuzapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "TypeScript client library for WuzAPI WhatsApp API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -58,4 +58,4 @@
|
|
|
58
58
|
"axios": "^1.11.0",
|
|
59
59
|
"debug": "^4.4.1"
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|