@genuxofficial/baileys 2.0.0 → 4.0.0

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 (108) hide show
  1. package/WAProto/WAProto.proto +4451 -0
  2. package/WAProto/index.d.ts +219 -2233
  3. package/WAProto/index.js +525 -6773
  4. package/WAProto/shizo.x +1 -0
  5. package/engine-requirements.js +1 -1
  6. package/lib/Defaults/baileys-version.json +1 -1
  7. package/lib/Defaults/index.d.ts +236 -3
  8. package/lib/Defaults/index.js +24 -8
  9. package/lib/Defaults/phonenumber-mcc.json +223 -0
  10. package/lib/Signal/libsignal.js +9 -18
  11. package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +2 -0
  12. package/lib/Socket/Client/index.d.ts +3 -2
  13. package/lib/Socket/Client/index.js +3 -2
  14. package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
  15. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  16. package/lib/Socket/Client/{websocket.d.ts → web-socket-client.d.ts} +1 -1
  17. package/lib/Socket/Client/{websocket.js → web-socket-client.js} +3 -3
  18. package/lib/Socket/business.d.ts +43 -43
  19. package/lib/Socket/chats.d.ts +17 -23
  20. package/lib/Socket/chats.js +9 -123
  21. package/lib/Socket/groups.d.ts +27 -32
  22. package/lib/Socket/groups.js +5 -18
  23. package/lib/Socket/index.d.ts +51 -49
  24. package/lib/Socket/index.js +2 -2
  25. package/lib/Socket/messages-recv.d.ts +41 -42
  26. package/lib/Socket/messages-recv.js +20 -39
  27. package/lib/Socket/messages-send.d.ts +33 -38
  28. package/lib/Socket/messages-send.js +16 -37
  29. package/lib/Socket/newsletter.d.ts +30 -35
  30. package/lib/Socket/newsletter.js +22 -26
  31. package/lib/Socket/registration.d.ts +271 -0
  32. package/lib/Socket/registration.js +166 -0
  33. package/lib/Socket/socket.d.ts +10 -9
  34. package/lib/Socket/socket.js +19 -16
  35. package/lib/Socket/usync.d.ts +12 -10
  36. package/lib/Socket/usync.js +15 -10
  37. package/lib/Store/index.d.ts +2 -1
  38. package/lib/Store/index.js +3 -1
  39. package/lib/Store/make-in-memory-store.d.ts +1 -1
  40. package/lib/Store/make-in-memory-store.js +10 -8
  41. package/lib/Store/make-ordered-dictionary.d.ts +1 -1
  42. package/lib/Store/make-ordered-dictionary.js +2 -2
  43. package/lib/Types/Auth.d.ts +8 -0
  44. package/lib/Types/Chat.d.ts +2 -12
  45. package/lib/Types/Contact.d.ts +1 -6
  46. package/lib/Types/GroupMetadata.d.ts +0 -7
  47. package/lib/Types/Label.d.ts +0 -11
  48. package/lib/Types/Label.js +1 -1
  49. package/lib/Types/LabelAssociation.js +1 -1
  50. package/lib/Types/Message.d.ts +8 -7
  51. package/lib/Types/Message.js +2 -0
  52. package/lib/Types/Newsletter.js +2 -2
  53. package/lib/Types/Socket.d.ts +6 -7
  54. package/lib/Types/index.js +1 -1
  55. package/lib/Utils/auth-utils.d.ts +1 -1
  56. package/lib/Utils/auth-utils.js +12 -5
  57. package/lib/Utils/business.js +2 -2
  58. package/lib/Utils/chat-utils.d.ts +13 -11
  59. package/lib/Utils/chat-utils.js +2 -28
  60. package/lib/Utils/crypto.d.ts +16 -14
  61. package/lib/Utils/crypto.js +22 -34
  62. package/lib/Utils/decode-wa-message.d.ts +2 -4
  63. package/lib/Utils/decode-wa-message.js +24 -160
  64. package/lib/Utils/event-buffer.js +6 -4
  65. package/lib/Utils/generics.d.ts +12 -40
  66. package/lib/Utils/generics.js +25 -103
  67. package/lib/Utils/link-preview.js +1 -34
  68. package/lib/Utils/lt-hash.d.ts +3 -3
  69. package/lib/Utils/lt-hash.js +45 -11
  70. package/lib/Utils/make-mutex.d.ts +2 -2
  71. package/lib/Utils/messages-media.d.ts +16 -26
  72. package/lib/Utils/messages-media.js +26 -102
  73. package/lib/Utils/messages.d.ts +8 -5
  74. package/lib/Utils/messages.js +15 -17
  75. package/lib/Utils/noise-handler.d.ts +8 -5
  76. package/lib/Utils/noise-handler.js +10 -5
  77. package/lib/Utils/process-message.js +2 -2
  78. package/lib/Utils/use-multi-file-auth-state.js +11 -48
  79. package/lib/Utils/validate-connection.d.ts +3 -2
  80. package/lib/Utils/validate-connection.js +44 -10
  81. package/lib/WABinary/constants.js +5 -5
  82. package/lib/WABinary/decode.d.ts +4 -2
  83. package/lib/WABinary/decode.js +7 -17
  84. package/lib/WABinary/encode.d.ts +3 -1
  85. package/lib/WABinary/encode.js +17 -40
  86. package/lib/WABinary/generic-utils.d.ts +3 -1
  87. package/lib/WABinary/generic-utils.js +2 -2
  88. package/lib/WABinary/jid-utils.d.ts +3 -8
  89. package/lib/WABinary/jid-utils.js +2 -23
  90. package/lib/WAM/BinaryInfo.d.ts +12 -2
  91. package/lib/WAM/constants.d.ts +2 -3
  92. package/lib/WAM/encode.d.ts +3 -1
  93. package/lib/WAM/encode.js +2 -2
  94. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  95. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +2 -2
  96. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
  97. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +5 -5
  98. package/lib/WAUSync/USyncQuery.d.ts +0 -2
  99. package/lib/WAUSync/USyncQuery.js +13 -27
  100. package/lib/WAUSync/USyncUser.d.ts +0 -2
  101. package/lib/WAUSync/USyncUser.js +0 -4
  102. package/package.json +60 -55
  103. package/LICENSE +0 -21
  104. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -25
  105. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +0 -53
  106. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -8
  107. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +0 -24
  108. /package/lib/Socket/Client/{types.js → abstract-socket-client.js} +0 -0
