node-easywechat 3.5.16 → 3.5.17

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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v3.5.17 (2023-12-20)
5
+
6
+ - Fix: 修复TS问题 (#62)
7
+
4
8
  ## v3.5.16 (2023-12-20)
5
9
 
6
10
  - Fix: 优化消息类型,允许未定义字段的存在 (#62)
@@ -26,6 +26,6 @@ declare class Message {
26
26
  */
27
27
  toString(): string;
28
28
  }
29
- interface Message extends Recordable, HasAttributesMixin {
29
+ interface Message extends Record<string, any>, HasAttributesMixin {
30
30
  }
31
31
  export = Message;
@@ -4,28 +4,28 @@ import axios from 'axios';
4
4
  declare module 'axios' {
5
5
 
6
6
  interface AxiosInstance {
7
- <T = Recordable, R = AxiosResponse<T>>(config: AxiosRequestConfig): Promise<R>;
8
- request<T = Recordable, R = AxiosResponse<T>>(config: AxiosRequestConfig): Promise<R>;
9
- get<T = Recordable, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
10
- delete<T = Recordable, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
11
- head<T = Recordable, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
12
- post<T = Recordable, R = AxiosResponse<T>>(url: string, data?: Recordable, config?: AxiosRequestConfig): Promise<R>;
13
- put<T = Recordable, R = AxiosResponse<T>>(url: string, data?: Recordable, config?: AxiosRequestConfig): Promise<R>;
14
- patch<T = Recordable, R = AxiosResponse<T>>(url: string, data?: Recordable, config?: AxiosRequestConfig): Promise<R>;
7
+ <T = Record<string, any>, R = AxiosResponse<T>>(config: AxiosRequestConfig): Promise<R>;
8
+ request<T = Record<string, any>, R = AxiosResponse<T>>(config: AxiosRequestConfig): Promise<R>;
9
+ get<T = Record<string, any>, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
10
+ delete<T = Record<string, any>, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
11
+ head<T = Record<string, any>, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
12
+ post<T = Record<string, any>, R = AxiosResponse<T>>(url: string, data?: Record<string, any>, config?: AxiosRequestConfig): Promise<R>;
13
+ put<T = Record<string, any>, R = AxiosResponse<T>>(url: string, data?: Record<string, any>, config?: AxiosRequestConfig): Promise<R>;
14
+ patch<T = Record<string, any>, R = AxiosResponse<T>>(url: string, data?: Record<string, any>, config?: AxiosRequestConfig): Promise<R>;
15
15
  }
16
16
 
17
17
  interface AxiosRequestConfig {
18
18
  /**
19
19
  * 要发送的xml数据,会自动解析并赋值到data属性,同时设置content-type=text/xml
20
20
  */
21
- xml?: string | Recordable;
21
+ xml?: string | Record<string, any>;
22
22
  /**
23
23
  * 要发送的json数据,会自动解析并赋值到data属性,同时设置content-type=application/json
24
24
  */
25
- json?: string | Recordable;
25
+ json?: string | Record<string, any>;
26
26
  /**
27
27
  * 要发送的FormData数据,会自动解析并赋值到data属性,同时设置根据内容提取headers
28
28
  */
29
- formData?: Recordable;
29
+ formData?: Record<string, any>;
30
30
  }
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-easywechat",
3
- "version": "3.5.16",
3
+ "version": "3.5.17",
4
4
  "description": "EasyWechat SDK for Node.js (NOT OFFICIAL)",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,2 +0,0 @@
1
-
2
- type Recordable<T = any> = Record<string, T>;