wuzapi 1.4.0 → 1.5.1
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 +513 -1217
- package/dist/client.d.ts +2 -1
- package/dist/client.js +91 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -811
- package/dist/index.js.map +1 -1
- package/dist/modules/admin.d.ts +8 -0
- package/dist/modules/admin.js +37 -0
- package/dist/modules/admin.js.map +1 -0
- package/dist/modules/chat.d.ts +21 -1
- package/dist/modules/chat.js +173 -0
- package/dist/modules/chat.js.map +1 -0
- package/dist/modules/group.d.ts +25 -1
- package/dist/modules/group.js +142 -0
- package/dist/modules/group.js.map +1 -0
- package/dist/modules/newsletter.d.ts +9 -0
- package/dist/modules/newsletter.js +13 -0
- package/dist/modules/newsletter.js.map +1 -0
- package/dist/modules/session.d.ts +13 -1
- package/dist/modules/session.js +85 -0
- package/dist/modules/session.js.map +1 -0
- package/dist/modules/user.d.ts +5 -1
- package/dist/modules/user.js +40 -0
- package/dist/modules/user.js.map +1 -0
- package/dist/modules/webhook.d.ts +9 -1
- package/dist/modules/webhook.js +33 -0
- package/dist/modules/webhook.js.map +1 -0
- package/dist/types/chat.d.ts +55 -0
- package/dist/types/group.d.ts +52 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +396 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/newsletter.d.ts +17 -0
- package/dist/types/session.d.ts +16 -0
- package/dist/types/user.d.ts +5 -0
- package/dist/types/webhook.d.ts +9 -0
- package/dist/wuzapi-client.d.ts +2 -0
- package/dist/wuzapi-client.js +45 -0
- package/dist/wuzapi-client.js.map +1 -0
- package/package.json +1 -1
- package/dist/vite-env.d.ts +0 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { BaseClient } from "../client.js";
|
|
2
|
+
class GroupModule extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* List all subscribed groups
|
|
5
|
+
*/
|
|
6
|
+
async list(options) {
|
|
7
|
+
return this.get("/group/list", options);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get group invite link
|
|
11
|
+
*/
|
|
12
|
+
async getInviteLink(groupJID, options) {
|
|
13
|
+
const request = { GroupJID: groupJID };
|
|
14
|
+
return this.post(
|
|
15
|
+
"/group/invitelink",
|
|
16
|
+
request,
|
|
17
|
+
options
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get group information
|
|
22
|
+
*/
|
|
23
|
+
async getInfo(groupJID, options) {
|
|
24
|
+
const request = { GroupJID: groupJID };
|
|
25
|
+
return this.post("/group/info", request, options);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Change group photo (JPEG only)
|
|
29
|
+
*/
|
|
30
|
+
async setPhoto(groupJID, image, options) {
|
|
31
|
+
const request = { GroupJID: groupJID, Image: image };
|
|
32
|
+
return this.post("/group/photo", request, options);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Change group name
|
|
36
|
+
*/
|
|
37
|
+
async setName(groupJID, name, options) {
|
|
38
|
+
const request = { GroupJID: groupJID, Name: name };
|
|
39
|
+
return this.post("/group/name", request, options);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create a new group
|
|
43
|
+
*/
|
|
44
|
+
async create(name, participants, options) {
|
|
45
|
+
const request = { name, participants };
|
|
46
|
+
return this.post("/group/create", request, options);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Set group locked status
|
|
50
|
+
*/
|
|
51
|
+
async setLocked(groupJID, locked, options) {
|
|
52
|
+
const request = { groupjid: groupJID, locked };
|
|
53
|
+
return this.post("/group/locked", request, options);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Set disappearing messages timer
|
|
57
|
+
*/
|
|
58
|
+
async setEphemeral(groupJID, duration, options) {
|
|
59
|
+
const request = { groupjid: groupJID, duration };
|
|
60
|
+
return this.post(
|
|
61
|
+
"/group/ephemeral",
|
|
62
|
+
request,
|
|
63
|
+
options
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Remove group photo
|
|
68
|
+
*/
|
|
69
|
+
async removePhoto(groupJID, options) {
|
|
70
|
+
const request = { groupjid: groupJID };
|
|
71
|
+
return this.post(
|
|
72
|
+
"/group/photo/remove",
|
|
73
|
+
request,
|
|
74
|
+
options
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Leave a group
|
|
79
|
+
*/
|
|
80
|
+
async leave(groupJID, options) {
|
|
81
|
+
const request = { GroupJID: groupJID };
|
|
82
|
+
return this.post("/group/leave", request, options);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Set group topic/description
|
|
86
|
+
*/
|
|
87
|
+
async setTopic(groupJID, topic, options) {
|
|
88
|
+
const request = { GroupJID: groupJID, Topic: topic };
|
|
89
|
+
return this.post("/group/topic", request, options);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Set group announcement setting (only admins can send messages)
|
|
93
|
+
*/
|
|
94
|
+
async setAnnounce(groupJID, announce, options) {
|
|
95
|
+
const request = {
|
|
96
|
+
GroupJID: groupJID,
|
|
97
|
+
Announce: announce
|
|
98
|
+
};
|
|
99
|
+
return this.post(
|
|
100
|
+
"/group/announce",
|
|
101
|
+
request,
|
|
102
|
+
options
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Join a group using invite link
|
|
107
|
+
*/
|
|
108
|
+
async join(inviteLink, options) {
|
|
109
|
+
const request = { InviteLink: inviteLink };
|
|
110
|
+
return this.post("/group/join", request, options);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Get group invite information
|
|
114
|
+
*/
|
|
115
|
+
async getInviteInfo(inviteLink, options) {
|
|
116
|
+
const request = { InviteLink: inviteLink };
|
|
117
|
+
return this.post(
|
|
118
|
+
"/group/inviteinfo",
|
|
119
|
+
request,
|
|
120
|
+
options
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Update group participants (add/remove/promote/demote)
|
|
125
|
+
*/
|
|
126
|
+
async updateParticipants(groupJID, action, participants, options) {
|
|
127
|
+
const request = {
|
|
128
|
+
GroupJID: groupJID,
|
|
129
|
+
Action: action,
|
|
130
|
+
Participants: participants
|
|
131
|
+
};
|
|
132
|
+
return this.post(
|
|
133
|
+
"/group/updateparticipants",
|
|
134
|
+
request,
|
|
135
|
+
options
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export {
|
|
140
|
+
GroupModule
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.js","sources":["../../src/modules/group.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n GroupListResponse,\n GroupInviteLinkRequest,\n GroupInviteLinkResponse,\n GroupInfoRequest,\n GroupInfo,\n GroupPhotoRequest,\n GroupPhotoResponse,\n GroupNameRequest,\n GroupNameResponse,\n GroupCreateRequest,\n GroupCreateResponse,\n GroupLockedRequest,\n GroupLockedResponse,\n GroupEphemeralRequest,\n GroupEphemeralResponse,\n GroupPhotoRemoveRequest,\n GroupPhotoRemoveResponse,\n GroupLeaveRequest,\n GroupLeaveResponse,\n GroupTopicRequest,\n GroupTopicResponse,\n GroupAnnounceRequest,\n GroupAnnounceResponse,\n GroupJoinRequest,\n GroupJoinResponse,\n GroupInviteInfoRequest,\n GroupInviteInfoResponse,\n GroupUpdateParticipantsRequest,\n GroupUpdateParticipantsResponse,\n} from \"../types/group.js\";\n\nexport class GroupModule extends BaseClient {\n /**\n * List all subscribed groups\n */\n async list(options?: RequestOptions): Promise<GroupListResponse> {\n return this.get<GroupListResponse>(\"/group/list\", options);\n }\n\n /**\n * Get group invite link\n */\n async getInviteLink(\n groupJID: string,\n options?: RequestOptions\n ): Promise<GroupInviteLinkResponse> {\n const request: GroupInviteLinkRequest = { GroupJID: groupJID };\n return this.post<GroupInviteLinkResponse>(\n \"/group/invitelink\",\n request,\n options\n );\n }\n\n /**\n * Get group information\n */\n async getInfo(\n groupJID: string,\n options?: RequestOptions\n ): Promise<GroupInfo> {\n const request: GroupInfoRequest = { GroupJID: groupJID };\n return this.post<GroupInfo>(\"/group/info\", request, options);\n }\n\n /**\n * Change group photo (JPEG only)\n */\n async setPhoto(\n groupJID: string,\n image: string,\n options?: RequestOptions\n ): Promise<GroupPhotoResponse> {\n const request: GroupPhotoRequest = { GroupJID: groupJID, Image: image };\n return this.post<GroupPhotoResponse>(\"/group/photo\", request, options);\n }\n\n /**\n * Change group name\n */\n async setName(\n groupJID: string,\n name: string,\n options?: RequestOptions\n ): Promise<GroupNameResponse> {\n const request: GroupNameRequest = { GroupJID: groupJID, Name: name };\n return this.post<GroupNameResponse>(\"/group/name\", request, options);\n }\n\n /**\n * Create a new group\n */\n async create(\n name: string,\n participants: string[],\n options?: RequestOptions\n ): Promise<GroupCreateResponse> {\n const request: GroupCreateRequest = { name, participants };\n return this.post<GroupCreateResponse>(\"/group/create\", request, options);\n }\n\n /**\n * Set group locked status\n */\n async setLocked(\n groupJID: string,\n locked: boolean,\n options?: RequestOptions\n ): Promise<GroupLockedResponse> {\n const request: GroupLockedRequest = { groupjid: groupJID, locked };\n return this.post<GroupLockedResponse>(\"/group/locked\", request, options);\n }\n\n /**\n * Set disappearing messages timer\n */\n async setEphemeral(\n groupJID: string,\n duration: \"24h\" | \"7d\" | \"90d\" | \"off\",\n options?: RequestOptions\n ): Promise<GroupEphemeralResponse> {\n const request: GroupEphemeralRequest = { groupjid: groupJID, duration };\n return this.post<GroupEphemeralResponse>(\n \"/group/ephemeral\",\n request,\n options\n );\n }\n\n /**\n * Remove group photo\n */\n async removePhoto(\n groupJID: string,\n options?: RequestOptions\n ): Promise<GroupPhotoRemoveResponse> {\n const request: GroupPhotoRemoveRequest = { groupjid: groupJID };\n return this.post<GroupPhotoRemoveResponse>(\n \"/group/photo/remove\",\n request,\n options\n );\n }\n\n /**\n * Leave a group\n */\n async leave(\n groupJID: string,\n options?: RequestOptions\n ): Promise<GroupLeaveResponse> {\n const request: GroupLeaveRequest = { GroupJID: groupJID };\n return this.post<GroupLeaveResponse>(\"/group/leave\", request, options);\n }\n\n /**\n * Set group topic/description\n */\n async setTopic(\n groupJID: string,\n topic: string,\n options?: RequestOptions\n ): Promise<GroupTopicResponse> {\n const request: GroupTopicRequest = { GroupJID: groupJID, Topic: topic };\n return this.post<GroupTopicResponse>(\"/group/topic\", request, options);\n }\n\n /**\n * Set group announcement setting (only admins can send messages)\n */\n async setAnnounce(\n groupJID: string,\n announce: boolean,\n options?: RequestOptions\n ): Promise<GroupAnnounceResponse> {\n const request: GroupAnnounceRequest = {\n GroupJID: groupJID,\n Announce: announce,\n };\n return this.post<GroupAnnounceResponse>(\n \"/group/announce\",\n request,\n options\n );\n }\n\n /**\n * Join a group using invite link\n */\n async join(\n inviteLink: string,\n options?: RequestOptions\n ): Promise<GroupJoinResponse> {\n const request: GroupJoinRequest = { InviteLink: inviteLink };\n return this.post<GroupJoinResponse>(\"/group/join\", request, options);\n }\n\n /**\n * Get group invite information\n */\n async getInviteInfo(\n inviteLink: string,\n options?: RequestOptions\n ): Promise<GroupInviteInfoResponse> {\n const request: GroupInviteInfoRequest = { InviteLink: inviteLink };\n return this.post<GroupInviteInfoResponse>(\n \"/group/inviteinfo\",\n request,\n options\n );\n }\n\n /**\n * Update group participants (add/remove/promote/demote)\n */\n async updateParticipants(\n groupJID: string,\n action: \"add\" | \"remove\" | \"promote\" | \"demote\",\n participants: string[],\n options?: RequestOptions\n ): Promise<GroupUpdateParticipantsResponse> {\n const request: GroupUpdateParticipantsRequest = {\n GroupJID: groupJID,\n Action: action,\n Participants: participants,\n };\n return this.post<GroupUpdateParticipantsResponse>(\n \"/group/updateparticipants\",\n request,\n options\n );\n }\n}\n"],"names":[],"mappings":";AAkCO,MAAM,oBAAoB,WAAW;AAAA;AAAA;AAAA;AAAA,EAI1C,MAAM,KAAK,SAAsD;AAC/D,WAAO,KAAK,IAAuB,eAAe,OAAO;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,cACJ,UACA,SACkC;AAClC,UAAM,UAAkC,EAAE,UAAU,SAAA;AACpD,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QACJ,UACA,SACoB;AACpB,UAAM,UAA4B,EAAE,UAAU,SAAA;AAC9C,WAAO,KAAK,KAAgB,eAAe,SAAS,OAAO;AAAA,EAC7D;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,SACJ,UACA,OACA,SAC6B;AAC7B,UAAM,UAA6B,EAAE,UAAU,UAAU,OAAO,MAAA;AAChE,WAAO,KAAK,KAAyB,gBAAgB,SAAS,OAAO;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QACJ,UACA,MACA,SAC4B;AAC5B,UAAM,UAA4B,EAAE,UAAU,UAAU,MAAM,KAAA;AAC9D,WAAO,KAAK,KAAwB,eAAe,SAAS,OAAO;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,OACJ,MACA,cACA,SAC8B;AAC9B,UAAM,UAA8B,EAAE,MAAM,aAAA;AAC5C,WAAO,KAAK,KAA0B,iBAAiB,SAAS,OAAO;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,UACA,QACA,SAC8B;AAC9B,UAAM,UAA8B,EAAE,UAAU,UAAU,OAAA;AAC1D,WAAO,KAAK,KAA0B,iBAAiB,SAAS,OAAO;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aACJ,UACA,UACA,SACiC;AACjC,UAAM,UAAiC,EAAE,UAAU,UAAU,SAAA;AAC7D,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,YACJ,UACA,SACmC;AACnC,UAAM,UAAmC,EAAE,UAAU,SAAA;AACrD,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,MACJ,UACA,SAC6B;AAC7B,UAAM,UAA6B,EAAE,UAAU,SAAA;AAC/C,WAAO,KAAK,KAAyB,gBAAgB,SAAS,OAAO;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,SACJ,UACA,OACA,SAC6B;AAC7B,UAAM,UAA6B,EAAE,UAAU,UAAU,OAAO,MAAA;AAChE,WAAO,KAAK,KAAyB,gBAAgB,SAAS,OAAO;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,YACJ,UACA,UACA,SACgC;AAChC,UAAM,UAAgC;AAAA,MACpC,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAEZ,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,KACJ,YACA,SAC4B;AAC5B,UAAM,UAA4B,EAAE,YAAY,WAAA;AAChD,WAAO,KAAK,KAAwB,eAAe,SAAS,OAAO;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,cACJ,YACA,SACkC;AAClC,UAAM,UAAkC,EAAE,YAAY,WAAA;AACtD,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,mBACJ,UACA,QACA,cACA,SAC0C;AAC1C,UAAM,UAA0C;AAAA,MAC9C,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,cAAc;AAAA,IAAA;AAEhB,WAAO,KAAK;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseClient } from '../client.js';
|
|
2
|
+
import { RequestOptions } from '../types/common.js';
|
|
3
|
+
import { NewsletterListResponse } from '../types/newsletter.js';
|
|
4
|
+
export declare class NewsletterModule extends BaseClient {
|
|
5
|
+
/**
|
|
6
|
+
* List all subscribed newsletters
|
|
7
|
+
*/
|
|
8
|
+
list(options?: RequestOptions): Promise<NewsletterListResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseClient } from "../client.js";
|
|
2
|
+
class NewsletterModule extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* List all subscribed newsletters
|
|
5
|
+
*/
|
|
6
|
+
async list(options) {
|
|
7
|
+
return this.get("/newsletter/list", options);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
NewsletterModule
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=newsletter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"newsletter.js","sources":["../../src/modules/newsletter.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport { NewsletterListResponse } from \"../types/newsletter.js\";\n\nexport class NewsletterModule extends BaseClient {\n /**\n * List all subscribed newsletters\n */\n async list(options?: RequestOptions): Promise<NewsletterListResponse> {\n return this.get<NewsletterListResponse>(\"/newsletter/list\", options);\n }\n}\n"],"names":[],"mappings":";AAIO,MAAM,yBAAyB,WAAW;AAAA;AAAA;AAAA;AAAA,EAI/C,MAAM,KAAK,SAA2D;AACpE,WAAO,KAAK,IAA4B,oBAAoB,OAAO;AAAA,EACrE;AACF;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
|
-
import { ConnectRequest, ConnectResponse, DisconnectResponse, LogoutResponse, StatusResponse, QRCodeResponse, S3ConfigResponse, S3TestResponse } from '../types/session.js';
|
|
2
|
+
import { ConnectRequest, ConnectResponse, DisconnectResponse, LogoutResponse, StatusResponse, QRCodeResponse, S3ConfigResponse, S3TestResponse, PairPhoneResponse, HistoryResponse, ProxyResponse } from '../types/session.js';
|
|
3
3
|
import { S3Config, RequestOptions } from '../types/common.js';
|
|
4
4
|
export declare class SessionModule extends BaseClient {
|
|
5
5
|
/**
|
|
@@ -40,4 +40,16 @@ export declare class SessionModule extends BaseClient {
|
|
|
40
40
|
deleteS3Config(options?: RequestOptions): Promise<{
|
|
41
41
|
Details: string;
|
|
42
42
|
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Pair phone using verification code
|
|
45
|
+
*/
|
|
46
|
+
pairPhone(phone: string, code: string, options?: RequestOptions): Promise<PairPhoneResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Request history sync from WhatsApp servers
|
|
49
|
+
*/
|
|
50
|
+
requestHistory(options?: RequestOptions): Promise<HistoryResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Set proxy configuration
|
|
53
|
+
*/
|
|
54
|
+
setProxy(proxy: string, options?: RequestOptions): Promise<ProxyResponse>;
|
|
43
55
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { BaseClient } from "../client.js";
|
|
2
|
+
class SessionModule extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* Connect to WhatsApp servers
|
|
5
|
+
*/
|
|
6
|
+
async connect(request, options) {
|
|
7
|
+
return this.post("/session/connect", request, options);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Disconnect from WhatsApp servers
|
|
11
|
+
*/
|
|
12
|
+
async disconnect(options) {
|
|
13
|
+
return this.post(
|
|
14
|
+
"/session/disconnect",
|
|
15
|
+
void 0,
|
|
16
|
+
options
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Logout and finish the session
|
|
21
|
+
*/
|
|
22
|
+
async logout(options) {
|
|
23
|
+
return this.post("/session/logout", void 0, options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get session status
|
|
27
|
+
*/
|
|
28
|
+
async getStatus(options) {
|
|
29
|
+
return this.get("/session/status", options);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get QR code for scanning
|
|
33
|
+
*/
|
|
34
|
+
async getQRCode(options) {
|
|
35
|
+
return this.get("/session/qr", options);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Configure S3 storage
|
|
39
|
+
*/
|
|
40
|
+
async configureS3(config, options) {
|
|
41
|
+
return this.post("/session/s3/config", config, options);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get S3 configuration
|
|
45
|
+
*/
|
|
46
|
+
async getS3Config(options) {
|
|
47
|
+
return this.get("/session/s3/config", options);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Test S3 connection
|
|
51
|
+
*/
|
|
52
|
+
async testS3(options) {
|
|
53
|
+
return this.post("/session/s3/test", void 0, options);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Delete S3 configuration
|
|
57
|
+
*/
|
|
58
|
+
async deleteS3Config(options) {
|
|
59
|
+
return this.delete("/session/s3/config", options);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Pair phone using verification code
|
|
63
|
+
*/
|
|
64
|
+
async pairPhone(phone, code, options) {
|
|
65
|
+
const request = { Phone: phone, Code: code };
|
|
66
|
+
return this.post("/session/pairphone", request, options);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Request history sync from WhatsApp servers
|
|
70
|
+
*/
|
|
71
|
+
async requestHistory(options) {
|
|
72
|
+
return this.get("/session/history", options);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Set proxy configuration
|
|
76
|
+
*/
|
|
77
|
+
async setProxy(proxy, options) {
|
|
78
|
+
const request = { Proxy: proxy };
|
|
79
|
+
return this.post("/session/proxy", request, options);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
SessionModule
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +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 S3ConfigResponse,\n S3TestResponse,\n PairPhoneRequest,\n PairPhoneResponse,\n HistoryResponse,\n ProxyRequest,\n ProxyResponse,\n} from \"../types/session.js\";\nimport { S3Config, RequestOptions } 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 code: string,\n options?: RequestOptions\n ): Promise<PairPhoneResponse> {\n const request: PairPhoneRequest = { Phone: phone, Code: code };\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 proxy configuration\n */\n async setProxy(\n proxy: string,\n options?: RequestOptions\n ): Promise<ProxyResponse> {\n const request: ProxyRequest = { Proxy: proxy };\n return this.post<ProxyResponse>(\"/session/proxy\", request, options);\n }\n}\n"],"names":[],"mappings":";AAkBO,MAAM,sBAAsB,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,UAAU,SAAmD;AACjE,WAAO,KAAK,IAAoB,eAAe,OAAO;AAAA,EACxD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,YACJ,QACA,SAC2B;AAC3B,WAAO,KAAK,KAAuB,sBAAsB,QAAQ,OAAO;AAAA,EAC1E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,YAAY,SAAqD;AACrE,WAAO,KAAK,IAAsB,sBAAsB,OAAO;AAAA,EACjE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,OAAO,SAAmD;AAC9D,WAAO,KAAK,KAAqB,oBAAoB,QAAW,OAAO;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,eAAe,SAAwD;AAC3E,WAAO,KAAK,OAA4B,sBAAsB,OAAO;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,UACJ,OACA,MACA,SAC4B;AAC5B,UAAM,UAA4B,EAAE,OAAO,OAAO,MAAM,KAAA;AACxD,WAAO,KAAK,KAAwB,sBAAsB,SAAS,OAAO;AAAA,EAC5E;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,eAAe,SAAoD;AACvE,WAAO,KAAK,IAAqB,oBAAoB,OAAO;AAAA,EAC9D;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,SACJ,OACA,SACwB;AACxB,UAAM,UAAwB,EAAE,OAAO,MAAA;AACvC,WAAO,KAAK,KAAoB,kBAAkB,SAAS,OAAO;AAAA,EACpE;AACF;"}
|
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 } from '../types/user.js';
|
|
3
|
+
import { UserInfoResponse, UserCheckResponse, UserAvatarResponse, ContactsResponse, UserPresenceRequest } from '../types/user.js';
|
|
4
4
|
export declare class UserModule extends BaseClient {
|
|
5
5
|
/**
|
|
6
6
|
* Get user details for specified phone numbers
|
|
@@ -18,4 +18,8 @@ export declare class UserModule extends BaseClient {
|
|
|
18
18
|
* Get all contacts
|
|
19
19
|
*/
|
|
20
20
|
getContacts(options?: RequestOptions): Promise<ContactsResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Send user presence (available/unavailable status)
|
|
23
|
+
*/
|
|
24
|
+
sendPresence(request: UserPresenceRequest, options?: RequestOptions): Promise<void>;
|
|
21
25
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseClient } from "../client.js";
|
|
2
|
+
class UserModule extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* Get user details for specified phone numbers
|
|
5
|
+
*/
|
|
6
|
+
async getInfo(phones, options) {
|
|
7
|
+
const request = { Phone: phones };
|
|
8
|
+
return this.post("/user/info", request, options);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Check if phone numbers are registered WhatsApp users
|
|
12
|
+
*/
|
|
13
|
+
async check(phones, options) {
|
|
14
|
+
const request = { Phone: phones };
|
|
15
|
+
return this.post("/user/check", request, options);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get user avatar/profile picture
|
|
19
|
+
*/
|
|
20
|
+
async getAvatar(phone, preview = true, options) {
|
|
21
|
+
const request = { Phone: phone, Preview: preview };
|
|
22
|
+
return this.post("/user/avatar", request, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get all contacts
|
|
26
|
+
*/
|
|
27
|
+
async getContacts(options) {
|
|
28
|
+
return this.get("/user/contacts", options);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Send user presence (available/unavailable status)
|
|
32
|
+
*/
|
|
33
|
+
async sendPresence(request, options) {
|
|
34
|
+
await this.post("/user/presence", request, options);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
UserModule
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +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} 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 request: UserPresenceRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.post<void>(\"/user/presence\", request, options);\n }\n}\n"],"names":[],"mappings":";AAaO,MAAM,mBAAmB,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,SACA,SACe;AACf,UAAM,KAAK,KAAW,kBAAkB,SAAS,OAAO;AAAA,EAC1D;AACF;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
2
|
import { RequestOptions } from '../types/common.js';
|
|
3
|
-
import { SetWebhookResponse, GetWebhookResponse } from '../types/webhook.js';
|
|
3
|
+
import { SetWebhookResponse, GetWebhookResponse, UpdateWebhookResponse, DeleteWebhookResponse } from '../types/webhook.js';
|
|
4
4
|
export declare class WebhookModule extends BaseClient {
|
|
5
5
|
/**
|
|
6
6
|
* Set webhook URL and events to subscribe to
|
|
@@ -10,4 +10,12 @@ export declare class WebhookModule extends BaseClient {
|
|
|
10
10
|
* Get current webhook configuration
|
|
11
11
|
*/
|
|
12
12
|
getWebhook(options?: RequestOptions): Promise<GetWebhookResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Update webhook URL
|
|
15
|
+
*/
|
|
16
|
+
updateWebhook(webhookURL: string, options?: RequestOptions): Promise<UpdateWebhookResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Delete webhook configuration
|
|
19
|
+
*/
|
|
20
|
+
deleteWebhook(options?: RequestOptions): Promise<DeleteWebhookResponse>;
|
|
13
21
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseClient } from "../client.js";
|
|
2
|
+
class WebhookModule extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* Set webhook URL and events to subscribe to
|
|
5
|
+
*/
|
|
6
|
+
async setWebhook(webhookURL, options) {
|
|
7
|
+
const request = { webhookURL };
|
|
8
|
+
return this.post("/webhook", request, options);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get current webhook configuration
|
|
12
|
+
*/
|
|
13
|
+
async getWebhook(options) {
|
|
14
|
+
return this.get("/webhook", options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Update webhook URL
|
|
18
|
+
*/
|
|
19
|
+
async updateWebhook(webhookURL, options) {
|
|
20
|
+
const request = { webhookURL };
|
|
21
|
+
return this.put("/webhook", request, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Delete webhook configuration
|
|
25
|
+
*/
|
|
26
|
+
async deleteWebhook(options) {
|
|
27
|
+
return this.delete("/webhook", options);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
WebhookModule
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=webhook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.js","sources":["../../src/modules/webhook.ts"],"sourcesContent":["import { BaseClient } from \"../client.js\";\nimport { RequestOptions } from \"../types/common.js\";\nimport {\n SetWebhookRequest,\n SetWebhookResponse,\n GetWebhookResponse,\n UpdateWebhookRequest,\n UpdateWebhookResponse,\n DeleteWebhookResponse,\n} from \"../types/webhook.js\";\n\nexport class WebhookModule extends BaseClient {\n /**\n * Set webhook URL and events to subscribe to\n */\n async setWebhook(\n webhookURL: string,\n options?: RequestOptions\n ): Promise<SetWebhookResponse> {\n const request: SetWebhookRequest = { webhookURL };\n return this.post<SetWebhookResponse>(\"/webhook\", request, options);\n }\n\n /**\n * Get current webhook configuration\n */\n async getWebhook(options?: RequestOptions): Promise<GetWebhookResponse> {\n return this.get<GetWebhookResponse>(\"/webhook\", options);\n }\n\n /**\n * Update webhook URL\n */\n async updateWebhook(\n webhookURL: string,\n options?: RequestOptions\n ): Promise<UpdateWebhookResponse> {\n const request: UpdateWebhookRequest = { webhookURL };\n return this.put<UpdateWebhookResponse>(\"/webhook\", request, options);\n }\n\n /**\n * Delete webhook configuration\n */\n async deleteWebhook(\n options?: RequestOptions\n ): Promise<DeleteWebhookResponse> {\n return this.delete<DeleteWebhookResponse>(\"/webhook\", options);\n }\n}\n"],"names":[],"mappings":";AAWO,MAAM,sBAAsB,WAAW;AAAA;AAAA;AAAA;AAAA,EAI5C,MAAM,WACJ,YACA,SAC6B;AAC7B,UAAM,UAA6B,EAAE,WAAA;AACrC,WAAO,KAAK,KAAyB,YAAY,SAAS,OAAO;AAAA,EACnE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,WAAW,SAAuD;AACtE,WAAO,KAAK,IAAwB,YAAY,OAAO;AAAA,EACzD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,cACJ,YACA,SACgC;AAChC,UAAM,UAAgC,EAAE,WAAA;AACxC,WAAO,KAAK,IAA2B,YAAY,SAAS,OAAO;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,cACJ,SACgC;AAChC,WAAO,KAAK,OAA8B,YAAY,OAAO;AAAA,EAC/D;AACF;"}
|
package/dist/types/chat.d.ts
CHANGED
|
@@ -92,3 +92,58 @@ export interface DownloadMediaRequest {
|
|
|
92
92
|
export interface DownloadMediaResponse {
|
|
93
93
|
[key: string]: unknown;
|
|
94
94
|
}
|
|
95
|
+
export interface DeleteMessageRequest {
|
|
96
|
+
Phone: string;
|
|
97
|
+
Id: string;
|
|
98
|
+
Remote?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface DeleteMessageResponse {
|
|
101
|
+
Details: string;
|
|
102
|
+
}
|
|
103
|
+
export interface ChatButton {
|
|
104
|
+
ButtonId: string;
|
|
105
|
+
ButtonText: {
|
|
106
|
+
DisplayText: string;
|
|
107
|
+
};
|
|
108
|
+
Type: number;
|
|
109
|
+
}
|
|
110
|
+
export interface SendButtonsRequest {
|
|
111
|
+
Phone: string;
|
|
112
|
+
Body: string;
|
|
113
|
+
Footer?: string;
|
|
114
|
+
Buttons: ChatButton[];
|
|
115
|
+
ContextInfo?: SimpleContextInfo;
|
|
116
|
+
}
|
|
117
|
+
export interface ListItem {
|
|
118
|
+
Title: string;
|
|
119
|
+
Description?: string;
|
|
120
|
+
RowId: string;
|
|
121
|
+
}
|
|
122
|
+
export interface ListSection {
|
|
123
|
+
Title: string;
|
|
124
|
+
Rows: ListItem[];
|
|
125
|
+
}
|
|
126
|
+
export interface SendListRequest {
|
|
127
|
+
Phone: string;
|
|
128
|
+
Body: string;
|
|
129
|
+
Footer?: string;
|
|
130
|
+
Title: string;
|
|
131
|
+
ButtonText: string;
|
|
132
|
+
Sections: ListSection[];
|
|
133
|
+
ContextInfo?: SimpleContextInfo;
|
|
134
|
+
}
|
|
135
|
+
export interface ChatPollOption {
|
|
136
|
+
Name: string;
|
|
137
|
+
}
|
|
138
|
+
export interface SendPollRequest {
|
|
139
|
+
Phone: string;
|
|
140
|
+
Name: string;
|
|
141
|
+
Options: ChatPollOption[];
|
|
142
|
+
SelectableCount?: number;
|
|
143
|
+
ContextInfo?: SimpleContextInfo;
|
|
144
|
+
}
|
|
145
|
+
export interface EditMessageRequest {
|
|
146
|
+
Phone: string;
|
|
147
|
+
MessageId: string;
|
|
148
|
+
NewText: string;
|
|
149
|
+
}
|
package/dist/types/group.d.ts
CHANGED
|
@@ -74,3 +74,55 @@ export interface GroupPhotoRemoveRequest {
|
|
|
74
74
|
export interface GroupPhotoRemoveResponse {
|
|
75
75
|
Details: string;
|
|
76
76
|
}
|
|
77
|
+
export interface GroupLeaveRequest {
|
|
78
|
+
GroupJID: string;
|
|
79
|
+
}
|
|
80
|
+
export interface GroupLeaveResponse {
|
|
81
|
+
Details: string;
|
|
82
|
+
}
|
|
83
|
+
export interface GroupTopicRequest {
|
|
84
|
+
GroupJID: string;
|
|
85
|
+
Topic: string;
|
|
86
|
+
}
|
|
87
|
+
export interface GroupTopicResponse {
|
|
88
|
+
Details: string;
|
|
89
|
+
}
|
|
90
|
+
export interface GroupAnnounceRequest {
|
|
91
|
+
GroupJID: string;
|
|
92
|
+
Announce: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface GroupAnnounceResponse {
|
|
95
|
+
Details: string;
|
|
96
|
+
}
|
|
97
|
+
export interface GroupJoinRequest {
|
|
98
|
+
InviteLink: string;
|
|
99
|
+
}
|
|
100
|
+
export interface GroupJoinResponse {
|
|
101
|
+
GroupJID: string;
|
|
102
|
+
Details: string;
|
|
103
|
+
}
|
|
104
|
+
export interface GroupInviteInfoRequest {
|
|
105
|
+
InviteLink: string;
|
|
106
|
+
}
|
|
107
|
+
export interface GroupInviteInfoResponse {
|
|
108
|
+
GroupJID: string;
|
|
109
|
+
Name: string;
|
|
110
|
+
Description: string;
|
|
111
|
+
Subject: string;
|
|
112
|
+
Owner: string;
|
|
113
|
+
Creation: string;
|
|
114
|
+
ParticipantsCount: number;
|
|
115
|
+
}
|
|
116
|
+
export interface GroupUpdateParticipantsRequest {
|
|
117
|
+
GroupJID: string;
|
|
118
|
+
Action: "add" | "remove" | "promote" | "demote";
|
|
119
|
+
Participants: string[];
|
|
120
|
+
}
|
|
121
|
+
export interface ParticipantUpdate {
|
|
122
|
+
JID: string;
|
|
123
|
+
Status: string;
|
|
124
|
+
Code: number;
|
|
125
|
+
}
|
|
126
|
+
export interface GroupUpdateParticipantsResponse {
|
|
127
|
+
Updates: ParticipantUpdate[];
|
|
128
|
+
}
|