@@ -9,20 +9,20 @@ class USyncStatusProtocol {
9
9
  getQueryElement() {
10
10
  return {
11
11
  tag: 'status',
12
- attrs: {}
12
+ attrs: {},
13
13
  };
14
14
  }
15
15
  getUserElement() {
16
16
  return null;
17
17
  }
18
18
  parser(node) {
19
- var _a, _b, _c;
19
+ var _a;
20
20
  if (node.tag === 'status') {
21
21
  (0, WABinary_1.assertNodeErrorFree)(node);
22
- let status = (_b = (_a = node === null || node === void 0 ? void 0 : node.content) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null;
22
+ let status = node === null || node === void 0 ? void 0 : node.content.toString();
23
23
  const setAt = new Date(+((node === null || node === void 0 ? void 0 : node.attrs.t) || 0) * 1000);
24
24
  if (!status) {
25
- if (+((_c = node.attrs) === null || _c === void 0 ? void 0 : _c.code) === 401) {
25
+ if (+((_a = node.attrs) === null || _a === void 0 ? void 0 : _a.code) === 401) {
26
26
  status = '';
27
27
  }
28
28
  else {
@@ -34,7 +34,7 @@ class USyncStatusProtocol {
34
34
  }
35
35
  return {
36
36
  status,
37
- setAt
37
+ setAt,
38
38
  };
39
39
  }
40
40
  }
@@ -23,6 +23,4 @@ export declare class USyncQuery {
23
23
  withContactProtocol(): this;
24
24
  withStatusProtocol(): this;
25
25
  withDisappearingModeProtocol(): this;
26
- withBotProfileProtocol(): this;
27
- withLIDProtocol(): this;
28
26
  }
@@ -2,8 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.USyncQuery = void 0;
4
4
  const WABinary_1 = require("../WABinary");
5
- const UsyncBotProfileProtocol_1 = require("./Protocols/UsyncBotProfileProtocol");
6
- const UsyncLIDProtocol_1 = require("./Protocols/UsyncLIDProtocol");
7
5
  const Protocols_1 = require("./Protocols");
8
6
  class USyncQuery {
9
7
  constructor() {
@@ -28,13 +26,13 @@ class USyncQuery {
28
26
  if (result.attrs.type !== 'result') {
29
27
  return;
30
28
  }
31
- const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
29
+ const protocolMap = Object.fromEntries(this.protocols.map((protocol) => {
32
30
  return [protocol.name, protocol.parser];
33
31
  }));
34
32
  const queryResult = {
35
33
  // TODO: implement errors etc.
36
34
  list: [],
37
- sideList: []
35
+ sideList: [],
38
36
  };
39
37
  const usyncNode = (0, WABinary_1.getBinaryNodeChild)(result, 'usync');
40
38
  //TODO: implement error backoff, refresh etc.
@@ -42,22 +40,18 @@ class USyncQuery {
42
40
  //const resultNode = getBinaryNodeChild(usyncNode, 'result')
43
41
  const listNode = (0, WABinary_1.getBinaryNodeChild)(usyncNode, 'list');
44
42
  if (Array.isArray(listNode === null || listNode === void 0 ? void 0 : listNode.content) && typeof listNode !== 'undefined') {
45
- queryResult.list = listNode.content.map(node => {
43
+ queryResult.list = listNode.content.map((node) => {
46
44
  const id = node === null || node === void 0 ? void 0 : node.attrs.jid;
47
- const data = Array.isArray(node === null || node === void 0 ? void 0 : node.content)
48
- ? Object.fromEntries(node.content
49
- .map(content => {
50
- const protocol = content.tag;
51
- const parser = protocolMap[protocol];
52
- if (parser) {
53
- return [protocol, parser(content)];
54
- }
55
- else {
56
- return [protocol, null];
57
- }
58
- })
59
- .filter(([, b]) => b !== null))
60
- : {};
45
+ const data = Array.isArray(node === null || node === void 0 ? void 0 : node.content) ? Object.fromEntries(node.content.map((content) => {
46
+ const protocol = content.tag;
47
+ const parser = protocolMap[protocol];
48
+ if (parser) {
49
+ return [protocol, parser(content)];
50
+ }
51
+ else {
52
+ return [protocol, null];
53
+ }
54
+ }).filter(([, b]) => b !== null)) : {};
61
55
  return { ...data, id };
62
56
  });
63
57
  }
@@ -81,13 +75,5 @@ class USyncQuery {
81
75
  this.protocols.push(new Protocols_1.USyncDisappearingModeProtocol());
82
76
  return this;
83
77
  }
84
- withBotProfileProtocol() {
85
- this.protocols.push(new UsyncBotProfileProtocol_1.USyncBotProfileProtocol());
86
- return this;
87
- }
88
- withLIDProtocol() {
89
- this.protocols.push(new UsyncLIDProtocol_1.USyncLIDProtocol());
90
- return this;
91
- }
92
78
  }
93
79
  exports.USyncQuery = USyncQuery;
@@ -3,10 +3,8 @@ export declare class USyncUser {
3
3
  lid: string;
4
4
  phone: string;
5
5
  type: string;
6
- personaId: string;
7
6
  withId(id: string): this;
8
7
  withLid(lid: string): this;
9
8
  withPhone(phone: string): this;
10
9
  withType(type: string): this;
11
- withPersonaId(personaId: string): this;
12
10
  }
@@ -18,9 +18,5 @@ class USyncUser {
18
18
  this.type = type;
19
19
  return this;
20
20
  }
21
- withPersonaId(personaId) {
22
- this.personaId = personaId;
23
- return this;
24
- }
25
21
  }
26
22
  exports.USyncUser = USyncUser;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genuxofficial/baileys",
3
- "version": "2.0.0",
4
- "description": "Custom Baileys WhatsApp API",
3
+ "version": "4.0.0",
4
+ "description": "WhatsApp API",
5
5
  "keywords": [
6
6
  "baileys",
7
7
  "baileys-mod",
@@ -16,91 +16,96 @@
16
16
  ],
17
17
  "homepage": "https://github.com/genux-official/Baileys",
18
18
  "repository": {
19
- "url": "git+ssh://git@github.com/genux-official/Baileys.git"
19
+ "url": "https://github.com/genux-official/Baileys.git"
20
20
  },
21
21
  "license": "MIT",
22
- "author": "Genux Official",
22
+ "author": "Yugesh Singh",
23
23
  "main": "lib/index.js",
24
24
  "types": "lib/index.d.ts",
25
25
  "files": [
26
26
  "lib/*",
27
- "WAProto/*.ts",
28
- "WAProto/*.js",
27
+ "WAProto/*",
29
28
  "WASignalGroup/*.js",
30
29
  "engine-requirements.js"
31
30
  ],
31
+ "scripts": {
32
+ "build:all": "tsc && typedoc",
33
+ "build:docs": "typedoc",
34
+ "build:tsc": "tsc",
35
+ "changelog:last": "conventional-changelog -p angular -r 2",
36
+ "changelog:preview": "conventional-changelog -p angular -u",
37
+ "changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
38
+ "example": "node --inspect -r ts-node/register Example/example.ts",
39
+ "example:mobile": "node --inspect -r ts-node/register Example/example.ts --mobile",
40
+ "gen:protobuf": "sh WAProto/GenerateStatics.sh",
41
+ "lint": "eslint src --ext .js,.ts,.jsx,.tsx",
42
+ "lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
43
+ "prepack": "tsc",
44
+ "prepare": "tsc",
45
+ "release": "release-it",
46
+ "test": "jest"
47
+ },
32
48
  "dependencies": {
33
49
  "@adiwajshing/keyed-db": "^0.2.4",
34
- "@cacheable/node-cache": "^1.4.0",
35
- "@queenanya/eslint-config": "github:whiskeysockets/eslint-config",
36
- "@hapi/boom": "^10.0.1",
50
+ "@hapi/boom": "^9.1.3",
37
51
  "async-lock": "^1.4.1",
38
- "async-mutex": "^0.5.0",
39
52
  "audio-decode": "^2.1.3",
40
- "axios": "^1.7.3",
53
+ "axios": "^1.6.0",
41
54
  "cache-manager": "^5.7.6",
42
- "libsignal": "npm:@queenanya/libsignal@latest",
55
+ "libphonenumber-js": "^1.10.20",
56
+ "libsignal": "https://github.com/shizo-devs/libsignal-node.git",
43
57
  "lodash": "^4.17.21",
44
58
  "music-metadata": "^7.12.3",
59
+ "@cacheable/node-cache": "^1.4.0",
45
60
  "pino": "^9.6",
46
- "protobufjs": "^7.2.4",
47
- "qrcode-terminal": "0.12.x",
48
- "ws": "^8.18.0"
61
+ "protobufjs": "^6.11.3",
62
+ "uuid": "^10.0.0",
63
+ "ws": "^8.13.0"
49
64
  },
50
65
  "devDependencies": {
51
- "@types/jest": "^29.5.12",
52
- "@types/node": "^20.14.10",
53
- "@types/ws": "^8.5.11",
54
- "conventional-changelog-cli": "^5.0.0",
55
- "eslint": "^9.7.0",
56
- "jest": "^29.7.0",
57
- "jimp": "^0.22.12",
66
+ "@adiwajshing/eslint-config": "https://github.com/adiwajshing/eslint-config.git",
67
+ "@types/got": "^9.6.11",
68
+ "@types/jest": "^27.5.1",
69
+ "@types/node": "^16.0.0",
70
+ "@types/sharp": "^0.29.4",
71
+ "@types/ws": "^8.0.0",
72
+ "conventional-changelog-cli": "^2.2.2",
73
+ "eslint": "^8.0.0",
74
+ "jest": "^27.0.6",
75
+ "jimp": "^0.16.1",
58
76
  "json": "^11.0.0",
59
- "link-preview-js": "^3.0.5",
60
- "open": "^10.1.0",
61
- "protobufjs-cli": "^1.1.3",
62
- "release-it": "^17.6.0",
63
- "sharp": "^0.33.4",
64
- "ts-jest": "^29.2.2",
65
- "ts-node": "^10.9.2",
66
- "typedoc": "^0.27.9",
67
- "typedoc-plugin-markdown": "4.4.2",
68
- "typescript": "^5.8.2"
77
+ "link-preview-js": "^3.0.0",
78
+ "open": "^8.4.2",
79
+ "qrcode-terminal": "^0.12.0",
80
+ "release-it": "^15.10.3",
81
+ "sharp": "^0.32.6",
82
+ "ts-jest": "^27.0.3",
83
+ "ts-node": "^10.8.1",
84
+ "typedoc": "^0.24.7",
85
+ "typescript": "^4.6.4"
69
86
  },
70
87
  "peerDependencies": {
71
- "audio-decode": "^2.1.3",
72
- "jimp": "^0.22.12",
73
- "link-preview-js": "^3.0.5",
88
+ "jimp": "^0.16.1",
89
+ "link-preview-js": "^3.0.0",
74
90
  "qrcode-terminal": "^0.12.0",
75
- "sharp": "^0.34.1"
91
+ "sharp": "^0.32.6"
76
92
  },
77
93
  "peerDependenciesMeta": {
78
- "audio-decode": {
79
- "optional": true
80
- },
81
94
  "jimp": {
82
95
  "optional": true
83
96
  },
84
97
  "link-preview-js": {
85
98
  "optional": true
86
99
  },
100
+ "qrcode-terminal": {
101
+ "optional": true
102
+ },
87
103
  "sharp": {
88
104
  "optional": true
89
105
  }
90
106
  },
91
- "scripts": {
92
- "build:all": "tsc && typedoc",
93
- "build:docs": "typedoc",
94
- "build:tsc": "tsc",
95
- "changelog:last": "conventional-changelog -p angular -r 2",
96
- "changelog:preview": "conventional-changelog -p angular -u",
97
- "changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
98
- "example": "node --inspect -r ts-node/register Example/example.ts",
99
- "gen:protobuf": "sh WAProto/GenerateStatics.sh",
100
- "lint": "eslint src --ext .js,.ts",
101
- "lint:fix": "yarn lint --fix",
102
- "preinstall": "node ./engine-requirements.js",
103
- "release": "release-it",
104
- "test": "jest"
105
- }
106
- }
107
+ "packageManager": "yarn@1.22.19",
108
+ "engines": {
109
+ "node": ">=20.0.0"
110
+ }
111
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Rajeh Taher/WhiskeySockets
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,25 +0,0 @@
1
- import { USyncQueryProtocol } from '../../Types/USync';
2
- import { BinaryNode } from '../../WABinary';
3
- import { USyncUser } from '../USyncUser';
4
- export type BotProfileCommand = {
5
- name: string;
6
- description: string;
7
- };
8
- export type BotProfileInfo = {
9
- jid: string;
10
- name: string;
11
- attributes: string;
12
- description: string;
13
- category: string;
14
- isDefault: boolean;
15
- prompts: string[];
16
- personaId: string;
17
- commands: BotProfileCommand[];
18
- commandsDescription: string;
19
- };
20
- export declare class USyncBotProfileProtocol implements USyncQueryProtocol {
21
- name: string;
22
- getQueryElement(): BinaryNode;
23
- getUserElement(user: USyncUser): BinaryNode;
24
- parser(node: BinaryNode): BotProfileInfo;
25
- }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.USyncBotProfileProtocol = void 0;
4
- const WABinary_1 = require("../../WABinary");
5
- class USyncBotProfileProtocol {
6
- constructor() {
7
- this.name = 'bot';
8
- }
9
- getQueryElement() {
10
- return {
11
- tag: 'bot',
12
- attrs: {},
13
- content: [{ tag: 'profile', attrs: { v: '1' } }]
14
- };
15
- }
16
- getUserElement(user) {
17
- return {
18
- tag: 'bot',
19
- attrs: {},
20
- content: [{ tag: 'profile', attrs: { persona_id: user.personaId } }]
21
- };
22
- }
23
- parser(node) {
24
- const botNode = (0, WABinary_1.getBinaryNodeChild)(node, 'bot');
25
- const profile = (0, WABinary_1.getBinaryNodeChild)(botNode, 'profile');
26
- const commandsNode = (0, WABinary_1.getBinaryNodeChild)(profile, 'commands');
27
- const promptsNode = (0, WABinary_1.getBinaryNodeChild)(profile, 'prompts');
28
- const commands = [];
29
- const prompts = [];
30
- for (const command of (0, WABinary_1.getBinaryNodeChildren)(commandsNode, 'command')) {
31
- commands.push({
32
- name: (0, WABinary_1.getBinaryNodeChildString)(command, 'name'),
33
- description: (0, WABinary_1.getBinaryNodeChildString)(command, 'description')
34
- });
35
- }
36
- for (const prompt of (0, WABinary_1.getBinaryNodeChildren)(promptsNode, 'prompt')) {
37
- prompts.push(`${(0, WABinary_1.getBinaryNodeChildString)(prompt, 'emoji')} ${(0, WABinary_1.getBinaryNodeChildString)(prompt, 'text')}`);
38
- }
39
- return {
40
- isDefault: !!(0, WABinary_1.getBinaryNodeChild)(profile, 'default'),
41
- jid: node.attrs.jid,
42
- name: (0, WABinary_1.getBinaryNodeChildString)(profile, 'name'),
43
- attributes: (0, WABinary_1.getBinaryNodeChildString)(profile, 'attributes'),
44
- description: (0, WABinary_1.getBinaryNodeChildString)(profile, 'description'),
45
- category: (0, WABinary_1.getBinaryNodeChildString)(profile, 'category'),
46
- personaId: profile.attrs['persona_id'],
47
- commandsDescription: (0, WABinary_1.getBinaryNodeChildString)(commandsNode, 'description'),
48
- commands,
49
- prompts
50
- };
51
- }
52
- }
53
- exports.USyncBotProfileProtocol = USyncBotProfileProtocol;
@@ -1,8 +0,0 @@
1
- import { USyncQueryProtocol } from '../../Types/USync';
2
- import { BinaryNode } from '../../WABinary';
3
- export declare class USyncLIDProtocol implements USyncQueryProtocol {
4
- name: string;
5
- getQueryElement(): BinaryNode;
6
- getUserElement(): null;
7
- parser(node: BinaryNode): string | null;
8
- }
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.USyncLIDProtocol = void 0;
4
- class USyncLIDProtocol {
5
- constructor() {
6
- this.name = 'lid';
7
- }
8
- getQueryElement() {
9
- return {
10
- tag: 'lid',
11
- attrs: {}
12
- };
13
- }
14
- getUserElement() {
15
- return null;
16
- }
17
- parser(node) {
18
- if (node.tag === 'lid') {
19
- return node.attrs.val;
20
- }
21
- return null;
22
- }
23
- }
24
- exports.USyncLIDProtocol = USyncLIDProtocol;