@juzi/wechaty 1.0.69 → 1.0.71

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 (79) hide show
  1. package/dist/cjs/src/mods/impls.d.ts +2 -2
  2. package/dist/cjs/src/mods/impls.d.ts.map +1 -1
  3. package/dist/cjs/src/mods/impls.js +2 -1
  4. package/dist/cjs/src/mods/impls.js.map +1 -1
  5. package/dist/cjs/src/mods/users.d.ts +1 -1
  6. package/dist/cjs/src/mods/users.d.ts.map +1 -1
  7. package/dist/cjs/src/package-json.js +4 -4
  8. package/dist/cjs/src/user-modules/call.d.ts +34 -0
  9. package/dist/cjs/src/user-modules/call.d.ts.map +1 -0
  10. package/dist/cjs/src/user-modules/call.js +79 -0
  11. package/dist/cjs/src/user-modules/call.js.map +1 -0
  12. package/dist/cjs/src/user-modules/message.d.ts +2 -0
  13. package/dist/cjs/src/user-modules/message.d.ts.map +1 -1
  14. package/dist/cjs/src/user-modules/message.js +11 -0
  15. package/dist/cjs/src/user-modules/message.js.map +1 -1
  16. package/dist/cjs/src/user-modules/mod.d.ts +4 -3
  17. package/dist/cjs/src/user-modules/mod.d.ts.map +1 -1
  18. package/dist/cjs/src/user-modules/mod.js +3 -1
  19. package/dist/cjs/src/user-modules/mod.js.map +1 -1
  20. package/dist/cjs/src/wechaty/wechaty-base.d.ts +125 -0
  21. package/dist/cjs/src/wechaty/wechaty-base.d.ts.map +1 -1
  22. package/dist/cjs/src/wechaty/wechaty-impl.spec.js +3 -1
  23. package/dist/cjs/src/wechaty/wechaty-impl.spec.js.map +1 -1
  24. package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts +18 -0
  25. package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
  26. package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts +9 -9
  27. package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
  28. package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts +8 -0
  29. package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
  30. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts +4 -0
  31. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  32. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +4 -2
  33. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
  34. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js +3 -0
  35. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
  36. package/dist/esm/src/mods/impls.d.ts +2 -2
  37. package/dist/esm/src/mods/impls.d.ts.map +1 -1
  38. package/dist/esm/src/mods/impls.js +1 -1
  39. package/dist/esm/src/mods/impls.js.map +1 -1
  40. package/dist/esm/src/mods/users.d.ts +1 -1
  41. package/dist/esm/src/mods/users.d.ts.map +1 -1
  42. package/dist/esm/src/package-json.js +4 -4
  43. package/dist/esm/src/user-modules/call.d.ts +34 -0
  44. package/dist/esm/src/user-modules/call.d.ts.map +1 -0
  45. package/dist/esm/src/user-modules/call.js +53 -0
  46. package/dist/esm/src/user-modules/call.js.map +1 -0
  47. package/dist/esm/src/user-modules/message.d.ts +2 -0
  48. package/dist/esm/src/user-modules/message.d.ts.map +1 -1
  49. package/dist/esm/src/user-modules/message.js +11 -0
  50. package/dist/esm/src/user-modules/message.js.map +1 -1
  51. package/dist/esm/src/user-modules/mod.d.ts +4 -3
  52. package/dist/esm/src/user-modules/mod.d.ts.map +1 -1
  53. package/dist/esm/src/user-modules/mod.js +2 -1
  54. package/dist/esm/src/user-modules/mod.js.map +1 -1
  55. package/dist/esm/src/wechaty/wechaty-base.d.ts +125 -0
  56. package/dist/esm/src/wechaty/wechaty-base.d.ts.map +1 -1
  57. package/dist/esm/src/wechaty/wechaty-impl.spec.js +3 -1
  58. package/dist/esm/src/wechaty/wechaty-impl.spec.js.map +1 -1
  59. package/dist/esm/src/wechaty-mixins/login-mixin.d.ts +18 -0
  60. package/dist/esm/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
  61. package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts +9 -9
  62. package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
  63. package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts +8 -0
  64. package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
  65. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts +4 -0
  66. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  67. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +4 -2
  68. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
  69. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js +4 -1
  70. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
  71. package/package.json +3 -3
  72. package/src/mods/impls.ts +2 -0
  73. package/src/mods/users.ts +1 -0
  74. package/src/package-json.ts +4 -4
  75. package/src/user-modules/call.ts +85 -0
  76. package/src/user-modules/message.ts +16 -0
  77. package/src/user-modules/mod.ts +8 -0
  78. package/src/wechaty/wechaty-impl.spec.ts +3 -0
  79. package/src/wechaty-mixins/wechatify-user-module-mixin.ts +6 -0
