@juzi/wechaty 1.0.16 → 1.0.19

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 (142) hide show
  1. package/dist/cjs/src/mods/impls.d.ts +3 -3
  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/package-json.js.map +1 -1
  9. package/dist/cjs/src/pure-functions/update.d.ts +9 -0
  10. package/dist/cjs/src/pure-functions/update.d.ts.map +1 -0
  11. package/dist/cjs/src/pure-functions/update.js +73 -0
  12. package/dist/cjs/src/pure-functions/update.js.map +1 -0
  13. package/dist/cjs/src/schemas/contact-events.d.ts +4 -1
  14. package/dist/cjs/src/schemas/contact-events.d.ts.map +1 -1
  15. package/dist/cjs/src/schemas/contact-events.js.map +1 -1
  16. package/dist/cjs/src/schemas/room-events.d.ts +5 -1
  17. package/dist/cjs/src/schemas/room-events.d.ts.map +1 -1
  18. package/dist/cjs/src/schemas/room-events.js +1 -0
  19. package/dist/cjs/src/schemas/room-events.js.map +1 -1
  20. package/dist/cjs/src/schemas/update.d.ts +12 -0
  21. package/dist/cjs/src/schemas/update.d.ts.map +1 -0
  22. package/dist/cjs/src/schemas/update.js +3 -0
  23. package/dist/cjs/src/schemas/update.js.map +1 -0
  24. package/dist/cjs/src/schemas/wechaty-events.d.ts +5 -1
  25. package/dist/cjs/src/schemas/wechaty-events.d.ts.map +1 -1
  26. package/dist/cjs/src/schemas/wechaty-events.js +1 -0
  27. package/dist/cjs/src/schemas/wechaty-events.js.map +1 -1
  28. package/dist/cjs/src/user-modules/contact.d.ts +8 -0
  29. package/dist/cjs/src/user-modules/contact.d.ts.map +1 -1
  30. package/dist/cjs/src/user-modules/contact.js +18 -4
  31. package/dist/cjs/src/user-modules/contact.js.map +1 -1
  32. package/dist/cjs/src/user-modules/mod.d.ts +4 -3
  33. package/dist/cjs/src/user-modules/mod.d.ts.map +1 -1
  34. package/dist/cjs/src/user-modules/mod.js +3 -1
  35. package/dist/cjs/src/user-modules/mod.js.map +1 -1
  36. package/dist/cjs/src/user-modules/tag-group.d.ts +60 -0
  37. package/dist/cjs/src/user-modules/tag-group.d.ts.map +1 -0
  38. package/dist/cjs/src/user-modules/tag-group.js +71 -0
  39. package/dist/cjs/src/user-modules/tag-group.js.map +1 -0
  40. package/dist/cjs/src/user-modules/tag.d.ts +37 -64
  41. package/dist/cjs/src/user-modules/tag.d.ts.map +1 -1
  42. package/dist/cjs/src/user-modules/tag.js +52 -127
  43. package/dist/cjs/src/user-modules/tag.js.map +1 -1
  44. package/dist/cjs/src/wechaty/wechaty-base.d.ts +22 -12
  45. package/dist/cjs/src/wechaty/wechaty-base.d.ts.map +1 -1
  46. package/dist/cjs/src/wechaty/wechaty-impl.spec.js +5 -3
  47. package/dist/cjs/src/wechaty/wechaty-impl.spec.js.map +1 -1
  48. package/dist/cjs/src/wechaty-mixins/gerror-mixin.d.ts +1 -1
  49. package/dist/cjs/src/wechaty-mixins/io-mixin.d.ts +2 -2
  50. package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts +11 -5
  51. package/dist/cjs/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
  52. package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts +14 -14
  53. package/dist/cjs/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
  54. package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts +14 -6
  55. package/dist/cjs/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
  56. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts +10 -24
  57. package/dist/cjs/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  58. package/dist/cjs/src/wechaty-mixins/puppet-mixin.js +23 -0
  59. package/dist/cjs/src/wechaty-mixins/puppet-mixin.js.map +1 -1
  60. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +5 -3
  61. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
  62. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js +3 -0
  63. package/dist/cjs/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
  64. package/dist/esm/src/mods/impls.d.ts +3 -3
  65. package/dist/esm/src/mods/impls.d.ts.map +1 -1
  66. package/dist/esm/src/mods/impls.js +1 -1
  67. package/dist/esm/src/mods/impls.js.map +1 -1
  68. package/dist/esm/src/mods/users.d.ts +1 -1
  69. package/dist/esm/src/mods/users.d.ts.map +1 -1
  70. package/dist/esm/src/package-json.js +4 -4
  71. package/dist/esm/src/package-json.js.map +1 -1
  72. package/dist/esm/src/pure-functions/update.d.ts +9 -0
  73. package/dist/esm/src/pure-functions/update.d.ts.map +1 -0
  74. package/dist/esm/src/pure-functions/update.js +69 -0
  75. package/dist/esm/src/pure-functions/update.js.map +1 -0
  76. package/dist/esm/src/schemas/contact-events.d.ts +4 -1
  77. package/dist/esm/src/schemas/contact-events.d.ts.map +1 -1
  78. package/dist/esm/src/schemas/contact-events.js.map +1 -1
  79. package/dist/esm/src/schemas/room-events.d.ts +5 -1
  80. package/dist/esm/src/schemas/room-events.d.ts.map +1 -1
  81. package/dist/esm/src/schemas/room-events.js +1 -0
  82. package/dist/esm/src/schemas/room-events.js.map +1 -1
  83. package/dist/esm/src/schemas/update.d.ts +12 -0
  84. package/dist/esm/src/schemas/update.d.ts.map +1 -0
  85. package/dist/esm/src/schemas/update.js +2 -0
  86. package/dist/esm/src/schemas/update.js.map +1 -0
  87. package/dist/esm/src/schemas/wechaty-events.d.ts +5 -1
  88. package/dist/esm/src/schemas/wechaty-events.d.ts.map +1 -1
  89. package/dist/esm/src/schemas/wechaty-events.js +1 -0
  90. package/dist/esm/src/schemas/wechaty-events.js.map +1 -1
  91. package/dist/esm/src/user-modules/contact.d.ts +8 -0
  92. package/dist/esm/src/user-modules/contact.d.ts.map +1 -1
  93. package/dist/esm/src/user-modules/contact.js +18 -4
  94. package/dist/esm/src/user-modules/contact.js.map +1 -1
  95. package/dist/esm/src/user-modules/mod.d.ts +4 -3
  96. package/dist/esm/src/user-modules/mod.d.ts.map +1 -1
  97. package/dist/esm/src/user-modules/mod.js +2 -1
  98. package/dist/esm/src/user-modules/mod.js.map +1 -1
  99. package/dist/esm/src/user-modules/tag-group.d.ts +60 -0
  100. package/dist/esm/src/user-modules/tag-group.d.ts.map +1 -0
  101. package/dist/esm/src/user-modules/tag-group.js +68 -0
  102. package/dist/esm/src/user-modules/tag-group.js.map +1 -0
  103. package/dist/esm/src/user-modules/tag.d.ts +37 -64
  104. package/dist/esm/src/user-modules/tag.d.ts.map +1 -1
  105. package/dist/esm/src/user-modules/tag.js +52 -127
  106. package/dist/esm/src/user-modules/tag.js.map +1 -1
  107. package/dist/esm/src/wechaty/wechaty-base.d.ts +22 -12
  108. package/dist/esm/src/wechaty/wechaty-base.d.ts.map +1 -1
  109. package/dist/esm/src/wechaty/wechaty-impl.spec.js +5 -3
  110. package/dist/esm/src/wechaty/wechaty-impl.spec.js.map +1 -1
  111. package/dist/esm/src/wechaty-mixins/gerror-mixin.d.ts +1 -1
  112. package/dist/esm/src/wechaty-mixins/io-mixin.d.ts +2 -2
  113. package/dist/esm/src/wechaty-mixins/login-mixin.d.ts +11 -5
  114. package/dist/esm/src/wechaty-mixins/login-mixin.d.ts.map +1 -1
  115. package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts +14 -14
  116. package/dist/esm/src/wechaty-mixins/misc-mixin.d.ts.map +1 -1
  117. package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts +14 -6
  118. package/dist/esm/src/wechaty-mixins/plugin-mixin.d.ts.map +1 -1
  119. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts +10 -24
  120. package/dist/esm/src/wechaty-mixins/puppet-mixin.d.ts.map +1 -1
  121. package/dist/esm/src/wechaty-mixins/puppet-mixin.js +23 -0
  122. package/dist/esm/src/wechaty-mixins/puppet-mixin.js.map +1 -1
  123. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts +5 -3
  124. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.d.ts.map +1 -1
  125. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js +4 -1
  126. package/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js.map +1 -1
  127. package/package.json +3 -3
  128. package/src/mods/impls.ts +3 -0
  129. package/src/mods/users.ts +1 -0
  130. package/src/package-json.ts +4 -4
  131. package/src/pure-functions/update.ts +68 -0
  132. package/src/schemas/contact-events.ts +4 -0
  133. package/src/schemas/room-events.ts +5 -0
  134. package/src/schemas/update.ts +14 -0
  135. package/src/schemas/wechaty-events.ts +5 -1
  136. package/src/user-modules/contact.ts +26 -4
  137. package/src/user-modules/mod.ts +8 -0
  138. package/src/user-modules/tag-group.ts +115 -0
  139. package/src/user-modules/tag.ts +61 -124
  140. package/src/wechaty/wechaty-impl.spec.ts +3 -0
  141. package/src/wechaty-mixins/puppet-mixin.ts +24 -0
  142. package/src/wechaty-mixins/wechatify-user-module-mixin.ts +6 -0
