@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.
Files changed (74) hide show
  1. package/dist/cjs/src/package-json.js +4 -4
  2. package/dist/cjs/src/user-modules/call.d.ts +2 -2
  3. package/dist/cjs/src/user-modules/call.d.ts.map +1 -1
  4. package/dist/cjs/src/user-modules/call.js +6 -4
  5. package/dist/cjs/src/user-modules/call.js.map +1 -1
  6. package/dist/cjs/src/user-modules/chat-history.d.ts +39 -0
  7. package/dist/cjs/src/user-modules/chat-history.d.ts.map +1 -0
  8. package/dist/cjs/src/user-modules/chat-history.js +91 -0
  9. package/dist/cjs/src/user-modules/chat-history.js.map +1 -0
  10. package/dist/cjs/src/user-modules/message.d.ts +2 -0
  11. package/dist/cjs/src/user-modules/message.d.ts.map +1 -1
  12. package/dist/cjs/src/user-modules/message.js +11 -0
  13. package/dist/cjs/src/user-modules/message.js.map +1 -1
  14. package/dist/cjs/src/user-modules/mod.d.ts +4 -3
  15. package/dist/cjs/src/user-modules/mod.d.ts.map +1 -1
  16. package/dist/cjs/src/user-modules/mod.js +3 -1
  17. package/dist/cjs/src/user-modules/mod.js.map +1 -1
  18. package/dist/cjs/src/wechaty/wechaty-base.d.ts +10 -115
  19. package/dist/cjs/src/wechaty/wechaty-base.d.ts.map +1 -1
  20. package/dist/cjs/src/wechaty/wechaty-impl.spec.js +3 -1
  21. package/dist/cjs/src/wechaty/wechaty-impl.spec.js.map +1 -1
  22. package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts +6 -12
  23. package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
  24. package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts +6 -0
  25. package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
  26. package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts +8 -0
  27. package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
  28. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts +4 -0
  29. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  30. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +4 -2
  31. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
  32. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js +3 -0
  33. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
  34. package/dist/esm/src/package-json.js +4 -4
  35. package/dist/esm/src/user-modules/call.d.ts +2 -2
  36. package/dist/esm/src/user-modules/call.d.ts.map +1 -1
  37. package/dist/esm/src/user-modules/call.js +6 -4
  38. package/dist/esm/src/user-modules/call.js.map +1 -1
  39. package/dist/esm/src/user-modules/chat-history.d.ts +39 -0
  40. package/dist/esm/src/user-modules/chat-history.d.ts.map +1 -0
  41. package/dist/esm/src/user-modules/chat-history.js +65 -0
  42. package/dist/esm/src/user-modules/chat-history.js.map +1 -0
  43. package/dist/esm/src/user-modules/message.d.ts +2 -0
  44. package/dist/esm/src/user-modules/message.d.ts.map +1 -1
  45. package/dist/esm/src/user-modules/message.js +11 -0
  46. package/dist/esm/src/user-modules/message.js.map +1 -1
  47. package/dist/esm/src/user-modules/mod.d.ts +4 -3
  48. package/dist/esm/src/user-modules/mod.d.ts.map +1 -1
  49. package/dist/esm/src/user-modules/mod.js +2 -1
  50. package/dist/esm/src/user-modules/mod.js.map +1 -1
  51. package/dist/esm/src/wechaty/wechaty-base.d.ts +10 -115
  52. package/dist/esm/src/wechaty/wechaty-base.d.ts.map +1 -1
  53. package/dist/esm/src/wechaty/wechaty-impl.spec.js +3 -1
  54. package/dist/esm/src/wechaty/wechaty-impl.spec.js.map +1 -1
  55. package/dist/esm/src/wechaty-mixins/login-mixin.d.ts +6 -12
  56. package/dist/esm/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
  57. package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts +6 -0
  58. package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
  59. package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts +8 -0
  60. package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
  61. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts +4 -0
  62. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  63. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +4 -2
  64. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
  65. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js +4 -1
  66. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
  67. package/package.json +3 -3
  68. package/src/package-json.ts +4 -4
  69. package/src/user-modules/call.ts +7 -4
  70. package/src/user-modules/chat-history.ts +99 -0
  71. package/src/user-modules/message.ts +16 -0
  72. package/src/user-modules/mod.ts +8 -0
  73. package/src/wechaty/wechaty-impl.spec.ts +3 -0
  74. package/src/wechaty-mixins/wechatify-user-module-mixin.ts +7 -1
