@juzi/wechaty 1.0.127 → 1.0.129

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 (43) hide show
  1. package/dist/cjs/src/package-json.js +4 -4
  2. package/dist/cjs/src/schemas/wechaty-events.d.ts +4 -1
  3. package/dist/cjs/src/schemas/wechaty-events.d.ts.map +1 -1
  4. package/dist/cjs/src/schemas/wechaty-events.js.map +1 -1
  5. package/dist/cjs/src/user-modules/room.d.ts +1 -1
  6. package/dist/cjs/src/user-modules/room.d.ts.map +1 -1
  7. package/dist/cjs/src/user-modules/room.js +1 -8
  8. package/dist/cjs/src/user-modules/room.js.map +1 -1
  9. package/dist/cjs/src/wechaty/wechaty-base.d.ts +7 -7
  10. package/dist/cjs/src/wechaty-mixins/gerror-mixin.d.ts +1 -1
  11. package/dist/cjs/src/wechaty-mixins/io-mixin.d.ts +2 -2
  12. package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts +5 -5
  13. package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts +5 -5
  14. package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts +6 -6
  15. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts +4 -4
  16. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  17. package/dist/cjs/src/wechaty-mixins/puppet-mixin.js +5 -0
  18. package/dist/cjs/src/wechaty-mixins/puppet-mixin.js.map +1 -1
  19. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +1 -1
  20. package/dist/esm/src/package-json.js +4 -4
  21. package/dist/esm/src/schemas/wechaty-events.d.ts +4 -1
  22. package/dist/esm/src/schemas/wechaty-events.d.ts.map +1 -1
  23. package/dist/esm/src/schemas/wechaty-events.js.map +1 -1
  24. package/dist/esm/src/user-modules/room.d.ts +1 -1
  25. package/dist/esm/src/user-modules/room.d.ts.map +1 -1
  26. package/dist/esm/src/user-modules/room.js +1 -8
  27. package/dist/esm/src/user-modules/room.js.map +1 -1
  28. package/dist/esm/src/wechaty/wechaty-base.d.ts +7 -7
  29. package/dist/esm/src/wechaty-mixins/gerror-mixin.d.ts +1 -1
  30. package/dist/esm/src/wechaty-mixins/io-mixin.d.ts +2 -2
  31. package/dist/esm/src/wechaty-mixins/login-mixin.d.ts +5 -5
  32. package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts +5 -5
  33. package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts +6 -6
  34. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts +4 -4
  35. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  36. package/dist/esm/src/wechaty-mixins/puppet-mixin.js +5 -0
  37. package/dist/esm/src/wechaty-mixins/puppet-mixin.js.map +1 -1
  38. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +1 -1
  39. package/package.json +3 -3
  40. package/src/package-json.ts +4 -4
  41. package/src/schemas/wechaty-events.ts +3 -0
  42. package/src/user-modules/room.ts +2 -8
  43. package/src/wechaty-mixins/puppet-mixin.ts +6 -0
@@ -4,10 +4,10 @@
4
4
  */
5
5
  import type { PackageJsonWechaty } from './config'
6
6
 
7
- export const GIT_COMMIT_HASH: string = 'c79090ac18e413b433e2ed9f569805c3a65debae'
7
+ export const GIT_COMMIT_HASH: string = '9a67fb115907cc14e6fc3cc6d2d137b91969d1d9'
8
8
  export const packageJson: PackageJsonWechaty = {
9
9
  "name": "@juzi/wechaty",
10
- "version": "1.0.127",
10
+ "version": "1.0.129",
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.112",
119
+ "@juzi/wechaty-puppet-service": "1.0.113",
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.122",
142
+ "@juzi/wechaty-puppet": "^1.0.125",
143
143
  "@juzi/wechaty-puppet-mock": "^1.0.1",
144
144
  "@swc/core": "1.3.44",
145
145
  "@swc/helpers": "^0.3.6",
@@ -70,6 +70,7 @@ type WechatyEventListenerTagGroup = (type: PUPPET.types.TagGroupEvent,
70
70
  type WechatyEventListenerPostComment = (comment: PostInterface, post: PostInterface) => void | Promise<void>
71
71
  type WechatyEventListenerPostTap = (post: PostInterface, contact: ContactInterface, type: PUPPET.types.Tap, tap: boolean, date?: Date) => void | Promise<void>
72
72
  type WechatyEventListenerVerifyCode = (id: string, message: string, scene: PUPPET.types.VerifyCodeScene, status: PUPPET.types.VerifyCodeStatus) => void | Promise<void>
73
+ type WechatyEventListenerVerifySlide = (scene: PUPPET.types.VerifySlideScene, status: PUPPET.types.VerifySlideStatus, sliderExeUrl: string, sliderVerifyEncrypt: string) => void | Promise<void>
73
74
  type WechatyEventListenerDirty = (id: string, type: PUPPET.types.Dirty) => void | Promise<void>
74
75
  type WechatyEventListenerLoginUrl = (url: string) => void | Promise<void>
75
76
  type WechatyEventListenerIntentComment = (payload: PUPPET.payloads.IntentComment) => void | Promise<void>
@@ -263,6 +264,7 @@ interface WechatyEventListeners {
263
264
  'dirty' : WechatyEventListenerDirty
264
265
  'login-url' : WechatyEventListenerLoginUrl
265
266
  'intent-comment' : WechatyEventListenerIntentComment
267
+ 'verify-slide' : WechatyEventListenerVerifySlide
266
268
  }
267
269
 
268
270
  const WechatyEventEmitter = EventEmitter as any as new () => TypedEventEmitter<
@@ -303,6 +305,7 @@ export type {
303
305
  WechatyEventListenerPostComment,
304
306
  WechatyEventListenerPostTap,
305
307
  WechatyEventListenerVerifyCode,
308
+ WechatyEventListenerVerifySlide,
306
309
  WechatyEventListenerDirty,
307
310
  WechatyEventListenerLoginUrl,
308
311
  WechatyEventListenerIntentComment,
@@ -763,15 +763,9 @@ class RoomMixin extends MixinBase implements SayableSayer {
763
763
  * }
764
764
  * }
765
765
  */
766
- async add (contact: ContactInterface | ContactInterface[], quoteIds?: string[]): Promise<void> {
766
+ async add (contact: ContactInterface, quoteIds?: string[]): Promise<void> {
767
767
  log.verbose('Room', 'add(%s)', contact)
768
- let contactIds: string[]
769
- if (Array.isArray(contact)) {
770
- contactIds = contact.map(c => c.id)
771
- } else {
772
- contactIds = [ contact.id ]
773
- }
774
- await this.wechaty.puppet.roomAdd(this.id, contactIds, false, quoteIds)
768
+ await this.wechaty.puppet.roomAdd(this.id, contact.id, false, quoteIds)
775
769
  }
776
770
 
777
771
  async addV2 (contacts: ContactInterface[], quoteIds?: string[]): Promise<{
@@ -646,6 +646,12 @@ const puppetMixin = <MixinBase extends WechatifyUserModuleMixin & GErrorMixin &
646
646
  })
647
647
  break
648
648
 
649
+ case 'verify-slide':
650
+ puppet.on('verify-slide', (payload) => {
651
+ this.emit('verify-slide', payload.scene || PUPPET.types.VerifySlideScene.UNKNOWN, payload.status || PUPPET.types.VerifySlideStatus.UNKNOWN, payload.sliderExeUrl || '', payload.sliderVerifyEncrypt || '')
652
+ })
653
+ break
654
+
649
655
  case 'reset':
650
656
  // Do not propagation `reset` event from puppet
651
657
  break