@@ -1,80 +1,53 @@
1
+ /**
2
+ * Wechaty Chatbot SDK - https://github.com/wechaty/wechaty
3
+ *
4
+ * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
5
+ * Wechaty Contributors <https://github.com/wechaty>.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ */
20
+ import type * as PUPPET from '@juzi/wechaty-puppet';
1
21
  import type { Constructor } from 'clone-class';
2
- import { ContactInterface, ContactImpl } from './contact.js';
3
- import { FavoriteInterface, FavoriteImpl } from './favorite.js';
4
- declare const MixinBase: ((abstract new (...args: any[]) => {}) & {
5
- _pool?: Map<string, TagInterface> | undefined;
6
- readonly pool: Map<string, TagInterface>;
7
- load<L extends import("clone-class/dist/esm/src/constructor.js").ClassInterface<{}> & {
8
- new (...args: any[]): TagInterface;
9
- prototype: TagInterface;
10
- } & import("../user-mixins/poolify.js").PoolifyMixin<TagInterface>>(this: L, id: string): TagInterface;
11
- }) & ((abstract new (...args: any[]) => {
22
+ import type { ContactInterface } from './contact.js';
23
+ declare const TagMixin_base: ((abstract new (...args: any[]) => {
12
24
  readonly wechaty: import("../wechaty/wechaty-impl.js").WechatyInterface;
13
25
  }) & {
14
26
  readonly wechaty: import("../wechaty/wechaty-impl.js").WechatyInterface;
15
27
  }) & {
16
28
  new (): {};
17
29
  };
18
- declare class TagMixin extends MixinBase {
19
- readonly id: string;
30
+ declare class TagMixin extends TagMixin_base {
31
+ readonly payload: PUPPET.payloads.Tag;
20
32
  /**
21
- * @hideconstructor
22
- */
23
- constructor(id: string);
24
- /**
25
- * Get a Tag instance for "tag"
26
- *
27
- * > Tips:
28
- * This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/Chatie/wechaty/wiki/Puppet#3-puppet-compatible-table)
29
- *
30
- * @static
31
- * @param {string} [tag] the tag name which want to create
32
- * @returns {Promise<TagImpl>}
33
- * @example
34
- * const bot = new Wechaty()
35
- * await bot.Tag.get('TagName')
36
- */
37
- static get(tag: string): Promise<TagInterface>;
38
- /**
39
- * Delete a tag from Wechat
40
- *
41
- * If you want to delete a tag, please make sure there's no more Contact/Favorite(s) are using this tag.
42
- * If this tag is be used by any Contact/Favorite, then it can not be deleted.
43
- * (This is for protecting the tag being deleted by mistake)
44
33
  *
45
- * @static
46
- * @returns {Promise<TagInterface[]>}
47
- * @example
48
- * const tag = wechaty.Tag.get('tag')
49
- * await wechaty.Tag.delete(tag)
50
- */
51
- /**
52
- * TODO: refactoring the target: do not use ContactIml or FavoriteImpl
53
- */
54
- static delete(tag: TagInterface, target?: typeof ContactImpl | typeof FavoriteImpl): Promise<void>;
55
- /**
56
- * Add tag for contact
34
+ * Create
57
35
  *
58
- * > Tips:
59
- * This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/Chatie/wechaty/wiki/Puppet#3-puppet-compatible-table)
60
- *
61
- * @param {ContactInterface} [to] the contact which need to add tag
62
- * @returns {Promise<void>}
63
- * @example
64
- * await tag.add(contact)
65
36
  */
66
- add(to: ContactInterface | FavoriteInterface): Promise<void>;
37
+ static create(payload: PUPPET.payloads.Tag): TagInterface;
67
38
  /**
68
- * Remove this tag from Contact/Favorite
69
- *
70
- * > Tips:
71
- * This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/Chatie/wechaty/wiki/Puppet#3-puppet-compatible-table)
72
- *
73
- * @returns {Promise<void>}
74
- * @example
75
- * await tag.remove(contact)
39
+ * @hideconstructor
76
40
  */
77
- remove(from: ContactInterface | FavoriteInterface): Promise<void>;
41
+ constructor(payload: PUPPET.payloads.Tag);
42
+ id(): string;
43
+ type(): PUPPET.types.Tag;
44
+ groupId(): string;
45
+ name(): string;
46
+ static list(): Promise<TagInterface[]>;
47
+ contactList(): Promise<ContactInterface[]>;
48
+ tag(contact: ContactInterface): Promise<void>;
49
+ static createTag(tagGroupId: string | undefined, name: string): Promise<TagInterface | void>;
50
+ static deleteTag(tag: TagInterface): Promise<void>;
78
51
  }
79
52
  declare const TagImpl_base: {
80
53
  new (...args: any[]): {};
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../../src/user-modules/tag.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAO,aAAa,CAAA;AAE/C,O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cAAc,CAAA;;;;;;;;AAEpD,cAAM,QAAS,SAAQ,aAAoB;aAiBvB,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG;IAf9C;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,YAAY;IAM1D;;OAEG;gBAEe,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG;IAM9C,EAAE,IAAK,MAAM;IAIb,IAAI,IAAK,MAAM,CAAC,KAAK,CAAC,GAAG;IAIzB,OAAO,IAAK,MAAM;IAIlB,IAAI,IAAK,MAAM;WAIF,IAAI,IAAK,OAAO,CAAC,YAAY,EAAE,CAAC;IAavC,WAAW,IAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQ3C,GAAG,CAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;WAOvC,SAAS,CAAE,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;WActF,SAAS,CAAE,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAW1D;;;;;;;AAED,cAAM,OAAQ,SAAQ,YAAyC;CAAG;AAClE,UAAU,YAAa,SAAQ,OAAO;CAAG;AAEzC,aAAK,cAAc,GAAG,WAAW,CAC/B,YAAY,EACZ,OAAO,OAAO,CACf,CAAA;AAED,YAAY,EACV,cAAc,EACd,YAAY,GACb,CAAA;AACD,OAAO,EACL,OAAO,GACR,CAAA"}
@@ -1,156 +1,81 @@
1
- /**
2
- * Wechaty Chatbot SDK - https://github.com/wechaty/wechaty
3
- *
4
- * @copyright 2016 Huan LI (李卓桓) <https://github.com/huan>, and
5
- * Wechaty Contributors <https://github.com/wechaty>.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- *
19
- */
20
- import { log, } from '@juzi/wechaty-puppet';
21
- import { ContactImpl } from './contact.js';
22
- import { FavoriteImpl } from './favorite.js';
23
- import { poolifyMixin, } from '../user-mixins/poolify.js';
1
+ import { log } from '../config.js';
24
2
  import { validationMixin } from '../user-mixins/validation.js';
25
3
  import { wechatifyMixinBase, } from '../user-mixins/wechatify.js';
26
- const MixinBase = poolifyMixin(wechatifyMixinBase())();
27
- class TagMixin extends MixinBase {
28
- id;
4
+ class TagMixin extends wechatifyMixinBase() {
5
+ payload;
29
6
  /**
30
- * @hideconstructor
31
- */
32
- constructor(id) {
33
- super();
34
- this.id = id;
35
- log.silly('Tag', `constructor(${id})`);
36
- }
37
- /**
38
- * Get a Tag instance for "tag"
39
7
  *
40
- * > Tips:
41
- * This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/Chatie/wechaty/wiki/Puppet#3-puppet-compatible-table)
8
+ * Create
42
9
  *
43
- * @static
44
- * @param {string} [tag] the tag name which want to create
45
- * @returns {Promise<TagImpl>}
46
- * @example
47
- * const bot = new Wechaty()
48
- * await bot.Tag.get('TagName')
49
10
  */
50
- static async get(tag) {
51
- log.verbose('Tag', 'get(%s)', tag);
52
- return this.load(tag);
11
+ static create(payload) {
12
+ log.verbose('Tag', 'create()');
13
+ return new this(payload);
53
14
  }
54
15
  /**
55
- * Delete a tag from Wechat
56
- *
57
- * If you want to delete a tag, please make sure there's no more Contact/Favorite(s) are using this tag.
58
- * If this tag is be used by any Contact/Favorite, then it can not be deleted.
59
- * (This is for protecting the tag being deleted by mistake)
60
- *
61
- * @static
62
- * @returns {Promise<TagInterface[]>}
63
- * @example
64
- * const tag = wechaty.Tag.get('tag')
65
- * await wechaty.Tag.delete(tag)
66
- */
67
- /**
68
- * TODO: refactoring the target: do not use ContactIml or FavoriteImpl
16
+ * @hideconstructor
69
17
  */
70
- static async delete(tag, target) {
71
- log.verbose('Tag', 'static delete(%s)', tag);
72
- /**
73
- * Huan(202110) TODO: refactory this design:
74
- * 1. we should not pass `typeof ContactImpl` as argument
75
- * 2. find a better way to manage tag.
76
- */
18
+ constructor(payload) {
19
+ super();
20
+ this.payload = payload;
21
+ log.silly('Tag', 'constructor()');
22
+ }
23
+ id() {
24
+ return this.payload.id;
25
+ }
26
+ type() {
27
+ return this.payload.type;
28
+ }
29
+ groupId() {
30
+ return this.payload.groupId || '';
31
+ }
32
+ name() {
33
+ return this.payload.name;
34
+ }
35
+ static async list() {
36
+ log.verbose('Tag', 'list()');
77
37
  try {
78
- /**
79
- * TODO(huan): add tag check code here for checking if this tag is still being used.
80
- */
81
- if (!target || target === ContactImpl || target === this.wechaty.Contact) {
82
- await this.wechaty.puppet.tagContactDelete(tag.id);
83
- // TODO:
84
- // } else if (!target || target === Favorite || target === this.wechaty.Favorite) {
85
- // await this.wechaty.puppet.tagFavoriteDelete(tag.id)
86
- }
38
+ const payloads = await this.wechaty.puppet.tagTagList();
39
+ return payloads.map(payload => new this(payload));
87
40
  }
88
41
  catch (e) {
89
42
  this.wechaty.emitError(e);
90
- log.error('Tag', 'static delete() exception: %s', e.message);
43
+ log.error('Tag', 'list() exception: %s', e.message);
44
+ return [];
91
45
  }
92
46
  }
93
- /**
94
- * Add tag for contact
95
- *
96
- * > Tips:
97
- * This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/Chatie/wechaty/wiki/Puppet#3-puppet-compatible-table)
98
- *
99
- * @param {ContactInterface} [to] the contact which need to add tag
100
- * @returns {Promise<void>}
101
- * @example
102
- * await tag.add(contact)
103
- */
104
- async add(to) {
105
- log.verbose('Tag', 'add(%s) for %s', to, this.id);
106
- /**
107
- * Huan(202110): TODO: refactory this design:
108
- * 1. we should not pass `typeof ContactImpl` as argument
109
- * 2. use instanceof to check the type of `to`
110
- */
47
+ async contactList() {
48
+ log.verbose('Tag', 'contactList() for tag id: %s', this.id());
49
+ const contactIds = await this.wechaty.puppet.tagTagContactList(this.groupId(), this.id());
50
+ const contactPromises = contactIds.map(id => this.wechaty.Contact.find({ id }));
51
+ return Promise.all(contactPromises);
52
+ }
53
+ async tag(contact) {
54
+ log.verbose('Tag', 'tag(%s) for tag id: %s', contact, this.id());
55
+ const contactId = contact.id;
56
+ await this.wechaty.puppet.tagContactTagAdd(this.groupId(), this.id(), contactId);
57
+ }
58
+ static async createTag(tagGroupId, name) {
59
+ log.verbose('Tag', 'createTag(%s, %s)', tagGroupId, name);
111
60
  try {
112
- if (ContactImpl.valid(to)) {
113
- await this.wechaty.puppet.tagContactAdd(this.id, to.id);
114
- }
115
- else if (FavoriteImpl.valid(to)) {
116
- // TODO: await this.wechaty.puppet.tagAddFavorite(this.tag, to.id)
61
+ const payload = await this.wechaty.puppet.tagTagAdd(tagGroupId, name);
62
+ if (payload) {
63
+ return new this(payload);
117
64
  }
118
65
  }
119
66
  catch (e) {
120
67
  this.wechaty.emitError(e);
121
- log.error('Tag', 'add() exception: %s', e.message);
122
- throw new Error(`add error : ${e}`);
68
+ log.error('Contact', 'createTag() exception: %s', e.message);
123
69
  }
124
70
  }
125
- /**
126
- * Remove this tag from Contact/Favorite
127
- *
128
- * > Tips:
129
- * This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/Chatie/wechaty/wiki/Puppet#3-puppet-compatible-table)
130
- *
131
- * @returns {Promise<void>}
132
- * @example
133
- * await tag.remove(contact)
134
- */
135
- async remove(from) {
136
- log.verbose('Tag', 'remove(%s) for %s', from, this.id);
137
- /**
138
- * Huan(202110): TODO: refactory this design:
139
- * 1. we should not pass `typeof ContactImpl` as argument
140
- * 2. use instanceof to check the type of `to`
141
- */
71
+ static async deleteTag(tag) {
72
+ log.verbose('Tag', 'deleteTag(%s, %s)', tag);
142
73
  try {
143
- if (from instanceof ContactImpl) {
144
- await this.wechaty.puppet.tagContactRemove(this.id, from.id);
145
- }
146
- else if (from instanceof FavoriteImpl) {
147
- // TODO await this.wechaty.puppet.tagRemoveFavorite(this.tag, from.id)
148
- }
74
+ await this.wechaty.puppet.tagTagDelete(tag.groupId(), tag.id());
149
75
  }
150
76
  catch (e) {
151
77
  this.wechaty.emitError(e);
152
- log.error('Tag', 'remove() exception: %s', e.message);
153
- throw new Error(`remove error : ${e}`);
78
+ log.error('Contact', 'deleteTag() exception: %s', e.message);
154
79
  }
155
80
  }
156
81
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tag.js","sourceRoot":"","sources":["../../../../src/user-modules/tag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,GAAG,GACJ,MAA0B,sBAAsB,CAAA;AAIjD,OAAO,EAAoB,WAAW,EAAE,MAAO,cAAc,CAAA;AAC7D,OAAO,EAAqB,YAAY,EAAE,MAAM,eAAe,CAAA;AAE/D,OAAO,EACL,YAAY,GACb,MAA0B,2BAA2B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EACL,kBAAkB,GACnB,MAA0B,6BAA6B,CAAA;AAExD,MAAM,SAAS,GAAG,YAAY,CAC5B,kBAAkB,EAAE,CACrB,EAAgB,CAAA;AAEjB,MAAM,QAAS,SAAQ,SAAS;IAMZ;IAJlB;;OAEG;IACH,YACkB,EAAU;QAE1B,KAAK,EAAE,CAAA;QAFS,OAAE,GAAF,EAAE,CAAQ;QAG1B,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,CAAC,CAAA;IACxC,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,CACd,GAAW;QAEX,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,CAAA;QAClC,OAAO,IAAI,CAAC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H,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,SAAS,CAAE,GAAiB;QACvC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,CAAC,CAAA;QAE5C,IAAI;YACF,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAA;SAChE;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;YACzB,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,2BAA2B,EAAG,CAAW,CAAC,OAAO,CAAC,CAAA;SACxE;IACH,CAAC;CAEF;AAED,MAAM,OAAQ,SAAQ,eAAe,CAAC,QAAQ,CAAC,EAAgB;CAAG;AAYlE,OAAO,EACL,OAAO,GACR,CAAA"}
@@ -26,7 +26,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
26
26
  init: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
27
27
  start: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
28
28
  stop: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
29
- on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan", listener: (...args: any[]) => any): any;
29
+ on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "update", listener: (...args: any[]) => any): any;
30
30
  addListener<E extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E]): any;
31
31
  once<E_1 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_1, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_1]): any;
32
32
  prependListener<E_2 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_2, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_2]): any;
@@ -67,12 +67,12 @@ declare const mixinBase: (abstract new (...args: any[]) => {
67
67
  __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined;
68
68
  __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined;
69
69
  __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined;
70
+ __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined;
70
71
  __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined;
71
72
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
72
73
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
73
74
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
74
75
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
75
- readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
76
76
  /**
77
77
  * Main bot class.
78
78
  *
@@ -96,6 +96,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
96
96
  * bot.on('message', message => console.log(`Message: ${message}`))
97
97
  * bot.start()
98
98
  */
99
+ readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
99
100
  readonly Image: import("../user-modules/image.js").ImageConstructor;
100
101
  readonly Location: import("../user-modules/location.js").LocationConstructor;
101
102
  readonly Message: import("../user-modules/message.js").MessageConstructor;
@@ -104,6 +105,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
104
105
  readonly Room: import("../user-modules/room.js").RoomConstructor;
105
106
  readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor;
106
107
  readonly Tag: import("../user-modules/tag.js").TagConstructor;
108
+ readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor;
107
109
  readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor;
108
110
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
109
111
  __io?: import("../io.js").Io | undefined;
@@ -125,7 +127,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
125
127
  init: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
126
128
  start: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
127
129
  stop: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
128
- on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan", listener: (...args: any[]) => any): any;
130
+ on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "update", listener: (...args: any[]) => any): any;
129
131
  addListener<E_11 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_11, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_11]): any;
130
132
  once<E_12 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_12, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_12]): any;
131
133
  prependListener<E_13 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_13, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_13]): any;