@@ -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,EAmBV,mBAAmB,GACpB,MAA4B,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C,CAAC,IAAW,CAAC,CAAA;YAChF,IAAI,CAAC,mBAAmB,GAAW,mBAAmB,CAAC,UAAU,CAAC,CAAC,IAAW,CAAC,CAAA;YAE/E,GAAG,CAAC,OAAO,CAAC,0BAA0B,EAAE,wDAAwD,CAAC,CAAA;QACnG,CAAC;KAEF;IAED,OAAO,wBAAwB,CAAA;AACjC,CAAC,CAAA;AAED;;GAEG;AACH,SAAS,cAAc,CAAsB,UAAc;IACzD,IAAI,UAAU,EAAE;QACd,OAAO,UAAU,CAAA;KAClB;IACD,MAAM,IAAI,KAAK,CAAC,8FAA8F,CAAC,CAAA;AACjH,CAAC;AAyBD,OAAO,EACL,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,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,uBAA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AA;AACjC,CAAC,CAAA;AAED;;GAEG;AACH,SAAS,cAAc,CAAsB,UAAc;IACzD,IAAI,UAAU,EAAE;QACd,OAAO,UAAU,CAAA;KAClB;IACD,MAAM,IAAI,KAAK,CAAC,8FAA8F,CAAC,CAAA;AACjH,CAAC;AA0BD,OAAO,EACL,wBAAwB,GACzB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
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.71",
112
+ "@juzi/wechaty-puppet-service": "^1.0.73",
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.62",
135
+ "@juzi/wechaty-puppet": "^1.0.64",
136
136
  "@juzi/wechaty-puppet-mock": "^1.0.1",
137
137
  "@swc/core": "1.3.44",
138
138
  "@swc/helpers": "^0.3.6",
package/src/mods/impls.ts CHANGED
@@ -49,6 +49,7 @@ export {
49
49
  TagGroupImpl,
50
50
  UrlLinkImpl,
51
51
  ChannelImpl,
52
+ CallRecordImpl,
52
53
  } from '../user-modules/mod.js'
53
54
 
54
55
  // export {
@@ -89,6 +90,7 @@ export type {
89
90
  TagGroupInterface,
90
91
  UrlLinkInterface,
91
92
  ChannelInterface,
93
+ CallRecordInterface,
92
94
  } from '../user-modules/mod.js'
93
95
 
