wx2tg-puppet 3.0.4 → 3.0.5

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.
@@ -1,4 +1,4 @@
1
1
  import { ResponseMsg } from "../core/Message";
2
2
  export declare const say: (content: any, toWxid: string, ats: any) => Promise<ResponseMsg | null | undefined>;
3
3
  export declare const quote: (obj: any, toWxid: string) => Promise<ResponseMsg | null>;
4
- export declare const revoke: (content: any) => Promise<import("axios").AxiosResponse<import("../types/ApiResponse").ApiResponse, any>>;
4
+ export declare const revoke: (content: any) => Promise<import("axios").AxiosResponse<import("../types/ApiResponse").ApiResponse, any, {}>>;
@@ -137,7 +137,8 @@ const say = (content, toWxid, ats) => __awaiter(void 0, void 0, void 0, function
137
137
  case 'other':
138
138
  // 直接从 FileBox 获取文件内容
139
139
  const fileBuffer = yield content.toBuffer();
140
- const fileBlob = new Blob([fileBuffer], { type: 'application/octet-stream' });
140
+ const fileArrayBuffer = fileBuffer.buffer.slice(fileBuffer.byteOffset, fileBuffer.byteOffset + fileBuffer.byteLength);
141
+ const fileBlob = new Blob([fileArrayBuffer], { type: 'application/octet-stream' });
141
142
  // 创建 FormData
142
143
  const formData = new FormData();
143
144
  formData.append('wxid', (config === null || config === void 0 ? void 0 : config.wxid) || '');
@@ -41,6 +41,8 @@ declare class ToolsApi {
41
41
  setproxy(body: any): Promise<AxiosResponse<ApiResponse>>;
42
42
  /** CDN图片下载 */
43
43
  CdnDownloadImage(body: any): Promise<AxiosResponse<ApiResponse>>;
44
+ /** CDN下载聊天记录内嵌图片/文件 */
45
+ CdnDownloadRecordItem(body: any): Promise<AxiosResponse<ApiResponse>>;
44
46
  }
45
47
  export declare const toolsApi: ToolsApi;
46
48
  export {};
@@ -87,5 +87,9 @@ class ToolsApi {
87
87
  CdnDownloadImage(body) {
88
88
  return axiosInstance_1.axiosInstance.post('/Tools/CdnDownloadImage', body);
89
89
  }
90
+ /** CDN下载聊天记录内嵌图片/文件 */
91
+ CdnDownloadRecordItem(body) {
92
+ return axiosInstance_1.axiosInstance.post('/Tools/CdnDownloadRecordItem', body);
93
+ }
90
94
  }
91
95
  exports.toolsApi = new ToolsApi();
@@ -67,7 +67,7 @@ export declare class Message {
67
67
  * Get the room from the message. Returns null if not in a room.
68
68
  */
69
69
  room(): Promise<Room | null>;
70
- static revoke(obj: any): Promise<Axios.AxiosResponse<import("../types/ApiResponse").ApiResponse, any>>;
70
+ static revoke(obj: any): Promise<Axios.AxiosResponse<import("../types/ApiResponse").ApiResponse, any, {}>>;
71
71
  static forwardTo(text: any, to: any, type: any): void;
72
72
  /**
73
73
  * Get the text content of the message.
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "wx2tg-puppet",
3
- "version": "3.0.4",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
6
- "files": [
7
- "dist",
8
- "README.md"
9
- ],
10
- "scripts": {
11
- "build": "tsc",
12
- "start": "node dist/index.js",
13
- "dev": "ts-node src/index.ts",
14
- "test": "ts-node src/test.ts",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "keywords": [
18
- "wechat",
19
- "bot",
20
- "puppet"
21
- ],
22
- "author": "",
23
- "license": "ISC",
24
- "description": "微信机器人核心库,可作为依赖被其他项目引入。",
25
- "devDependencies": {
26
- "@types/json-bigint": "^1.0.4",
27
- "@types/qrcode-terminal": "^0.12.2",
28
- "ts-node": "^10.9.2",
29
- "typescript": "^5.8.3"
30
- },
31
- "dependencies": {
32
- "axios": "^1.9.0",
33
- "fast-xml-parser": "^5.2.3",
34
- "file-box": "^1.4.15",
35
- "json-bigint": "^1.0.0",
36
- "qrcode-terminal": "^0.12.0",
37
- "reflect-metadata": "^0.2.2",
38
- "sqlite3": "^5.1.7",
39
- "typeorm": "^0.3.23",
40
- "wx-voice": "^0.2.1"
41
- }
42
- }
1
+ {
2
+ "name": "wx2tg-puppet",
3
+ "version": "3.0.5",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist",
8
+ "README.md"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "start": "node dist/index.js",
13
+ "dev": "ts-node src/index.ts",
14
+ "test": "ts-node src/test.ts",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "keywords": [
18
+ "wechat",
19
+ "bot",
20
+ "puppet"
21
+ ],
22
+ "author": "",
23
+ "license": "ISC",
24
+ "description": "微信机器人核心库,可作为依赖被其他项目引入。",
25
+ "devDependencies": {
26
+ "@types/json-bigint": "^1.0.4",
27
+ "@types/qrcode-terminal": "^0.12.2",
28
+ "ts-node": "^10.9.2",
29
+ "typescript": "^5.8.3"
30
+ },
31
+ "dependencies": {
32
+ "axios": "^1.9.0",
33
+ "fast-xml-parser": "^5.2.3",
34
+ "file-box": "^1.4.15",
35
+ "json-bigint": "^1.0.0",
36
+ "qrcode-terminal": "^0.12.0",
37
+ "reflect-metadata": "^0.2.2",
38
+ "sqlite3": "^5.1.7",
39
+ "typeorm": "^0.3.23",
40
+ "wx-voice": "^0.2.1"
41
+ }
42
+ }