@agent-wechat/wechat 0.7.9 → 0.8.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/dist/index.js +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1204,6 +1204,13 @@ var WeChatClient = class {
|
|
|
1204
1204
|
async openChat(chatId, clearUnreads) {
|
|
1205
1205
|
return this.post(`/api/chats/${encodeURIComponent(chatId)}/open${qs({ clearUnreads })}`);
|
|
1206
1206
|
}
|
|
1207
|
+
// ---- Contacts ----
|
|
1208
|
+
async listContacts(limit, offset) {
|
|
1209
|
+
return this.get(`/api/contacts${qs({ limit, offset })}`);
|
|
1210
|
+
}
|
|
1211
|
+
async findContacts(name) {
|
|
1212
|
+
return this.get(`/api/contacts/find${qs({ name })}`);
|
|
1213
|
+
}
|
|
1207
1214
|
// ---- Messages ----
|
|
1208
1215
|
async listMessages(chatId, limit, offset) {
|
|
1209
1216
|
return this.get(`/api/messages/${encodeURIComponent(chatId)}${qs({ limit, offset })}`);
|