@kyan-du/agent-wechat-wechaty-puppet 0.14.0 → 0.14.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.
Files changed (2) hide show
  1. package/dist/mod.js +5 -4
  2. package/package.json +1 -1
package/dist/mod.js CHANGED
@@ -4336,11 +4336,12 @@ var WeChatClient = class {
4336
4336
  await throwHttpError(res);
4337
4337
  return res.json();
4338
4338
  }
4339
- async post(path, body) {
4339
+ async post(path, body, signal) {
4340
4340
  const res = await fetch(`${this.base}${path}`, {
4341
4341
  method: "POST",
4342
4342
  headers: this.headers,
4343
- body: body != null ? JSON.stringify(body) : void 0
4343
+ body: body != null ? JSON.stringify(body) : void 0,
4344
+ signal
4344
4345
  });
4345
4346
  if (!res.ok)
4346
4347
  await throwHttpError(res);
@@ -4385,8 +4386,8 @@ var WeChatClient = class {
4385
4386
  async markChatRead(chatId) {
4386
4387
  return this.post(`/api/chats/${encodeURIComponent(chatId)}/mark-read`);
4387
4388
  }
4388
- async openChat(chatId, clearUnreads) {
4389
- return this.post(`/api/chats/${encodeURIComponent(chatId)}/open${qs({ clearUnreads })}`);
4389
+ async openChat(chatId, clearUnreads, signal, executionTimeoutMs) {
4390
+ return this.post(`/api/chats/${encodeURIComponent(chatId)}/open${qs({ clearUnreads, executionTimeoutMs })}`, void 0, signal);
4390
4391
  }
4391
4392
  async listGroupMembersPage(groupId, limit, cursor) {
4392
4393
  const page = groupMembersPageSchema.parse(await this.get(`/api/groups/${encodeURIComponent(groupId)}/members${qs({ limit, cursor })}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyan-du/agent-wechat-wechaty-puppet",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Wechaty Puppet for agent-wechat — bridges Wechaty bots to WeChat via the agent-wechat REST/WebSocket server",
5
5
  "type": "module",
6
6
  "main": "./dist/mod.js",