wx2tg-puppet 2.0.5 → 2.0.7
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/action/common.d.ts +3 -3
- package/dist/action/common.js +15 -7
- package/dist/api/FavorApi.d.ts +26 -6
- package/dist/api/FinderApi.d.ts +18 -16
- package/dist/api/FriendApi.d.ts +74 -12
- package/dist/api/FriendCircleApi.d.ts +12 -10
- package/dist/api/GroupApi.d.ts +62 -19
- package/dist/api/LabelApi.d.ts +8 -6
- package/dist/api/LoginApi.d.ts +85 -43
- package/dist/api/MsgApi.d.ts +98 -18
- package/dist/api/OfficialAccountsApi.d.ts +9 -7
- package/dist/api/QWContactApi.d.ts +5 -3
- package/dist/api/SayHelloApi.d.ts +4 -2
- package/dist/api/ToolsApi.d.ts +22 -18
- package/dist/api/ToolsApi.js +8 -0
- package/dist/api/UserApi.d.ts +84 -18
- package/dist/api/WxappApi.d.ts +16 -14
- package/dist/core/Contact.d.ts +2 -2
- package/dist/core/Friendship.js +6 -0
- package/dist/core/Message.d.ts +4 -3
- package/dist/core/Message.js +3 -1
- package/dist/core/Room.d.ts +2 -2
- package/dist/core/Room.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/types/ApiResponse.d.ts +14 -0
- package/dist/types/ApiResponse.js +2 -0
- package/dist/types/MessageType.d.ts +29 -0
- package/dist/types/MessageType.js +32 -0
- package/dist/utils/axiosInstance.d.ts +1 -1
- package/package.json +1 -2
package/dist/api/MsgApi.d.ts
CHANGED
|
@@ -1,40 +1,120 @@
|
|
|
1
|
+
import { ApiResponse } from '../types/ApiResponse';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
export interface MsgDefaultParam {
|
|
4
|
+
Content: string;
|
|
5
|
+
ToWxid: string;
|
|
6
|
+
Wxid: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MsgRevokeMsgParam {
|
|
9
|
+
ClientMsgId: number;
|
|
10
|
+
CreateTime: number;
|
|
11
|
+
NewMsgId: number;
|
|
12
|
+
ToUserName: string;
|
|
13
|
+
Wxid: string;
|
|
14
|
+
}
|
|
15
|
+
export interface MsgSendAppMsgParam {
|
|
16
|
+
ToWxid: string;
|
|
17
|
+
Type: number;
|
|
18
|
+
Wxid: string;
|
|
19
|
+
Xml: string;
|
|
20
|
+
}
|
|
21
|
+
export interface MsgSendEmojiParam {
|
|
22
|
+
Base64: string;
|
|
23
|
+
Md5: string;
|
|
24
|
+
ToWxid: string;
|
|
25
|
+
TotalLen: number;
|
|
26
|
+
Wxid: string;
|
|
27
|
+
}
|
|
28
|
+
export interface MsgSendImageMsgParam {
|
|
29
|
+
Base64: string;
|
|
30
|
+
ToWxid: string;
|
|
31
|
+
Wxid: string;
|
|
32
|
+
}
|
|
33
|
+
export interface MsgSendNewMsgParam {
|
|
34
|
+
At: string;
|
|
35
|
+
Content: string;
|
|
36
|
+
ToWxid: string;
|
|
37
|
+
Type: number;
|
|
38
|
+
Wxid: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MsgSendVideoMsgParam {
|
|
41
|
+
Base64: string;
|
|
42
|
+
ImageBase64: string;
|
|
43
|
+
PlayLength: number;
|
|
44
|
+
ToWxid: string;
|
|
45
|
+
Wxid: string;
|
|
46
|
+
}
|
|
47
|
+
export interface MsgSendVoiceMessageParam {
|
|
48
|
+
Base64: string;
|
|
49
|
+
ToWxid: string;
|
|
50
|
+
Type: number;
|
|
51
|
+
VoiceTime: number;
|
|
52
|
+
Wxid: string;
|
|
53
|
+
}
|
|
54
|
+
export interface MsgShareCardParam {
|
|
55
|
+
CardAlias: string;
|
|
56
|
+
CardNickName: string;
|
|
57
|
+
CardWxId: string;
|
|
58
|
+
ToWxid: string;
|
|
59
|
+
Wxid: string;
|
|
60
|
+
}
|
|
61
|
+
export interface MsgShareLocationParam {
|
|
62
|
+
Infourl: string;
|
|
63
|
+
Label: string;
|
|
64
|
+
Poiname: string;
|
|
65
|
+
Scale: number;
|
|
66
|
+
ToWxid: string;
|
|
67
|
+
Wxid: string;
|
|
68
|
+
X: number;
|
|
69
|
+
Y: number;
|
|
70
|
+
}
|
|
71
|
+
export interface MsgShareVideoMsgParam {
|
|
72
|
+
ToWxid: string;
|
|
73
|
+
Wxid: string;
|
|
74
|
+
Xml: string;
|
|
75
|
+
}
|
|
76
|
+
export interface MsgSyncParam {
|
|
77
|
+
Scene: number;
|
|
78
|
+
Synckey: string;
|
|
79
|
+
Wxid: string;
|
|
80
|
+
}
|
|
1
81
|
declare class MsgApi {
|
|
2
82
|
/** 批量发送文本消息 */
|
|
3
|
-
BatchSendMsg(body:
|
|
83
|
+
BatchSendMsg(body: MsgSendNewMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
4
84
|
/** 发送提醒消息 */
|
|
5
|
-
RemindMsg(body:
|
|
85
|
+
RemindMsg(body: MsgDefaultParam): Promise<AxiosResponse<ApiResponse>>;
|
|
6
86
|
/** 撤回消息 */
|
|
7
|
-
Revoke(body:
|
|
87
|
+
Revoke(body: MsgRevokeMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
8
88
|
/** 发送App消息 */
|
|
9
|
-
SendApp(body:
|
|
89
|
+
SendApp(body: MsgSendAppMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
10
90
|
/** 转发聊天记录 */
|
|
11
|
-
SendTransmitMsg(body:
|
|
91
|
+
SendTransmitMsg(body: MsgDefaultParam): Promise<AxiosResponse<ApiResponse>>;
|
|
12
92
|
/** 发送文件(转发,并非上传) */
|
|
13
|
-
SendCDNFile(body:
|
|
93
|
+
SendCDNFile(body: MsgDefaultParam): Promise<AxiosResponse<ApiResponse>>;
|
|
14
94
|
/** 发送Cdn图片(转发图片) */
|
|
15
|
-
SendCDNImg(body:
|
|
95
|
+
SendCDNImg(body: MsgDefaultParam): Promise<AxiosResponse<ApiResponse>>;
|
|
16
96
|
/** 发送Cdn视频(转发视频) */
|
|
17
|
-
SendCDNVideo(body:
|
|
97
|
+
SendCDNVideo(body: MsgDefaultParam): Promise<AxiosResponse<ApiResponse>>;
|
|
18
98
|
/** 发送Emoji */
|
|
19
|
-
SendEmoji(body:
|
|
99
|
+
SendEmoji(body: MsgSendEmojiParam): Promise<AxiosResponse<ApiResponse>>;
|
|
20
100
|
/** 发送文本消息 */
|
|
21
|
-
SendTxt(body:
|
|
101
|
+
SendTxt(body: MsgSendNewMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
22
102
|
/** 发送视频 */
|
|
23
|
-
SendVideo(body:
|
|
103
|
+
SendVideo(body: MsgSendVideoMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
24
104
|
/** 发送语音 */
|
|
25
|
-
SendVoice(body:
|
|
105
|
+
SendVoice(body: MsgSendVoiceMessageParam): Promise<AxiosResponse<ApiResponse>>;
|
|
26
106
|
/** 分享名片 */
|
|
27
|
-
ShareCard(body:
|
|
107
|
+
ShareCard(body: MsgShareCardParam): Promise<AxiosResponse<ApiResponse>>;
|
|
28
108
|
/** 发送分享链接消息 */
|
|
29
|
-
ShareLink(body:
|
|
109
|
+
ShareLink(body: MsgSendAppMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
30
110
|
/** 分享位置 */
|
|
31
|
-
ShareLocation(body:
|
|
111
|
+
ShareLocation(body: MsgShareLocationParam): Promise<AxiosResponse<ApiResponse>>;
|
|
32
112
|
/** 发送分享视频消息 */
|
|
33
|
-
ShareVideo(body:
|
|
113
|
+
ShareVideo(body: MsgShareVideoMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
34
114
|
/** 同步消息 */
|
|
35
|
-
Sync(body:
|
|
115
|
+
Sync(body: MsgSyncParam): Promise<AxiosResponse<ApiResponse>>;
|
|
36
116
|
/** 发送图片 */
|
|
37
|
-
UploadImg(body:
|
|
117
|
+
UploadImg(body: MsgSendImageMsgParam): Promise<AxiosResponse<ApiResponse>>;
|
|
38
118
|
}
|
|
39
119
|
export declare const msgApi: MsgApi;
|
|
40
120
|
export {};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
import { ApiResponse } from '../types/ApiResponse';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
1
3
|
declare class OfficialAccountsApi {
|
|
2
4
|
/** 关注 */
|
|
3
|
-
Follow(body: any):
|
|
5
|
+
Follow(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
4
6
|
/** 阅读文章,返回 分享、看一看、阅读数据 */
|
|
5
|
-
GetAppMsgExt(body: any):
|
|
7
|
+
GetAppMsgExt(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
6
8
|
/** 点赞文章,返回 分享、看一看、阅读数据 */
|
|
7
|
-
GetAppMsgExtLike(body: any):
|
|
9
|
+
GetAppMsgExtLike(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
8
10
|
/** JSAPIPreVerify */
|
|
9
|
-
JSAPIPreVerify(body: any):
|
|
11
|
+
JSAPIPreVerify(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
10
12
|
/** MpGetA8Key(获取文章key和uin) */
|
|
11
|
-
MpGetA8Key(body: any):
|
|
13
|
+
MpGetA8Key(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
12
14
|
/** OauthAuthorize */
|
|
13
|
-
OauthAuthorize(body: any):
|
|
15
|
+
OauthAuthorize(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
14
16
|
/** 取消关注 */
|
|
15
|
-
Quit(body: any):
|
|
17
|
+
Quit(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
16
18
|
}
|
|
17
19
|
export declare const officialAccountsApi: OfficialAccountsApi;
|
|
18
20
|
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { ApiResponse } from '../types/ApiResponse';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
1
3
|
declare class QWContactApi {
|
|
2
4
|
/** QWApplyAddContact */
|
|
3
|
-
QWApplyAddContact(body: any):
|
|
5
|
+
QWApplyAddContact(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
4
6
|
/** QWAddContact */
|
|
5
|
-
QWAddContact(body: any):
|
|
7
|
+
QWAddContact(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
6
8
|
/** SearchQWContact */
|
|
7
|
-
SearchQWContact(body: any):
|
|
9
|
+
SearchQWContact(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
8
10
|
}
|
|
9
11
|
export declare const qwContactApi: QWContactApi;
|
|
10
12
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { ApiResponse } from '../types/ApiResponse';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
1
3
|
declare class SayHelloApi {
|
|
2
4
|
/** 模式1-扫码 */
|
|
3
|
-
Modelv1(body: any):
|
|
5
|
+
Modelv1(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
4
6
|
/** 模式3-v3/v4打招呼 */
|
|
5
|
-
Modelv2(body: any):
|
|
7
|
+
Modelv2(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
6
8
|
}
|
|
7
9
|
export declare const sayHelloApi: SayHelloApi;
|
|
8
10
|
export {};
|
package/dist/api/ToolsApi.d.ts
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
|
+
import { ApiResponse } from '../types/ApiResponse';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
1
3
|
declare class ToolsApi {
|
|
2
4
|
/** 生成支付二维码 */
|
|
3
|
-
GeneratePayQCode(wxid: string):
|
|
5
|
+
GeneratePayQCode(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
4
6
|
/** 获取实名信息 */
|
|
5
|
-
GetRealNameInfo(wxid: string):
|
|
7
|
+
GetRealNameInfo(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
6
8
|
/** 抢红包 */
|
|
7
|
-
OpenHongBao(body: any):
|
|
9
|
+
OpenHongBao(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
8
10
|
/** 文件下载 */
|
|
9
|
-
DownloadFile(body: any):
|
|
11
|
+
DownloadFile(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
10
12
|
/** 高清图片下载 */
|
|
11
|
-
DownloadImg(body: any):
|
|
13
|
+
DownloadImg(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
12
14
|
/** 视频下载 */
|
|
13
|
-
DownloadVideo(body: any):
|
|
15
|
+
DownloadVideo(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
14
16
|
/** 语音下载 */
|
|
15
|
-
DownloadVoice(body: any):
|
|
17
|
+
DownloadVoice(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
16
18
|
/** Emoji下载 */
|
|
17
|
-
EmojiDownload(body: any):
|
|
19
|
+
EmojiDownload(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
18
20
|
/** GetA8Key */
|
|
19
|
-
GetA8Key(body: any):
|
|
21
|
+
GetA8Key(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
20
22
|
/** 获取余额以及银行卡信息 */
|
|
21
|
-
GetBandCardList(wxid: string):
|
|
23
|
+
GetBandCardList(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
22
24
|
/** GetBoundHardDevices */
|
|
23
|
-
GetBoundHardDevices(wxid: string):
|
|
25
|
+
GetBoundHardDevices(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
24
26
|
/** 获取CDN服务器dns信息 */
|
|
25
|
-
GetCdnDns(wxid: string):
|
|
27
|
+
GetCdnDns(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
26
28
|
/** OauthSdkApp */
|
|
27
|
-
OauthSdkApp(body: any):
|
|
29
|
+
OauthSdkApp(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
28
30
|
/** 第三方APP授权 */
|
|
29
|
-
ThirdAppGrant(body: any):
|
|
31
|
+
ThirdAppGrant(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
30
32
|
/** 修改微信步数 */
|
|
31
|
-
UpdateStepNumberApi(body: any):
|
|
33
|
+
UpdateStepNumberApi(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
32
34
|
/** 文件上传 */
|
|
33
|
-
UploadFile(body: any):
|
|
35
|
+
UploadFile(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
36
|
+
/** 二进制文件上传 */
|
|
37
|
+
UploadFileBinary(formData: FormData): Promise<AxiosResponse<ApiResponse>>;
|
|
34
38
|
/** 设置/删除代理IP */
|
|
35
|
-
setproxy(body: any):
|
|
39
|
+
setproxy(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
36
40
|
/** CDN图片下载 */
|
|
37
|
-
CdnDownloadImage(body: any):
|
|
41
|
+
CdnDownloadImage(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
38
42
|
}
|
|
39
43
|
export declare const toolsApi: ToolsApi;
|
|
40
44
|
export {};
|
package/dist/api/ToolsApi.js
CHANGED
|
@@ -67,6 +67,14 @@ class ToolsApi {
|
|
|
67
67
|
UploadFile(body) {
|
|
68
68
|
return axiosInstance_1.axiosInstance.post('/Tools/UploadFile', body);
|
|
69
69
|
}
|
|
70
|
+
/** 二进制文件上传 */
|
|
71
|
+
UploadFileBinary(formData) {
|
|
72
|
+
return axiosInstance_1.axiosInstance.post('/Tools/UploadFileBinary', formData, {
|
|
73
|
+
headers: {
|
|
74
|
+
'Content-Type': 'multipart/form-data',
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
70
78
|
/** 设置/删除代理IP */
|
|
71
79
|
setproxy(body) {
|
|
72
80
|
return axiosInstance_1.axiosInstance.post('/Tools/setproxy', body);
|
package/dist/api/UserApi.d.ts
CHANGED
|
@@ -1,40 +1,106 @@
|
|
|
1
|
+
import { ApiResponse } from '../types/ApiResponse';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
export interface UserBindQQParam {
|
|
4
|
+
Account: number;
|
|
5
|
+
Password: string;
|
|
6
|
+
Wxid: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UserEmailParam {
|
|
9
|
+
Email: string;
|
|
10
|
+
Wxid: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UserBindMobileParam {
|
|
13
|
+
Mobile: string;
|
|
14
|
+
Verifycode: string;
|
|
15
|
+
Wxid: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UserDelSafetyInfoParam {
|
|
18
|
+
Uuid: string;
|
|
19
|
+
Wxid: string;
|
|
20
|
+
}
|
|
21
|
+
export interface UserGetQRCodeParam {
|
|
22
|
+
Style: number;
|
|
23
|
+
Wxid: string;
|
|
24
|
+
}
|
|
25
|
+
export interface UserPrivacySettingsParam {
|
|
26
|
+
Function: number;
|
|
27
|
+
Value: number;
|
|
28
|
+
Wxid: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UserReportMotionParam {
|
|
31
|
+
DeviceId: string;
|
|
32
|
+
DeviceType: string;
|
|
33
|
+
StepCount: number;
|
|
34
|
+
Wxid: string;
|
|
35
|
+
}
|
|
36
|
+
export interface UserSendVerifyMobileParam {
|
|
37
|
+
Mobile: string;
|
|
38
|
+
Opcode: number;
|
|
39
|
+
Wxid: string;
|
|
40
|
+
}
|
|
41
|
+
export interface UserSetAlisaParam {
|
|
42
|
+
Alisa: string;
|
|
43
|
+
Wxid: string;
|
|
44
|
+
}
|
|
45
|
+
export interface UserNewSetPasswdParam {
|
|
46
|
+
NewPassword: string;
|
|
47
|
+
Ticket: string;
|
|
48
|
+
Wxid: string;
|
|
49
|
+
}
|
|
50
|
+
export interface UserUpdateProfileParam {
|
|
51
|
+
City: string;
|
|
52
|
+
Country: string;
|
|
53
|
+
NickName: string;
|
|
54
|
+
Province: string;
|
|
55
|
+
Sex: number;
|
|
56
|
+
Signature: string;
|
|
57
|
+
Wxid: string;
|
|
58
|
+
}
|
|
59
|
+
export interface UserUploadHeadImageParam {
|
|
60
|
+
Base64: string;
|
|
61
|
+
Wxid: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UserNewVerifyPasswdParam {
|
|
64
|
+
Password: string;
|
|
65
|
+
Wxid: string;
|
|
66
|
+
}
|
|
1
67
|
declare class UserApi {
|
|
2
68
|
/** 绑定QQ */
|
|
3
|
-
BindQQ(body:
|
|
69
|
+
BindQQ(body: UserBindQQParam): Promise<AxiosResponse<ApiResponse>>;
|
|
4
70
|
/** 绑定邮箱 */
|
|
5
|
-
BindingEmail(body:
|
|
71
|
+
BindingEmail(body: UserEmailParam): Promise<AxiosResponse<ApiResponse>>;
|
|
6
72
|
/** 换绑手机号 */
|
|
7
|
-
BindingMobile(body:
|
|
73
|
+
BindingMobile(body: UserBindMobileParam): Promise<AxiosResponse<ApiResponse>>;
|
|
8
74
|
/** 检查微信号安全环境 */
|
|
9
|
-
CheckCanSetAlias(wxid: string):
|
|
75
|
+
CheckCanSetAlias(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
10
76
|
/** 删除登录设备 */
|
|
11
|
-
DelSafetyInfo(body:
|
|
77
|
+
DelSafetyInfo(body: UserDelSafetyInfoParam): Promise<AxiosResponse<ApiResponse>>;
|
|
12
78
|
/** 取个人信息 */
|
|
13
|
-
GetContractProfile(wxid: string):
|
|
79
|
+
GetContractProfile(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
14
80
|
/** 取个人二维码 */
|
|
15
|
-
GetQRCode(body:
|
|
81
|
+
GetQRCode(body: UserGetQRCodeParam): Promise<AxiosResponse<ApiResponse>>;
|
|
16
82
|
/** 登录设备管理 */
|
|
17
|
-
GetSafetyInfo(wxid: string):
|
|
83
|
+
GetSafetyInfo(wxid: string): Promise<AxiosResponse<ApiResponse>>;
|
|
18
84
|
/** 一键修改密码 */
|
|
19
|
-
OnekeySetPasswd(body:
|
|
85
|
+
OnekeySetPasswd(body: UserNewSetPasswdParam): Promise<AxiosResponse<ApiResponse>>;
|
|
20
86
|
/** 隐私设置 */
|
|
21
|
-
PrivacySettings(body:
|
|
87
|
+
PrivacySettings(body: UserPrivacySettingsParam): Promise<AxiosResponse<ApiResponse>>;
|
|
22
88
|
/** ReportMotion */
|
|
23
|
-
ReportMotion(body:
|
|
89
|
+
ReportMotion(body: UserReportMotionParam): Promise<AxiosResponse<ApiResponse>>;
|
|
24
90
|
/** 修改微信号(一年一次) */
|
|
25
|
-
ReviseAlisa(body:
|
|
91
|
+
ReviseAlisa(body: UserSetAlisaParam): Promise<AxiosResponse<ApiResponse>>;
|
|
26
92
|
/** 发送手机验证码 */
|
|
27
|
-
SendVerifyMobile(body:
|
|
93
|
+
SendVerifyMobile(body: UserSendVerifyMobileParam): Promise<AxiosResponse<ApiResponse>>;
|
|
28
94
|
/** 设置微信号 */
|
|
29
|
-
SetAlisa(body:
|
|
95
|
+
SetAlisa(body: UserSetAlisaParam): Promise<AxiosResponse<ApiResponse>>;
|
|
30
96
|
/** 修改密码 */
|
|
31
|
-
SetPasswd(body:
|
|
97
|
+
SetPasswd(body: UserNewSetPasswdParam): Promise<AxiosResponse<ApiResponse>>;
|
|
32
98
|
/** 修改个人信息 */
|
|
33
|
-
UpdateProfile(body:
|
|
99
|
+
UpdateProfile(body: UserUpdateProfileParam): Promise<AxiosResponse<ApiResponse>>;
|
|
34
100
|
/** 修改头像 */
|
|
35
|
-
UploadHeadImage(body:
|
|
101
|
+
UploadHeadImage(body: UserUploadHeadImageParam): Promise<AxiosResponse<ApiResponse>>;
|
|
36
102
|
/** 验证密码 */
|
|
37
|
-
VerifyPasswd(body:
|
|
103
|
+
VerifyPasswd(body: UserNewVerifyPasswdParam): Promise<AxiosResponse<ApiResponse>>;
|
|
38
104
|
}
|
|
39
105
|
export declare const userApi: UserApi;
|
|
40
106
|
export {};
|
package/dist/api/WxappApi.d.ts
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
+
import { ApiResponse } from '../types/ApiResponse';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
1
3
|
declare class WxappApi {
|
|
2
4
|
/** AddAvatar */
|
|
3
|
-
AddAvatar(body: any):
|
|
5
|
+
AddAvatar(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
4
6
|
/** AddMobile */
|
|
5
|
-
AddMobile(body: any):
|
|
7
|
+
AddMobile(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
6
8
|
/** AddWxAppRecord */
|
|
7
|
-
AddWxAppRecord(body: any):
|
|
9
|
+
AddWxAppRecord(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
8
10
|
/** CloudCallFunction */
|
|
9
|
-
CloudCallFunction(body: any):
|
|
11
|
+
CloudCallFunction(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
10
12
|
/** DelMobile */
|
|
11
|
-
DelMobile(body: any):
|
|
13
|
+
DelMobile(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
12
14
|
/** GetAllMobile */
|
|
13
|
-
GetAllMobile(body: any):
|
|
15
|
+
GetAllMobile(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
14
16
|
/** GetRandomAvatar */
|
|
15
|
-
GetRandomAvatar(body: any):
|
|
17
|
+
GetRandomAvatar(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
16
18
|
/** GetUserOpenId */
|
|
17
|
-
GetUserOpenId(body: any):
|
|
19
|
+
GetUserOpenId(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
18
20
|
/** JSGetSessionid */
|
|
19
|
-
JSGetSessionid(body: any):
|
|
21
|
+
JSGetSessionid(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
20
22
|
/** JSGetSessionidQRcode */
|
|
21
|
-
JSGetSessionidQRcode(body: any):
|
|
23
|
+
JSGetSessionidQRcode(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
22
24
|
/** 授权小程序(返回授权后的code) */
|
|
23
|
-
JSLogin(body: any):
|
|
25
|
+
JSLogin(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
24
26
|
/** 小程序操作 */
|
|
25
|
-
JSOperateWxData(body: any):
|
|
27
|
+
JSOperateWxData(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
26
28
|
/** QrcodeAuthLogin */
|
|
27
|
-
QrcodeAuthLogin(body: any):
|
|
29
|
+
QrcodeAuthLogin(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
28
30
|
/** UploadAvatarImg */
|
|
29
|
-
UploadAvatarImg(body: any):
|
|
31
|
+
UploadAvatarImg(body: any): Promise<AxiosResponse<ApiResponse>>;
|
|
30
32
|
}
|
|
31
33
|
export declare const wxappApi: WxappApi;
|
|
32
34
|
export {};
|
package/dist/core/Contact.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ export declare class Contact {
|
|
|
38
38
|
/**
|
|
39
39
|
* Send text, Contact, or file to contact, return the message which the bot sent (only puppet-padplus supported).
|
|
40
40
|
*/
|
|
41
|
-
say(content: any): Promise<
|
|
42
|
-
quoteSay(text: string, replyMsgId: string, fromId: string, content: string): Promise<ResponseMsg>;
|
|
41
|
+
say(content: any): Promise<import("axios").AxiosResponse<import("../types/ApiResponse").ApiResponse, any> | ResponseMsg | null | undefined>;
|
|
42
|
+
quoteSay(text: string, replyMsgId: string, fromId: string, content: string): Promise<ResponseMsg | null>;
|
|
43
43
|
/**
|
|
44
44
|
* Check if contact is self
|
|
45
45
|
*/
|
package/dist/core/Friendship.js
CHANGED
|
@@ -33,6 +33,8 @@ class Friendship {
|
|
|
33
33
|
accept() {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
const config = yield config_service_1.configService.get();
|
|
36
|
+
if (!config)
|
|
37
|
+
return null;
|
|
36
38
|
return FriendApi_1.friendApi.PassVerify({
|
|
37
39
|
"Scene": parseInt(this.scene + ''),
|
|
38
40
|
"V1": this.v3,
|
|
@@ -80,6 +82,8 @@ class Friendship {
|
|
|
80
82
|
var _a, _b, _c;
|
|
81
83
|
try {
|
|
82
84
|
const config = yield config_service_1.configService.get();
|
|
85
|
+
if (!config)
|
|
86
|
+
return undefined;
|
|
83
87
|
const res = yield FriendApi_1.friendApi.Search({
|
|
84
88
|
"FromScene": 0,
|
|
85
89
|
"SearchScene": 1,
|
|
@@ -107,6 +111,8 @@ class Friendship {
|
|
|
107
111
|
static add(contact, helloMessage) {
|
|
108
112
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
113
|
const config = yield config_service_1.configService.get();
|
|
114
|
+
if (!config)
|
|
115
|
+
return null;
|
|
110
116
|
return FriendApi_1.friendApi.SendRequest({
|
|
111
117
|
"Opcode": 2,
|
|
112
118
|
"Scene": 0,
|
package/dist/core/Message.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { MessageEntity } from "../entities/MessageEntity";
|
|
|
2
2
|
import { Contact } from "./Contact";
|
|
3
3
|
import { Room } from "./Room";
|
|
4
4
|
import { FileBox } from 'file-box';
|
|
5
|
+
import * as Axios from 'axios';
|
|
5
6
|
/**
|
|
6
7
|
* Message class for handling and interacting with messages in cache.
|
|
7
8
|
*/
|
|
@@ -66,7 +67,7 @@ export declare class Message {
|
|
|
66
67
|
* Get the room from the message. Returns null if not in a room.
|
|
67
68
|
*/
|
|
68
69
|
room(): Promise<Room | null>;
|
|
69
|
-
static revoke(obj: any): Promise<Axios.
|
|
70
|
+
static revoke(obj: any): Promise<Axios.AxiosResponse<import("../types/ApiResponse").ApiResponse, any>>;
|
|
70
71
|
static forwardTo(text: any, to: any, type: any): void;
|
|
71
72
|
/**
|
|
72
73
|
* Get the text content of the message.
|
|
@@ -78,8 +79,8 @@ export declare class Message {
|
|
|
78
79
|
* Reply a text, media file, or contact message to the sender.
|
|
79
80
|
* Returns the message which the bot sent (only puppet-padplus supported).
|
|
80
81
|
*/
|
|
81
|
-
say(text: string): Promise<Axios.
|
|
82
|
-
quoteSay(text: string, replyMsgId: string, fromId: string, content: string): Promise<ResponseMsg>;
|
|
82
|
+
say(text: string): Promise<Axios.AxiosResponse<import("../types/ApiResponse").ApiResponse, any> | ResponseMsg | null | undefined>;
|
|
83
|
+
quoteSay(text: string, replyMsgId: string, fromId: string, content: string): Promise<ResponseMsg | null>;
|
|
83
84
|
/**
|
|
84
85
|
* Get the type from the message.
|
|
85
86
|
*/
|
package/dist/core/Message.js
CHANGED
|
@@ -47,7 +47,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.ResponseMsg = exports.Message = void 0;
|
|
49
49
|
const message_service_1 = require("../services/message.service");
|
|
50
|
-
const MessageType_1 = require("../
|
|
50
|
+
const MessageType_1 = require("../types/MessageType");
|
|
51
51
|
const Contact_1 = require("./Contact");
|
|
52
52
|
const Room_1 = require("./Room");
|
|
53
53
|
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
@@ -138,6 +138,8 @@ class Message {
|
|
|
138
138
|
return new Contact_1.Contact(contact);
|
|
139
139
|
}
|
|
140
140
|
const config = yield config_service_1.configService.get();
|
|
141
|
+
if (!config)
|
|
142
|
+
return null;
|
|
141
143
|
const groupMember = yield GroupApi_1.groupApi.GetChatRoomMemberDetail({
|
|
142
144
|
"QID": this.msg.RoomId,
|
|
143
145
|
"Wxid": config === null || config === void 0 ? void 0 : config.wxid
|
package/dist/core/Room.d.ts
CHANGED
|
@@ -43,8 +43,8 @@ export declare class Room {
|
|
|
43
43
|
* Send text, media file, contact card, or text with mention @mention contact inside Room.
|
|
44
44
|
* Returns the message which the bot sent (only puppet-padplus supported).
|
|
45
45
|
*/
|
|
46
|
-
say(content: any, ats: string | Contact | Contact[] | null): Promise<
|
|
47
|
-
quoteSay(text: string, replyMsgId: string, fromId: string, content: string): Promise<import("./Message").ResponseMsg>;
|
|
46
|
+
say(content: any, ats: string | Contact | Contact[] | null): Promise<import("axios").AxiosResponse<import("../types/ApiResponse").ApiResponse, any> | import("./Message").ResponseMsg | null | undefined>;
|
|
47
|
+
quoteSay(text: string, replyMsgId: string, fromId: string, content: string): Promise<import("./Message").ResponseMsg | null>;
|
|
48
48
|
/**
|
|
49
49
|
* Add contact in a room
|
|
50
50
|
*/
|
package/dist/core/Room.js
CHANGED
|
@@ -58,6 +58,8 @@ class Room {
|
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
59
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
60
60
|
const config = yield config_service_1.configService.get();
|
|
61
|
+
if (!config)
|
|
62
|
+
return null;
|
|
61
63
|
const resp = yield GroupApi_1.groupApi.GetChatRoomInfo({
|
|
62
64
|
"QID": chatroomId,
|
|
63
65
|
"Wxid": config === null || config === void 0 ? void 0 : config.wxid
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare class WxBot extends EventEmitter {
|
|
|
26
26
|
constructor({ baseUrl, databasePath, deviceType }: WxBotOptions);
|
|
27
27
|
qrcode(style?: number): Promise<{
|
|
28
28
|
qrCode: any;
|
|
29
|
-
}>;
|
|
29
|
+
} | null>;
|
|
30
30
|
private fetchAndShowQRCode;
|
|
31
31
|
private setupHeartbeat;
|
|
32
32
|
private checkLoginStatus;
|