@@ -159,12 +161,12 @@ declare const mixinBase: (abstract new (...args: any[]) => {
159
161
  __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined;
160
162
  __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined;
161
163
  __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined;
164
+ __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined;
162
165
  __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined;
163
166
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
164
167
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
165
168
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
166
169
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
167
- readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
168
170
  /**
169
171
  * Main bot class.
170
172
  *
@@ -188,6 +190,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
188
190
  * bot.on('message', message => console.log(`Message: ${message}`))
189
191
  * bot.start()
190
192
  */
193
+ readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
191
194
  readonly Image: import("../user-modules/image.js").ImageConstructor;
192
195
  readonly Location: import("../user-modules/location.js").LocationConstructor;
193
196
  readonly Message: import("../user-modules/message.js").MessageConstructor;
@@ -196,6 +199,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
196
199
  readonly Room: import("../user-modules/room.js").RoomConstructor;
197
200
  readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor;
198
201
  readonly Tag: import("../user-modules/tag.js").TagConstructor;
202
+ readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor;
199
203
  readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor;
200
204
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
201
205
  wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync;
@@ -221,7 +225,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
221
225
  __options: WechatyOptions;
222
226
  start: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
223
227
  stop: (() => Promise<void>) & (() => Promise<void>) & (() => Promise<void>);
224
- on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan", listener: (...args: any[]) => any): any;
228
+ on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "update", listener: (...args: any[]) => any): any;
225
229
  addListener<E_18 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_18, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_18]): any;
