@juzi/wechaty 1.0.70 → 1.0.72
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/cjs/src/package-json.js +4 -4
- package/dist/cjs/src/user-modules/call.d.ts +2 -2
- package/dist/cjs/src/user-modules/call.d.ts.map +1 -1
- package/dist/cjs/src/user-modules/call.js +6 -4
- package/dist/cjs/src/user-modules/call.js.map +1 -1
- package/dist/cjs/src/user-modules/chat-history.d.ts +39 -0
- package/dist/cjs/src/user-modules/chat-history.d.ts.map +1 -0
- package/dist/cjs/src/user-modules/chat-history.js +91 -0
- package/dist/cjs/src/user-modules/chat-history.js.map +1 -0
- package/dist/cjs/src/user-modules/message.d.ts +2 -0
- package/dist/cjs/src/user-modules/message.d.ts.map +1 -1
- package/dist/cjs/src/user-modules/message.js +11 -0
- package/dist/cjs/src/user-modules/message.js.map +1 -1
- package/dist/cjs/src/user-modules/mod.d.ts +4 -3
- package/dist/cjs/src/user-modules/mod.d.ts.map +1 -1
- package/dist/cjs/src/user-modules/mod.js +3 -1
- package/dist/cjs/src/user-modules/mod.js.map +1 -1
- package/dist/cjs/src/wechaty/wechaty-base.d.ts +10 -115
- package/dist/cjs/src/wechaty/wechaty-base.d.ts.map +1 -1
- package/dist/cjs/src/wechaty/wechaty-impl.spec.js +3 -1
- package/dist/cjs/src/wechaty/wechaty-impl.spec.js.map +1 -1
- package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts +6 -12
- package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
- package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts +6 -0
- package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
- package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts +8 -0
- package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
- package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts +4 -0
- package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
- package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +4 -2
- package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
- package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js +3 -0
- package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
- package/dist/esm/src/package-json.js +4 -4
- package/dist/esm/src/user-modules/call.d.ts +2 -2
- package/dist/esm/src/user-modules/call.d.ts.map +1 -1
- package/dist/esm/src/user-modules/call.js +6 -4
- package/dist/esm/src/user-modules/call.js.map +1 -1
- package/dist/esm/src/user-modules/chat-history.d.ts +39 -0
- package/dist/esm/src/user-modules/chat-history.d.ts.map +1 -0
- package/dist/esm/src/user-modules/chat-history.js +65 -0
- package/dist/esm/src/user-modules/chat-history.js.map +1 -0
- package/dist/esm/src/user-modules/message.d.ts +2 -0
- package/dist/esm/src/user-modules/message.d.ts.map +1 -1
- package/dist/esm/src/user-modules/message.js +11 -0
- package/dist/esm/src/user-modules/message.js.map +1 -1
- package/dist/esm/src/user-modules/mod.d.ts +4 -3
- package/dist/esm/src/user-modules/mod.d.ts.map +1 -1
- package/dist/esm/src/user-modules/mod.js +2 -1
- package/dist/esm/src/user-modules/mod.js.map +1 -1
- package/dist/esm/src/wechaty/wechaty-base.d.ts +10 -115
- package/dist/esm/src/wechaty/wechaty-base.d.ts.map +1 -1
- package/dist/esm/src/wechaty/wechaty-impl.spec.js +3 -1
- package/dist/esm/src/wechaty/wechaty-impl.spec.js.map +1 -1
- package/dist/esm/src/wechaty-mixins/login-mixin.d.ts +6 -12
- package/dist/esm/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
- package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts +6 -0
- package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
- package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts +8 -0
- package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
- package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts +4 -0
- package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
- package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +4 -2
- package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
- package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js +4 -1
- package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
- package/package.json +3 -3
- package/src/package-json.ts +4 -4
- package/src/user-modules/call.ts +7 -4
- package/src/user-modules/chat-history.ts +99 -0
- package/src/user-modules/message.ts +16 -0
- package/src/user-modules/mod.ts +8 -0
- package/src/wechaty/wechaty-impl.spec.ts +3 -0
- package/src/wechaty-mixins/wechatify-user-module-mixin.ts +7 -1
package/src/user-modules/mod.ts
CHANGED
|
@@ -112,6 +112,11 @@ import {
|
|
|
112
112
|
CallRecordInterface,
|
|
113
113
|
CallRecordConstructor,
|
|
114
114
|
} from './call.js'
|
|
115
|
+
import {
|
|
116
|
+
ChatHistoryImpl,
|
|
117
|
+
ChatHistoryInterface,
|
|
118
|
+
ChatHistoryConstructor,
|
|
119
|
+
} from './chat-history.js'
|
|
115
120
|
|
|
116
121
|
import { wechatifyUserModule } from '../user-mixins/wechatify.js'
|
|
117
122
|
|
|
@@ -135,6 +140,7 @@ export type {
|
|
|
135
140
|
UrlLinkInterface,
|
|
136
141
|
ChannelInterface,
|
|
137
142
|
CallRecordInterface,
|
|
143
|
+
ChatHistoryInterface,
|
|
138
144
|
}
|
|
139
145
|
|
|
140
146
|
export type {
|
|
@@ -157,6 +163,7 @@ export type {
|
|
|
157
163
|
UrlLinkConstructor,
|
|
158
164
|
ChannelConstructor,
|
|
159
165
|
CallRecordConstructor,
|
|
166
|
+
ChatHistoryConstructor,
|
|
160
167
|
}
|
|
161
168
|
|
|
162
169
|
export {
|
|
@@ -181,4 +188,5 @@ export {
|
|
|
181
188
|
UrlLinkImpl,
|
|
182
189
|
ChannelImpl,
|
|
183
190
|
CallRecordImpl,
|
|
191
|
+
ChatHistoryImpl,
|
|
184
192
|
}
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
ChannelConstructor,
|
|
24
24
|
MomentConstructor,
|
|
25
25
|
CallRecordConstructor,
|
|
26
|
+
ChatHistoryConstructor,
|
|
26
27
|
} from '../user-modules/mod.js'
|
|
27
28
|
|
|
28
29
|
import {
|
|
@@ -53,6 +54,7 @@ test('Wechaty interface', async t => {
|
|
|
53
54
|
Channel : ChannelConstructor
|
|
54
55
|
Moment : MomentConstructor
|
|
55
56
|
CallRecord : CallRecordConstructor
|
|
57
|
+
ChatHistory : ChatHistoryConstructor
|
|
56
58
|
|
|
57
59
|
constructor () {
|
|
58
60
|
super()
|
|
@@ -74,6 +76,7 @@ test('Wechaty interface', async t => {
|
|
|
74
76
|
= this.Channel
|
|
75
77
|
= this.Moment
|
|
76
78
|
= this.CallRecord
|
|
79
|
+
= this.ChatHistory
|
|
77
80
|
= {} as any
|
|
78
81
|
}
|
|
79
82
|
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
ChannelImpl,
|
|
19
19
|
MomentImpl,
|
|
20
20
|
CallRecordImpl,
|
|
21
|
+
ChatHistoryImpl,
|
|
21
22
|
|
|
22
23
|
ContactConstructor,
|
|
23
24
|
ContactSelfConstructor,
|
|
@@ -36,6 +37,7 @@ import {
|
|
|
36
37
|
ChannelConstructor,
|
|
37
38
|
MomentConstructor,
|
|
38
39
|
CallRecordConstructor,
|
|
40
|
+
ChatHistoryConstructor,
|
|
39
41
|
|
|
40
42
|
wechatifyUserModule,
|
|
41
43
|
} from '../user-modules/mod.js'
|
|
@@ -71,6 +73,7 @@ const wechatifyUserModuleMixin = <MixinBase extends typeof WechatySkeleton> (mix
|
|
|
71
73
|
__wechatifiedChannel? : ChannelConstructor
|
|
72
74
|
__wechatifiedMoment? : MomentConstructor
|
|
73
75
|
__wechatifiedCallRecord? : CallRecordConstructor
|
|
76
|
+
__wechatifiedChatHistory? : ChatHistoryConstructor
|
|
74
77
|
|
|
75
78
|
get Contact () : ContactConstructor { return guardWechatify(this.__wechatifiedContact) }
|
|
76
79
|
get ContactSelf () : ContactSelfConstructor { return guardWechatify(this.__wechatifiedContactSelf) }
|
|
@@ -88,7 +91,8 @@ const wechatifyUserModuleMixin = <MixinBase extends typeof WechatySkeleton> (mix
|
|
|
88
91
|
get UrlLink () : UrlLinkConstructor { return guardWechatify(this.__wechatifiedUrlLink) }
|
|
89
92
|
get Channel () : ChannelConstructor { return guardWechatify(this.__wechatifiedChannel) }
|
|
90
93
|
get Moment () : MomentConstructor { return guardWechatify(this.__wechatifiedMoment) }
|
|
91
|
-
get CallRecord () : CallRecordConstructor { return guardWechatify(this.__wechatifiedCallRecord)
|
|
94
|
+
get CallRecord () : CallRecordConstructor { return guardWechatify(this.__wechatifiedCallRecord) }
|
|
95
|
+
get ChatHistory () : ChatHistoryConstructor { return guardWechatify(this.__wechatifiedChatHistory) }
|
|
92
96
|
|
|
93
97
|
override async init (): Promise<void> {
|
|
94
98
|
log.verbose('WechatifyUserModuleMixin', 'init()')
|
|
@@ -127,6 +131,7 @@ const wechatifyUserModuleMixin = <MixinBase extends typeof WechatySkeleton> (mix
|
|
|
127
131
|
this.__wechatifiedChannel = wechatifyUserModule(ChannelImpl)(this as any)
|
|
128
132
|
this.__wechatifiedMoment = wechatifyUserModule(MomentImpl)(this as any)
|
|
129
133
|
this.__wechatifiedCallRecord = wechatifyUserModule(CallRecordImpl)(this as any)
|
|
134
|
+
this.__wechatifiedChatHistory = wechatifyUserModule(ChatHistoryImpl)(this as any)
|
|
130
135
|
|
|
131
136
|
log.verbose('WechatifyUserModuleMixin', 'init() initializing Wechaty User Module (WUM) ... done')
|
|
132
137
|
}
|
|
@@ -165,6 +170,7 @@ type ProtectedPropertyWechatifyUserModuleMixin =
|
|
|
165
170
|
| '__wechatifiedChannel'
|
|
166
171
|
| '__wechatifiedMoment'
|
|
167
172
|
| '__wechatifiedCallRecord'
|
|
173
|
+
| '__wechatifiedChatHistory'
|
|
168
174
|
|
|
169
175
|
export type {
|
|
170
176
|
WechatifyUserModuleMixin,
|