@@ -1 +1 @@
1
- {"version":3,"file":"wechaty-base.d.ts","sourceRoot":"","sources":["../../../../src/wechaty/wechaty-base.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAA;AAQ9C,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACR,MAAkC,mBAAmB,CAAA;AAWtD,OAAO,EACL,eAAe,EAChB,MAAkC,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EACV,gBAAgB,EACjB,MAAkC,mBAAmB,CAAA;AACtD,OAAO,KAAK,EACV,cAAc,EACf,MAAkC,+BAA+B,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE5D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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M,EACV,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAMV,gBAAgB,CACpB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC;IAMV,aAAa,IAChB,OAAO,CAAC,IAAI,CAAC;CAUjB;AAED,aAAK,4BAA4B,GAE7B,oBAAoB,GACpB,gCAAgC,GAChC,SAAS,GACT,SAAS,GACT,QAAQ,CAAA;AAEZ,YAAY,EACV,4BAA4B,GAC7B,CAAA;AACD,OAAO,EACL,WAAW,GACZ,CAAA"}
@@ -24,6 +24,7 @@ test('Wechaty interface', async (t) => {
24
24
  Channel;
25
25
  Moment;
26
26
  CallRecord;
27
+ ChatHistory;
27
28
  constructor() {
28
29
  super();
29
30
  // this.puppet
@@ -44,7 +45,8 @@ test('Wechaty interface', async (t) => {
44
45
  = this.Channel
45
46
  = this.Moment
46
47
  = this.CallRecord
47
- = {};
48
+ = this.ChatHistory
49
+ = {};
48
50
  }
49
51
  }
50
52
  const WechatyTest = WechatyImplementation;
@@ -1 +1 @@
1
- {"version":3,"file":"wechaty-impl.spec.js","sourceRoot":"","sources":["../../../../src/wechaty/wechaty-impl.spec.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,UAAU,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAuBlE,OAAO,EAIL,WAAW;AACX,sBAAsB;EACvB,MAA4B,mBAAmB,CAAA;AAEhD,IAAI,CAAC,mBAAmB,EAAE,KAAK,EAAC,CAAC,EAAC,EAAE;IAClC,MAAe,qBAAsB,SAAQ,mBAAmB;QAE9D,OAAO,CAA4B;QACnC,WAAW,CAA4B;QACvC,KAAK,CAA4B;QACjC,UAAU,CAA4B;QACtC,KAAK,CAA4B;QACjC,QAAQ,CAA4B;QACpC,OAAO,CAA4B;QACnC,WAAW,CAA4B;QACvC,IAAI,CAA4B;QAChC,IAAI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AE,MAAM,EAAE,CAAC,CAAA;IAC3C,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,sDAAsD,CAAC,CAAA;IAEtF,MAAM,OAAO,CAAC,IAAI,EAAE,CAAA;IACpB,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,yDAAyD,CAAC,CAAA;IAC/F,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,4DAA4D,CAAC,CAAA;AACpF,CAAC,CAAC,CAAA"}
@@ -28,13 +28,10 @@ declare const loginMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
28
28
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
29
29
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
30
30
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
31
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
31
32
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
32
33
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
33
34
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
34
- /**
35
- * Will be removed after Dec 31, 2022
36
- * @deprecated use {@link Wechaty#currentUser} instead
37
- */
38
35
  readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
39
36
  readonly Image: import("../user-modules/image.js").ImageConstructor;
40
37
  readonly Location: import("../user-modules/location.js").LocationConstructor;
@@ -49,6 +46,7 @@ declare const loginMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
49
46
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
50
47
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
51
48
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
49
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
52
50
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
53
51
  readonly id: string;
54
52
  __memory?: import("memory-card").MemoryCard | undefined;
@@ -95,13 +93,10 @@ declare const loginMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
95
93
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
96
94
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
97
95
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
96
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
98
97
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
99
98
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
100
99
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
101
- /**
102
- * Will be removed after Dec 31, 2022
103
- * @deprecated use {@link Wechaty#currentUser} instead
104
- */
105
100
  readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
106
101
  readonly Image: import("../user-modules/image.js").ImageConstructor;
107
102
  readonly Location: import("../user-modules/location.js").LocationConstructor;
@@ -116,6 +111,7 @@ declare const loginMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
116
111
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
117
112
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
118
113
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
114
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
119
115
  init(): Promise<void>;
120
116
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
121
117
  readonly id: string;
@@ -292,13 +288,10 @@ declare const loginMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
292
288
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
293
289
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
294
290
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
291
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
295
292
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
296
293
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
297
294
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
298
- /**
299
- * Will be removed after Dec 31, 2022
300
- * @deprecated use {@link Wechaty#currentUser} instead
301
- */
302
295
  readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
303
296
  readonly Image: import("../user-modules/image.js").ImageConstructor;
304
297
  readonly Location: import("../user-modules/location.js").LocationConstructor;
@@ -313,6 +306,7 @@ declare const loginMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
313
306
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
314
307
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
315
308
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
309
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
316
310
  wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync;
317
311
  emitError(e: any): void;
318
312
  __io?: import("../io.js").Io | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"login-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/login-mixin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,oBAAoB,EACrB,MAAoC,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAKxD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmFZ;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAHH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAtCmB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;;;;;;cAWN,CAAA;AAED,aAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA;AAE/C,aAAK,2BAA2B,GAC5B,UAAU,GACV,UAAU,GACV,oBAAoB,CAAA;AAExB,YAAY,EACV,UAAU,EACV,2BAA2B,GAC5B,CAAA;AACD,OAAO,EACL,UAAU,GACX,CAAA"}
@@ -27,6 +27,7 @@ declare const miscMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
27
27
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
28
28
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
29
29
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
30
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
30
31
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
31
32
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
32
33
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -44,6 +45,7 @@ declare const miscMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
44
45
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
45
46
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
46
47
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
48
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
47
49
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
48
50
  readonly id: string;
49
51
  __memory?: import("memory-card").MemoryCard | undefined;
@@ -92,6 +94,7 @@ declare const miscMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
92
94
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
93
95
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
94
96
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
97
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
95
98
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
96
99
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
97
100
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -109,6 +112,7 @@ declare const miscMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
109
112
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
110
113
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
111
114
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
115
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
112
116
  init(): Promise<void>;
113
117
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
114
118
  readonly id: string;
@@ -280,6 +284,7 @@ declare const miscMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
280
284
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
281
285
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
282
286
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
287
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
283
288
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
284
289
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
285
290
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -297,6 +302,7 @@ declare const miscMixin: <MixinBase extends typeof WechatySkeleton & ((abstract
297
302
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
298
303
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
299
304
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
305
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
300
306
  wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync;
301
307
  emitError(e: any): void;
302
308
  __io?: import("../io.js").Io | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"misc-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/misc-mixin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAQ,mBAAmB,CAAA;AAK1D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAuDX;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAFH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAFH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAFH;;OAEG;;;;;;sDApDmB,GAAG,EAAE;IAI3B;;OAEG;;IAcH;;;OAGG;;IAKH;;;;;;;;OAQG;eACS,MAAM;IAIlB;;OAEG;wBACwB,MAAM,GAAG,QAAQ,IAAI,CAAC;IAMjD;;OAEG;gBACU,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;gDAH1B;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAcN,CAAA;AAED,aAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAA;AAE7C,aAAK,0BAA0B,GAAG,KAAK,CAAA;AAEvC,YAAY,EACV,SAAS,EACT,0BAA0B,GAC3B,CAAA;AACD,OAAO,EACL,SAAS,GACV,CAAA"}
1
+ {"version":3,"file":"misc-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/misc-mixin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAQ,mBAAmB,CAAA;AAK1D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAuDX;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAFH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAFH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAFH;;OAEG;;;;;;sDApDmB,GAAG,EAAE;IAI3B;;OAEG;;IAcH;;;OAGG;;IAKH;;;;;;;;OAQG;eACS,MAAM;IAIlB;;OAEG;wBACwB,MAAM,GAAG,QAAQ,IAAI,CAAC;IAMjD;;OAEG;gBACU,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;gDAH1B;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAcN,CAAA;AAED,aAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAA;AAE7C,aAAK,0BAA0B,GAAG,KAAK,CAAA;AAEvC,YAAY,EACV,SAAS,EACT,0BAA0B,GAC3B,CAAA;AACD,OAAO,EACL,SAAS,GACV,CAAA"}
@@ -105,6 +105,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
105
105
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
106
106
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
107
107
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
108
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
108
109
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
109
110
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
110
111
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -122,6 +123,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
122
123
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
123
124
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
124
125
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
126
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
125
127
  wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync;
126
128
  emitError(e: any): void;
127
129
  __io?: import("../io.js").Io | undefined;
@@ -157,6 +159,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
157
159
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
158
160
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
159
161
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
162
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
160
163
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
161
164
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
162
165
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -174,6 +177,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
174
177
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
175
178
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
176
179
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
180
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
177
181
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
178
182
  readonly id: string;
179
183
  __memory?: import("memory-card").MemoryCard | undefined;
@@ -220,6 +224,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
220
224
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
221
225
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
222
226
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
227
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
223
228
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
224
229
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
225
230
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -237,6 +242,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
237
242
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
238
243
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
239
244
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
245
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
240
246
  init(): Promise<void>;
241
247
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
242
248
  readonly id: string;
@@ -390,6 +396,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
390
396
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
391
397
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
392
398
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
399
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
393
400
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
394
401
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
395
402
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -407,6 +414,7 @@ declare const pluginMixin: <MixinBase extends typeof WechatySkeleton & ((abstrac
407
414
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
408
415
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
409
416
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
417
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
410
418
  __io?: import("../io.js").Io | undefined;
411
419
  readonly io: import("../io.js").Io;
412
420
  __ioToken?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/plugin-mixin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACzB,MAAkC,cAAc,CAAA;AAKjD,OAAO,KAAK,EACV,eAAe,EAChB,MAA4B,mBAAmB,CAAA;AAKhD,UAAU,QAAQ;IAChB,GAAG,CACD,GAAG,OAAO,EAAE,CACR,aAAa,GACb,aAAa,EAAE,CAClB,EAAE,GACF,wBAAwB,CAAA;CAC5B;AAED,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASb;;;;;;;;;;;;;;;;;;OAkBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAtBmB,GAAG,EAAE;IAI3B;;;;;;;;;;;;;;;;;;OAkBG;oBAEW,CACV,aAAa,GAAG,aAAa,EAAE,CAChC,EAAE,GACF,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAvB3B;;;;;;;;;;;;;;;;;;OAkBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCN,CAAA;AAED,aAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAEjD,aAAK,4BAA4B,GAAG,KAAK,CAAA;AAEzC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,4BAA4B,EACjC,WAAW,GACZ,CAAA"}
1
+ {"version":3,"file":"plugin-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/plugin-mixin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACzB,MAAkC,cAAc,CAAA;AAKjD,OAAO,KAAK,EACV,eAAe,EAChB,MAA4B,mBAAmB,CAAA;AAKhD,UAAU,QAAQ;IAChB,GAAG,CACD,GAAG,OAAO,EAAE,CACR,aAAa,GACb,aAAa,EAAE,CAClB,EAAE,GACF,wBAAwB,CAAA;CAC5B;AAED,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASb;;;;;;;;;;;;;;;;;;OAkBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAtBmB,GAAG,EAAE;IAI3B;;;;;;;;;;;;;;;;;;OAkBG;oBAEW,CACV,aAAa,GAAG,aAAa,EAAE,CAChC,EAAE,GACF,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAvB3B;;;;;;;;;;;;;;;;;;OAkBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCN,CAAA;AAED,aAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAEjD,aAAK,4BAA4B,GAAG,KAAK,CAAA;AAEzC,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,4BAA4B,EACjC,WAAW,GACZ,CAAA"}
@@ -26,6 +26,7 @@ declare const puppetMixin: <MixinBase extends ((abstract new (...args: any[]) =>
26
26
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
27
27
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
28
28
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
29
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
29
30
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
30
31
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
31
32
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -43,6 +44,7 @@ declare const puppetMixin: <MixinBase extends ((abstract new (...args: any[]) =>
43
44
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
44
45
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
45
46
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
47
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
46
48
  init(): Promise<void>;
47
49
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
48
50
  readonly id: string;
@@ -158,6 +160,7 @@ declare const puppetMixin: <MixinBase extends ((abstract new (...args: any[]) =>
158
160
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
159
161
  __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined;
160
162
  __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined;
163
+ __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined;
161
164
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
162
165
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
163
166
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
@@ -175,6 +178,7 @@ declare const puppetMixin: <MixinBase extends ((abstract new (...args: any[]) =>
175
178
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
176
179
  readonly Moment: import("../user-modules/moment.js").MomentConstructor;
177
180
  readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor;
181
+ readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor;
178
182
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
179
183
  readonly id: string;
180
184
  __memory?: import("memory-card").MemoryCard | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"puppet-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/puppet-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAW,sBAAsB,CAAA;AAQnD,OAAO,EAEL,gBAAgB,EAChB,oBAAoB,EACrB,MAAO,cAAc,CAAA;AAuBtB;;;;;;;GAOG;AACH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAqBS,GAAG,EAAE;;;2BANH,oBAAoB;sBAE1B,gBAAgB;;aAmBT,QAAQ,IAAI,CAAC;YA+Cd,QAAQ,IAAI,CAAC;aAuBrB,QAAQ,IAAI,CAAC;YAML,QAAQ,IAAI,CAAC;gCA8CR,OAAO,KAAK,CAAC,eAAe,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwlBnE,CAAA;AAED,aAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAEjD,aAAK,4BAA4B,GAC7B,UAAU,GACV,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAA;AAEtB,YAAY,EACV,WAAW,EACX,4BAA4B,GAC7B,CAAA;AACD,OAAO,EACL,WAAW,GACZ,CAAA"}
1
+ {"version":3,"file":"puppet-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/puppet-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAW,sBAAsB,CAAA;AAQnD,OAAO,EAEL,gBAAgB,EAChB,oBAAoB,EACrB,MAAO,cAAc,CAAA;AAuBtB;;;;;;;GAOG;AACH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAqBS,GAAG,EAAE;;;2BANH,oBAAoB;sBAE1B,gBAAgB;;aAmBT,QAAQ,IAAI,CAAC;YA+Cd,QAAQ,IAAI,CAAC;aAuBrB,QAAQ,IAAI,CAAC;YAML,QAAQ,IAAI,CAAC;gCA8CR,OAAO,KAAK,CAAC,eAAe,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwlBnE,CAAA;AAED,aAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAA;AAEjD,aAAK,4BAA4B,GAC7B,UAAU,GACV,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAA;AAEtB,YAAY,EACV,WAAW,EACX,4BAA4B,GAC7B,CAAA;AACD,OAAO,EACL,WAAW,GACZ,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ContactConstructor, ContactSelfConstructor, DelayConstructor, FriendshipConstructor, ImageConstructor, LocationConstructor, MessageConstructor, MiniProgramConstructor, PostConstructor, RoomConstructor, RoomInvitationConstructor, TagConstructor, TagGroupConstructor, UrlLinkConstructor, ChannelConstructor, MomentConstructor, CallRecordConstructor } from '../user-modules/mod.js';
1
+ import { ContactConstructor, ContactSelfConstructor, DelayConstructor, FriendshipConstructor, ImageConstructor, LocationConstructor, MessageConstructor, MiniProgramConstructor, PostConstructor, RoomConstructor, RoomInvitationConstructor, TagConstructor, TagGroupConstructor, UrlLinkConstructor, ChannelConstructor, MomentConstructor, CallRecordConstructor, ChatHistoryConstructor } from '../user-modules/mod.js';
2
2
  import type { WechatySkeleton } from '../wechaty/mod.js';
3
3
  declare const wechatifyUserModuleMixin: <MixinBase extends typeof WechatySkeleton>(mixinBase: MixinBase) => ((abstract new (...args: any[]) => {
4
4
  __wechatifiedContact?: ContactConstructor | undefined;
@@ -18,6 +18,7 @@ declare const wechatifyUserModuleMixin: <MixinBase extends typeof WechatySkeleto
18
18
  __wechatifiedChannel?: ChannelConstructor | undefined;
19
19
  __wechatifiedMoment?: MomentConstructor | undefined;
20
20
  __wechatifiedCallRecord?: CallRecordConstructor | undefined;
21
+ __wechatifiedChatHistory?: ChatHistoryConstructor | undefined;
21
22
  readonly Contact: ContactConstructor;
22
23
  readonly ContactSelf: ContactSelfConstructor;
23
24
  readonly Delay: DelayConstructor;
@@ -35,6 +36,7 @@ declare const wechatifyUserModuleMixin: <MixinBase extends typeof WechatySkeleto
35
36
  readonly Channel: ChannelConstructor;
36
37
  readonly Moment: MomentConstructor;
37
38
  readonly CallRecord: CallRecordConstructor;
39
+ readonly ChatHistory: ChatHistoryConstructor;
38
40
  init(): Promise<void>;
39
41
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
40
42
  readonly id: string;
@@ -63,7 +65,7 @@ declare const wechatifyUserModuleMixin: <MixinBase extends typeof WechatySkeleto
63
65
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
64
66
  }) & MixinBase;
65
67
  declare type WechatifyUserModuleMixin = ReturnType<typeof wechatifyUserModuleMixin>;
66
- declare type ProtectedPropertyWechatifyUserModuleMixin = '__wechatifiedContact' | '__wechatifiedContactSelf' | '__wechatifiedDelay' | '__wechatifiedFriendship' | '__wechatifiedImage' | '__wechatifiedLocation' | '__wechatifiedMessage' | '__wechatifiedMiniProgram' | '__wechatifiedRoom' | '__wechatifiedRoomInvitation' | '__wechatifiedTag' | '__wechatifiedTagGroup' | '__wechatifiedUrlLink' | '__wechatifiedChannel' | '__wechatifiedMoment' | '__wechatifiedCallRecord';
68
+ declare type ProtectedPropertyWechatifyUserModuleMixin = '__wechatifiedContact' | '__wechatifiedContactSelf' | '__wechatifiedDelay' | '__wechatifiedFriendship' | '__wechatifiedImage' | '__wechatifiedLocation' | '__wechatifiedMessage' | '__wechatifiedMiniProgram' | '__wechatifiedRoom' | '__wechatifiedRoomInvitation' | '__wechatifiedTag' | '__wechatifiedTagGroup' | '__wechatifiedUrlLink' | '__wechatifiedChannel' | '__wechatifiedMoment' | '__wechatifiedCallRecord' | '__wechatifiedChatHistory';
67
69
  export type { WechatifyUserModuleMixin, ProtectedPropertyWechatifyUserModuleMixin, };
68
70
  export { wechatifyUserModuleMixin, };
69
71
  //# sourceMappingURL=wechatify-user-module-mixin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wechatify-user-module-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/wechatify-user-module-mixin.ts"],"names":[],"mappings":"AAEA,OAAO,EAmBL,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,yBAAyB,EACzB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EAGtB,MAA4B,wBAAwB,CAAA;AAErD,OAAO,KAAK,EACV,eAAe,EAChB,MAAkC,mBAAmB,CAAA;AAEtD,QAAA,MAAM,wBAAwB,+FAKJ,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAyCH,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;cA4CxC,CAAA;AAYD,aAAK,wBAAwB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE3E,aAAK,yCAAyC,GAC1C,sBAAsB,GACtB,0BAA0B,GAC1B,oBAAoB,GACpB,yBAAyB,GACzB,oBAAoB,GACpB,uBAAuB,GACvB,sBAAsB,GACtB,0BAA0B,GAC1B,mBAAmB,GACnB,6BAA6B,GAC7B,kBAAkB,GAClB,uBAAuB,GACvB,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,yBAAyB,CAAA;AAE7B,YAAY,EACV,wBAAwB,EACxB,yCAAyC,GAC1C,CAAA;AACD,OAAO,EACL,wBAAwB,GACzB,CAAA"}
1
+ {"version":3,"file":"wechatify-user-module-mixin.d.ts","sourceRoot":"","sources":["../../../../src/wechaty-mixins/wechatify-user-module-mixin.ts"],"names":[],"mappings":"AAEA,OAAO,EAoBL,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,yBAAyB,EACzB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EAGvB,MAA4B,wBAAwB,CAAA;AAErD,OAAO,KAAK,EACV,eAAe,EAChB,MAAkC,mBAAmB,CAAA;AAEtD,QAAA,MAAM,wBAAwB,+FAKJ,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA2CH,QAAQ,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CxC,CAAA;AAYD,aAAK,wBAAwB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE3E,aAAK,yCAAyC,GAC1C,sBAAsB,GACtB,0BAA0B,GAC1B,oBAAoB,GACpB,yBAAyB,GACzB,oBAAoB,GACpB,uBAAuB,GACvB,sBAAsB,GACtB,0BAA0B,GAC1B,mBAAmB,GACnB,6BAA6B,GAC7B,kBAAkB,GAClB,uBAAuB,GACvB,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,yBAAyB,GACzB,0BAA0B,CAAA;AAE9B,YAAY,EACV,wBAAwB,EACxB,yCAAyC,GAC1C,CAAA;AACD,OAAO,EACL,wBAAwB,GACzB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { log } from '@juzi/wechaty-puppet';
2
- import { ContactImpl, ContactSelfImpl, DelayImpl, FriendshipImpl, ImageImpl, LocationImpl, MessageImpl, MiniProgramImpl, PostImpl, RoomImpl, RoomInvitationImpl, TagImpl, TagGroupImpl, UrlLinkImpl, ChannelImpl, MomentImpl, CallRecordImpl, wechatifyUserModule, } from '../user-modules/mod.js';
2
+ import { ContactImpl, ContactSelfImpl, DelayImpl, FriendshipImpl, ImageImpl, LocationImpl, MessageImpl, MiniProgramImpl, PostImpl, RoomImpl, RoomInvitationImpl, TagImpl, TagGroupImpl, UrlLinkImpl, ChannelImpl, MomentImpl, CallRecordImpl, ChatHistoryImpl, wechatifyUserModule, } from '../user-modules/mod.js';
3
3
  const wechatifyUserModuleMixin = (mixinBase) => {
4
4
  log.verbose('WechatifyUserModuleMixin', 'wechatifyUserModuleMixin(%s)', mixinBase.name);
5
5
  class WechatifyUserModuleMixin extends mixinBase {
@@ -24,6 +24,7 @@ const wechatifyUserModuleMixin = (mixinBase) => {
24
24
  __wechatifiedChannel;
25
25
  __wechatifiedMoment;
26
26
  __wechatifiedCallRecord;
27
+ __wechatifiedChatHistory;
27
28
  get Contact() { return guardWechatify(this.__wechatifiedContact); }
28
29
  get ContactSelf() { return guardWechatify(this.__wechatifiedContactSelf); }
29
30
  get Delay() { return guardWechatify(this.__wechatifiedDelay); }
@@ -41,6 +42,7 @@ const wechatifyUserModuleMixin = (mixinBase) => {
41
42
  get Channel() { return guardWechatify(this.__wechatifiedChannel); }
42
43
  get Moment() { return guardWechatify(this.__wechatifiedMoment); }
43
44
  get CallRecord() { return guardWechatify(this.__wechatifiedCallRecord); }
45
+ get ChatHistory() { return guardWechatify(this.__wechatifiedChatHistory); }
44
46
  async init() {
45
47
  log.verbose('WechatifyUserModuleMixin', 'init()');
46
48
  await super.init();
@@ -75,6 +77,7 @@ const wechatifyUserModuleMixin = (mixinBase) => {
75
77
  this.__wechatifiedChannel = wechatifyUserModule(ChannelImpl)(this);
76
78
  this.__wechatifiedMoment = wechatifyUserModule(MomentImpl)(this);
77
79
  this.__wechatifiedCallRecord = wechatifyUserModule(CallRecordImpl)(this);
80
+ this.__wechatifiedChatHistory = wechatifyUserModule(ChatHistoryImpl)(this);
78
81
  log.verbose('WechatifyUserModuleMixin', 'init() initializing Wechaty User Module (WUM) ... done');
79
82
  }
80
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"wechatify-user-module-mixin.js","sourceRoot":"","sources":["../../../../src/wechaty-mixins/wechatify-user-module-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAe,sBAAsB,CAAA;AAEnD,OAAO,EACL,WAAW,EACX,eAAe,EACf,SAAS,EACT,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,cAAc,EAoBd,mBAAmB,GACpB,MAA4B,wBAAwB,CAAA;AAMrD,MAAM,wBAAwB,GAAG,CAA4C,SAAoB,EAAE,EAAE;IACnG,GAAG,CAAC,OAAO,CAAC,0BAA0B,EAAE,8BAA8B,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvF,MAAe,wBAAyB,SAAQ,SAAS;QAEvD,YAAa,GAAG,IAAW;YACzB,GAAG,CAAC,OAAO,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAA;YACxD,KAAK,CAAC,GAAG,IAAI,CAAC,CAAA;QAChB,CAAC;QAED,oBAAoB,CAA6B;QACjD,wBAAwB,CAA6B;QACrD,kBAAkB,CAA6B;QAC/C,uBAAuB,CAA6B;QACpD,kBAAkB,CAA6B;QAC/C,qBAAqB,CAA6B;QAClD,oBAAoB,CAA6B;QACjD,wBAAwB,CAA6B;QACrD,iBAAiB,CAA6B;QAC9C,iBAAiB,CAA6B;QAC9C,2BAA2B,CAA6B;QACxD,gBAAgB,CAA6B;QAC7C,q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wBAAwB,GACzB,CAAA"}
1
+ {"version":3,"file":"wechatify-user-module-mixin.js","sourceRoot":"","sources":["../../../../src/wechaty-mixins/wechatify-user-module-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAe,sBAAsB,CAAA;AAEnD,OAAO,EACL,WAAW,EACX,eAAe,EACf,SAAS,EACT,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,cAAc,EACd,eAAe,EAqBf,mBAAmB,GACpB,MAA4B,wBAAwB,CAAA;AAMrD,MAAM,wBAAwB,GAAG,CAA4C,SAAoB,EAAE,EAAE;IACnG,GAAG,CAAC,OAAO,CAAC,0BAA0B,EAAE,8BAA8B,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAEvF,MAAe,wBAAyB,SAAQ,SAAS;QAEvD,YAAa,GAAG,IAAW;YACzB,GAAG,CAAC,OAAO,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAA;YACxD,KAAK,CAAC,GAAG,IAAI,CAAC,CAAA;QAChB,CAAC;QAED,oBAAoB,CAA6B;QACjD,wBAAwB,CAA6B;QACrD,kBAAkB,CAA6B;QAC/C,uBAAuB,CAA6B;QACpD,kBAAkB,CAA6B;QAC/C,qBAAqB,CAA6B;QAClD,oBAAoB,CAA6B;QACjD,wBAAwB,CAA6B;QACrD,iBAAiB,CAA6B;QAC9C,iBAAiB,CAA6B;QAC9C,2BAA2B,CAA6B;QACxD,gBAAgB,CAA6B;QAC7C,qBAAqB,CAA6B;QAClD,oBAAoB,CAA6B;QACjD,oBAAoB,CAA6B;QACjD,mBAAmB,CAA6B;QAChD,uBAAuB,CAA6B;QACpD,wBAAwB,CAA6B;QAErD,IAAI,OAAO,KAAyC,OAAO,cAAc,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA,CAAQ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B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty",
3
- "version": "1.0.70",
3
+ "version": "1.0.72",
4
4
  "description": "Wechaty is a RPA SDK for Chatbot Makers.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -109,7 +109,7 @@
109
109
  },
110
110
  "homepage": "https://github.com/wechaty/",
111
111
  "dependencies": {
112
- "@juzi/wechaty-puppet-service": "^1.0.73",
112
+ "@juzi/wechaty-puppet-service": "^1.0.75",
113
113
  "clone-class": "^1.1.1",
114
114
  "cmd-ts": "^0.10.0",
115
115
  "cockatiel": "^2.0.2",
@@ -132,7 +132,7 @@
132
132
  "@chatie/eslint-config": "^1.0.4",
133
133
  "@chatie/semver": "^0.4.7",
134
134
  "@chatie/tsconfig": "^4.6.3",
135
- "@juzi/wechaty-puppet": "^1.0.63",
135
+ "@juzi/wechaty-puppet": "^1.0.66",
136
136
  "@juzi/wechaty-puppet-mock": "^1.0.1",
137
137
  "@swc/core": "1.3.44",
138
138
  "@swc/helpers": "^0.3.6",
@@ -4,10 +4,10 @@
4
4
  */
5
5
  import type { PackageJsonWechaty } from './config'
6
6
 
7
- export const GIT_COMMIT_HASH: string = '79be2c6076f9017e4c4073517fe81e54f3a56a15'
7
+ export const GIT_COMMIT_HASH: string = 'c382d2ef5ae8ffc20be4254bdfd2914e2696773a'
8
8
  export const packageJson: PackageJsonWechaty = {
9
9
  "name": "@juzi/wechaty",
10
- "version": "1.0.70",
10
+ "version": "1.0.72",
11
11
  "description": "Wechaty is a RPA SDK for Chatbot Makers.",
12
12
  "type": "module",
13
13
  "exports": {
@@ -116,7 +116,7 @@ export const packageJson: PackageJsonWechaty = {
116
116
  },
117
117
  "homepage": "https://github.com/wechaty/",
118
118
  "dependencies": {
119
- "@juzi/wechaty-puppet-service": "^1.0.73",
119
+ "@juzi/wechaty-puppet-service": "^1.0.75",
120
120
  "clone-class": "^1.1.1",
121
121
  "cmd-ts": "^0.10.0",
122
122
  "cockatiel": "^2.0.2",
@@ -139,7 +139,7 @@ export const packageJson: PackageJsonWechaty = {
139
139
  "@chatie/eslint-config": "^1.0.4",
140
140
  "@chatie/semver": "^0.4.7",
141
141
  "@chatie/tsconfig": "^4.6.3",
142
- "@juzi/wechaty-puppet": "^1.0.63",
142
+ "@juzi/wechaty-puppet": "^1.0.66",
143
143
  "@juzi/wechaty-puppet-mock": "^1.0.1",
144
144
  "@swc/core": "1.3.44",
145
145
  "@swc/helpers": "^0.3.6",
@@ -36,19 +36,22 @@ class CallRecordMixin extends wechatifyMixinBase() {
36
36
  log.verbose('CallRecord', 'constructor()')
37
37
  }
38
38
 
39
- starter (): undefined | ContactInterface {
39
+ async starter (): Promise<undefined | ContactInterface> {
40
40
  const starterId = this.payload.starter
41
41
  if (!starterId) {
42
42
  return undefined
43
43
  }
44
- const starter = (this.wechaty.Contact as typeof ContactImpl).load(starterId)
44
+ const starter = (this.wechaty.Contact as typeof ContactImpl).find({ id: starterId })
45
45
  return starter
46
46
  }
47
47
 
48
- participants (): ContactInterface[] {
48
+ async participants (): Promise<ContactInterface[]> {
49
49
  const participantIds = this.payload.participants
50
50
 
51
- return participantIds.map((this.wechaty.Contact as typeof ContactImpl).load)
51
+ const contactPromises = participantIds.map((this.wechaty.Contact as typeof ContactImpl).find.bind(this.wechaty.Contact))
52
+ const contacts = await Promise.all(contactPromises)
53
+
54
+ return contacts.filter(item => !!item) as ContactInterface[]
52
55
  }
53
56
 
54
57
  length (): number {
@@ -0,0 +1,99 @@
1
+ import * as PUPPET from '@juzi/wechaty-puppet'
2
+
3
+ import type { Constructor } from 'clone-class'
4
+ import { log } from '../config.js'
5
+
6
+ import { validationMixin } from '../user-mixins/validation.js'
7
+
8
+ import {
9
+ wechatifyMixinBase,
10
+ } from '../user-mixins/wechatify.js'
11
+ import type { FileBoxInterface } from 'file-box'
12
+ import type { ChannelInterface } from './channel.js'
13
+ import type { ContactInterface } from './contact.js'
14
+ import type { LocationInterface } from './location.js'
15
+ import type { MiniProgramInterface } from './mini-program.js'
16
+ import type { UrlLinkInterface } from './url-link.js'
17
+ import { timestampToDate } from '../pure-functions/timestamp-to-date.js'
18
+
19
+ type ChatHistoryMessageType = string | ContactInterface | LocationInterface | MiniProgramInterface | UrlLinkInterface | ChannelInterface | ChatHistoryInterface | FileBoxInterface
20
+
21
+ class ChatHistoryMixin extends wechatifyMixinBase() {
22
+
23
+ /*
24
+ * @hideconstructor
25
+ */
26
+ constructor (
27
+ public readonly payload: PUPPET.payloads.ChatHistory,
28
+ ) {
29
+ super()
30
+ log.verbose('ChatHistory', 'constructor()')
31
+ }
32
+
33
+ avatar (): FileBoxInterface {
34
+ return this.payload.avatar
35
+ }
36
+
37
+ name (): undefined | string {
38
+ const senderName = this.payload.senderName
39
+ const corpName = this.payload.corpName
40
+ if (corpName) {
41
+ return `${senderName}@${corpName}`
42
+ }
43
+ return senderName
44
+ }
45
+
46
+ date (): Date {
47
+ const time = this.payload.time
48
+ return timestampToDate(Number(time)) // FIXME: change the type from string to number
49
+ }
50
+
51
+ async message (): Promise<ChatHistoryMessageType> {
52
+ const type = this.type()
53
+ const message = this.payload.message
54
+ switch (type) {
55
+ case PUPPET.types.Message.Text:
56
+ case PUPPET.types.Message.Contact:
57
+ return message as string
58
+ case PUPPET.types.Message.Attachment:
59
+ case PUPPET.types.Message.Audio:
60
+ case PUPPET.types.Message.Emoticon:
61
+ case PUPPET.types.Message.Image:
62
+ case PUPPET.types.Message.Video:
63
+ return message as FileBoxInterface
64
+ case PUPPET.types.Message.Url:
65
+ return new this.wechaty.UrlLink(message)
66
+ case PUPPET.types.Message.Location:
67
+ return new this.wechaty.Location(message)
68
+ case PUPPET.types.Message.MiniProgram:
69
+ return new this.wechaty.MiniProgram(message)
70
+ case PUPPET.types.Message.Channel:
71
+ return new this.wechaty.Channel(message)
72
+ case PUPPET.types.Message.ChatHistory:
73
+ return new this.wechaty.ChatHistory(message)
74
+ default:
75
+ throw new Error(`Unsupported message type of chat history: ${PUPPET.types.Message[type]}`)
76
+ }
77
+ }
78
+
79
+ type (): PUPPET.types.Message {
80
+ return this.payload.type
81
+ }
82
+
83
+ }
84
+
85
+ class ChatHistoryImpl extends validationMixin(ChatHistoryMixin)<ChatHistoryInterface>() { }
86
+ interface ChatHistoryInterface extends ChatHistoryImpl { }
87
+
88
+ type ChatHistoryConstructor = Constructor<
89
+ ChatHistoryInterface,
90
+ typeof ChatHistoryImpl
91
+ >
92
+
93
+ export type {
94
+ ChatHistoryConstructor,
95
+ ChatHistoryInterface,
96
+ }
97
+ export {
98
+ ChatHistoryImpl,
99
+ }
@@ -76,6 +76,7 @@ import { validationMixin } from '../user-mixins/validation.js'
76
76
  import type { ContactSelfImpl } from './contact-self.js'
77
77
  import { concurrencyExecuter } from 'rx-queue'
78
78
  import type { CallRecordInterface } from './call.js'
79
+ import type { ChatHistoryInterface } from './chat-history.js'
79
80
 
80
81
  const MixinBase = wechatifyMixin(
81
82
  EventEmitter,
@@ -1345,6 +1346,21 @@ class MessageMixin extends MixinBase implements SayableSayer {
1345
1346
  return new this.wechaty.CallRecord(callRecordPayload)
1346
1347
  }
1347
1348
 
1349
+ public async toChatHistory (): Promise<ChatHistoryInterface> {
1350
+ log.verbose('Message', 'toChatHistory()')
1351
+
1352
+ if (!this.payload) {
1353
+ throw new Error('no payload')
1354
+ }
1355
+
1356
+ if (this.type() !== PUPPET.types.Message.ChatHistory) {
1357
+ throw new Error('message not a ChatHistory')
1358
+ }
1359
+
1360
+ const chatHistoryPayload = await this.wechaty.puppet.messageChatHistory(this.id)
1361
+ return new this.wechaty.ChatHistory(chatHistoryPayload)
1362
+ }
1363
+
1348
1364
  async toSayable (): Promise<undefined | Sayable> {
1349
1365
  log.verbose('Message', 'toSayable()')
1350
1366
  return messageToSayable(this)