226
230
  once<E_19 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_19, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_19]): any;
227
231
  prependListener<E_20 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_20, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_20]): any;
@@ -255,12 +259,12 @@ declare const mixinBase: (abstract new (...args: any[]) => {
255
259
  __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined;
256
260
  __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined;
257
261
  __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined;
262
+ __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined;
258
263
  __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined;
259
264
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
260
265
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
261
266
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
262
267
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
263
- readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
264
268
  /**
265
269
  * Main bot class.
266
270
  *
@@ -284,6 +288,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
284
288
  * bot.on('message', message => console.log(`Message: ${message}`))
285
289
  * bot.start()
286
290
  */
291
+ readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
287
292
  readonly Image: import("../user-modules/image.js").ImageConstructor;
288
293
  readonly Location: import("../user-modules/location.js").LocationConstructor;
289
294
  readonly Message: import("../user-modules/message.js").MessageConstructor;
@@ -292,6 +297,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
292
297
  readonly Room: import("../user-modules/room.js").RoomConstructor;
293
298
  readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor;
294
299
  readonly Tag: import("../user-modules/tag.js").TagConstructor;
300
+ readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor;
295
301
  readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor;
296
302
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
297
303
  wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync;
@@ -323,12 +329,12 @@ declare const mixinBase: (abstract new (...args: any[]) => {
323
329
  __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined;
324
330
  __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined;
325
331
  __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined;
332
+ __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined;
326
333
  __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined;
327
334
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
328
335
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
329
336
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
330
337
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
331
- readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
332
338
  /**
333
339
  * Main bot class.
334
340
  *
@@ -352,6 +358,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
352
358
  * bot.on('message', message => console.log(`Message: ${message}`))
353
359
  * bot.start()
354
360
  */
361
+ readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
355
362
  readonly Image: import("../user-modules/image.js").ImageConstructor;
356
363
  readonly Location: import("../user-modules/location.js").LocationConstructor;
357
364
  readonly Message: import("../user-modules/message.js").MessageConstructor;
@@ -360,6 +367,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
360
367
  readonly Room: import("../user-modules/room.js").RoomConstructor;
361
368
  readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor;
362
369
  readonly Tag: import("../user-modules/tag.js").TagConstructor;
370
+ readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor;
363
371
  readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor;
364
372
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
365
373
  readonly log: import("brolog/dist/esm/src/logger.js").Loggable;
@@ -367,7 +375,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
367
375
  __memory?: import("memory-card").MemoryCard | undefined;
368
376
  readonly memory: import("memory-card").MemoryCard;
369
377
  __options: WechatyOptions;
370
- on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan", listener: (...args: any[]) => any): any;
378
+ on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "update", listener: (...args: any[]) => any): any;
371
379
  addListener<E_25 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_25, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_25]): any;
372
380
  once<E_26 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_26, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_26]): any;