94
96
  export type {
package/src/mods/users.ts CHANGED
@@ -43,4 +43,5 @@ export type {
43
43
  TagGroupInterface as TagGroup,
44
44
  UrlLinkInterface as UrlLink,
45
45
  ChannelInterface as Channel,
46
+ CallRecordInterface as CallRecord,
46
47
  } from '../user-modules/mod.js'
@@ -4,10 +4,10 @@
4
4
  */
5
5
  import type { PackageJsonWechaty } from './config'
6
6
 
7
- export const GIT_COMMIT_HASH: string = 'ed7c4b7dbd3c36ddff2dd84adf63fed205a9e335'
7
+ export const GIT_COMMIT_HASH: string = 'a8e1b9f1d56da3a5aa5b56632ca07eb1e40ddbd7'
8
8
  export const packageJson: PackageJsonWechaty = {
9
9
  "name": "@juzi/wechaty",
10
- "version": "1.0.69",
10
+ "version": "1.0.71",
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.71",
119
+ "@juzi/wechaty-puppet-service": "^1.0.73",
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.62",
142
+ "@juzi/wechaty-puppet": "^1.0.64",
143
143
  "@juzi/wechaty-puppet-mock": "^1.0.1",
144
144
  "@swc/core": "1.3.44",
145
145
  "@swc/helpers": "^0.3.6",
@@ -0,0 +1,85 @@
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 { ContactImpl, ContactInterface } from './contact.js'
12
+
13
+ class CallRecordMixin extends wechatifyMixinBase() {
14
+
15
+ static async create (): Promise<CallRecordInterface> {
16
+ log.verbose('CallRecord', 'create()')
17
+
18
+ const payload: PUPPET.payloads.CallRecord = {
19
+ starter: 'todo',
20
+ participants: [ 'todo' ],
21
+ length: 0,
22
+ type: 0,
23
+ status: 0,
24
+ }
25
+
26
+ return new this(payload)
27
+ }
28
+
29
+ /*
30
+ * @hideconstructor
31
+ */
32
+ constructor (
33
+ public readonly payload: PUPPET.payloads.CallRecord,
34
+ ) {
35
+ super()
36
+ log.verbose('CallRecord', 'constructor()')
37
+ }
38
+
39
+ async starter (): Promise<undefined | ContactInterface> {
40
+ const starterId = this.payload.starter
41
+ if (!starterId) {
42
+ return undefined
43
+ }
44
+ const starter = (this.wechaty.Contact as typeof ContactImpl).find({ id: starterId })
45
+ return starter
46
+ }
47
+
48
+ async participants (): Promise<ContactInterface[]> {
49
+ const participantIds = this.payload.participants
50
+
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[]
55
+ }
56
+
57
+ length (): number {
58
+ return this.payload.length
59
+ }
60
+
61
+ type (): PUPPET.types.Call {
62
+ return this.payload.type || PUPPET.types.Call.UNKNOWN
63
+ }
64
+
65
+ status (): PUPPET.types.CallStatus {
66
+ return this.payload.status || PUPPET.types.CallStatus.UNKNOWN
67
+ }
68
+
69
+ }
70
+
71
+ class CallRecordImpl extends validationMixin(CallRecordMixin)<CallRecordInterface>() { }
72
+ interface CallRecordInterface extends CallRecordImpl { }
73
+
74
+ type CallRecordConstructor = Constructor<
75
+ CallRecordInterface,
76
+ typeof CallRecordImpl
77
+ >
78
+
79
+ export type {
80
+ CallRecordConstructor,
81
+ CallRecordInterface,
82
+ }
83
+ export {
84
+ CallRecordImpl,
85
+ }
@@ -75,6 +75,7 @@ import type {
75
75
  import { validationMixin } from '../user-mixins/validation.js'
76
76
  import type { ContactSelfImpl } from './contact-self.js'
77
77
  import { concurrencyExecuter } from 'rx-queue'
78
+ import type { CallRecordInterface } from './call.js'
78
79
 
79
80
  const MixinBase = wechatifyMixin(
80
81
  EventEmitter,
@@ -1329,6 +1330,21 @@ class MessageMixin extends MixinBase implements SayableSayer {
1329
1330
  return new this.wechaty.Channel(channelPayload)
1330
1331
  }
1331
1332
 
1333
+ public async toCallRecord (): Promise<CallRecordInterface> {
1334
+ log.verbose('Message', 'toCallRecord()')
1335
+
1336
+ if (!this.payload) {
1337
+ throw new Error('no payload')
1338
+ }
1339
+
1340
+ if (this.type() !== PUPPET.types.Message.CallRecord) {
1341
+ throw new Error('message not a CallRecord')
1342
+ }
1343
+
1344
+ const callRecordPayload = await this.wechaty.puppet.messageCallRecord(this.id)
1345
+ return new this.wechaty.CallRecord(callRecordPayload)
1346
+ }
1347
+
1332
1348
  async toSayable (): Promise<undefined | Sayable> {
1333
1349
  log.verbose('Message', 'toSayable()')
1334
1350
  return messageToSayable(this)
@@ -107,6 +107,11 @@ import {
107
107
  ChannelInterface,
108
108
  ChannelConstructor,
109
109
  } from './channel.js'
110
+ import {
111
+ CallRecordImpl,
112
+ CallRecordInterface,
113
+ CallRecordConstructor,
114
+ } from './call.js'
110
115
 
111
116
  import { wechatifyUserModule } from '../user-mixins/wechatify.js'
112
117
 
@@ -129,6 +134,7 @@ export type {
129
134
  DelayInterface,
130
135
  UrlLinkInterface,
131
136
  ChannelInterface,
137
+ CallRecordInterface,
132
138
  }
133
139
 
134
140
  export type {
@@ -150,6 +156,7 @@ export type {
150
156
  TagGroupConstructor,
151
157
  UrlLinkConstructor,
152
158
  ChannelConstructor,
159
+ CallRecordConstructor,
153
160
  }
154
161
 
155
162
  export {
@@ -173,4 +180,5 @@ export {
173
180
  TagGroupImpl,
174
181
  UrlLinkImpl,
175
182
  ChannelImpl,
183
+ CallRecordImpl,
176
184
  }
@@ -22,6 +22,7 @@ import type {
22
22
  MessageInterface,
23
23
  ChannelConstructor,
24
24
  MomentConstructor,
25
+ CallRecordConstructor,
25
26
  } from '../user-modules/mod.js'
26
27
 
27
28
  import {
@@ -51,6 +52,7 @@ test('Wechaty interface', async t => {
51
52
  UrlLink : UrlLinkConstructor
52
53
  Channel : ChannelConstructor
53
54
  Moment : MomentConstructor
55
+ CallRecord : CallRecordConstructor
54
56
 
55
57
  constructor () {
56
58
  super()
@@ -71,6 +73,7 @@ test('Wechaty interface', async t => {
71
73
  = this.UrlLink
72
74
  = this.Channel
73
75
  = this.Moment
76
+ = this.CallRecord
74
77
  = {} as any
75
78
  }
76
79
 
@@ -17,6 +17,7 @@ import {
17
17
  UrlLinkImpl,
18
18
  ChannelImpl,
19
19
  MomentImpl,
20
+ CallRecordImpl,
20
21
 
21
22
  ContactConstructor,
22
23
  ContactSelfConstructor,
@@ -34,6 +35,7 @@ import {
34
35
  UrlLinkConstructor,
35
36
  ChannelConstructor,
36
37
  MomentConstructor,
38
+ CallRecordConstructor,
37
39
 
38
40
  wechatifyUserModule,
39
41
  } from '../user-modules/mod.js'
@@ -68,6 +70,7 @@ const wechatifyUserModuleMixin = <MixinBase extends typeof WechatySkeleton> (mix
68
70
  __wechatifiedUrlLink? : UrlLinkConstructor
69
71
  __wechatifiedChannel? : ChannelConstructor
70
72
  __wechatifiedMoment? : MomentConstructor
73
+ __wechatifiedCallRecord? : CallRecordConstructor
71
74
 
72
75
  get Contact () : ContactConstructor { return guardWechatify(this.__wechatifiedContact) }
73
76
  get ContactSelf () : ContactSelfConstructor { return guardWechatify(this.__wechatifiedContactSelf) }
@@ -85,6 +88,7 @@ const wechatifyUserModuleMixin = <MixinBase extends typeof WechatySkeleton> (mix
85
88
  get UrlLink () : UrlLinkConstructor { return guardWechatify(this.__wechatifiedUrlLink) }
86
89
  get Channel () : ChannelConstructor { return guardWechatify(this.__wechatifiedChannel) }
87
90
  get Moment () : MomentConstructor { return guardWechatify(this.__wechatifiedMoment) }
91
+ get CallRecord () : CallRecordConstructor { return guardWechatify(this.__wechatifiedCallRecord) }
88
92
 
89
93
  override async init (): Promise<void> {
90
94
  log.verbose('WechatifyUserModuleMixin', 'init()')
@@ -122,6 +126,7 @@ const wechatifyUserModuleMixin = <MixinBase extends typeof WechatySkeleton> (mix
122
126
  this.__wechatifiedUrlLink = wechatifyUserModule(UrlLinkImpl)(this as any)
123
127
  this.__wechatifiedChannel = wechatifyUserModule(ChannelImpl)(this as any)
124
128
  this.__wechatifiedMoment = wechatifyUserModule(MomentImpl)(this as any)
129
+ this.__wechatifiedCallRecord = wechatifyUserModule(CallRecordImpl)(this as any)
125
130
 
126
131
  log.verbose('WechatifyUserModuleMixin', 'init() initializing Wechaty User Module (WUM) ... done')
127
132
  }
@@ -159,6 +164,7 @@ type ProtectedPropertyWechatifyUserModuleMixin =
159
164
  | '__wechatifiedUrlLink'
160
165
  | '__wechatifiedChannel'
161
166
  | '__wechatifiedMoment'
167
+ | '__wechatifiedCallRecord'
162
168
 
163
169
  export type {
164
170
  WechatifyUserModuleMixin,