373
381
  prependListener<E_27 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_27, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_27]): any;
@@ -402,7 +410,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
402
410
  readonly memory: import("memory-card").MemoryCard;
403
411
  __options: WechatyOptions;
404
412
  init(): Promise<void>;
405
- on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan", listener: (...args: any[]) => any): any;
413
+ on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "update", listener: (...args: any[]) => any): any;
406
414
  addListener<E_32 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_32, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_32]): any;
407
415
  once<E_33 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_33, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_33]): any;
408
416
  prependListener<E_34 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_34, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_34]): any;
@@ -435,12 +443,12 @@ declare const mixinBase: (abstract new (...args: any[]) => {
435
443
  __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined;
436
444
  __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined;
437
445
  __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined;
446
+ __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined;
438
447
  __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined;
439
448
  __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined;
440
449
  readonly Contact: import("../user-modules/contact.js").ContactConstructor;
441
450
  readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor;
442
451
  readonly Delay: import("../user-modules/delay.js").DelayConstructor;
443
- readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
444
452
  /**
445
453
  * Main bot class.
446
454
  *
@@ -464,6 +472,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
464
472
  * bot.on('message', message => console.log(`Message: ${message}`))
465
473
  * bot.start()
466
474
  */
475
+ readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor;
467
476
  readonly Image: import("../user-modules/image.js").ImageConstructor;
468
477
  readonly Location: import("../user-modules/location.js").LocationConstructor;
469
478
  readonly Message: import("../user-modules/message.js").MessageConstructor;
@@ -472,6 +481,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
472
481
  readonly Room: import("../user-modules/room.js").RoomConstructor;
473
482
  readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor;
474
483
  readonly Tag: import("../user-modules/tag.js").TagConstructor;
484
+ readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor;
475
485
  readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor;
476
486
  readonly Channel: import("../user-modules/channel.js").ChannelConstructor;
477
487
  init(): Promise<void>;
@@ -482,7 +492,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
482
492
  __options: WechatyOptions;
483
493
  start(): Promise<void>;
484
494
  stop(): Promise<void>;
485
- on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan", listener: (...args: any[]) => any): any;
495
+ on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "update", listener: (...args: any[]) => any): any;
486
496
  addListener<E_39 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_39, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_39]): any;
487
497
  once<E_40 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_40, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_40]): any;
488
498
  prependListener<E_41 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_41, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_41]): any;
@@ -512,7 +522,7 @@ declare const mixinBase: (abstract new (...args: any[]) => {
512
522
  init(): Promise<void>;
513
523
  start(): Promise<void>;
514
524
  stop(): Promise<void>;
515
- on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan", listener: (...args: any[]) => any): any;
525
+ on(event: "error" | "ready" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "update", listener: (...args: any[]) => any): any;
516
526
  addListener<E_46 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_46, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_46]): any;
517
527
  once<E_47 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_47, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_47]): any;
518
528
  prependListener<E_48 extends keyof import("../schemas/wechaty-events.js").WechatyEventListeners>(event: E_48, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_48]): any;
@@ -1 +1 @@
1
- {"version":3,"file":"wechaty-base.d.ts","sourceRoot":"","sources":["../../../../src/wechaty/wechaty-base.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,KAAK,MAAM,MAAM,sBAAsB,CAAA;AAQnD,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,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OAAO,EACL,WAAW,GACZ,CAAA"}
@@ -19,6 +19,7 @@ test('Wechaty interface', async (t) => {
19
19
  Room;
20
20
  RoomInvitation;
21
21
  Tag;
22
+ TagGroup;
22
23
  UrlLink;
23
24
  Channel;
24
25
  constructor() {
@@ -36,9 +37,10 @@ test('Wechaty interface', async (t) => {
36
37
  = this.Room
37
38
  = this.RoomInvitation
38
39
  = this.Tag
39
- = this.UrlLink
40
- = this.Channel
41
- = {};
40
+ = this.TagGroup
41
+ = this.UrlLink
42
+ = this.Channel
43
+ = {};
42
44
  }
43
45
  }
44
46
  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;AAoBlE,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,CAA4B;QAChC,cAAc,CAA4B;QAC1C,GAAG,CAA4B;QAC/B,OAAO,CAA4B;QACnC,OAAO,CAA4B;QAEnC;YACE,KAAK,EAAE,CAAA;YACP,cAAc;YACd,IAAI,CAAC,OAAO;kBACR,IAAI,CAAC,WAAW;sBAChB,IAAI,CAAC,KAAK;0BACV,IAAI,CAAC,UAAU;8BACf,IAAI,CAAC,KAAK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