@baileys-md/baileys 12.0.1 → 12.2.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 (77) hide show
  1. package/LICENSE +21 -13
  2. package/WAProto/index.js +12 -1
  3. package/lib/Defaults/index.js +23 -13
  4. package/lib/KeyDB/BinarySearch.js +28 -18
  5. package/lib/KeyDB/KeyedDB.js +14 -3
  6. package/lib/KeyDB/index.js +12 -2
  7. package/lib/Signal/Group/ciphertext-message.js +12 -2
  8. package/lib/Signal/Group/group-session-builder.js +13 -2
  9. package/lib/Signal/Group/group_cipher.js +14 -4
  10. package/lib/Signal/Group/index.js +12 -2
  11. package/lib/Signal/Group/keyhelper.js +15 -4
  12. package/lib/Signal/Group/sender-chain-key.js +14 -4
  13. package/lib/Signal/Group/sender-key-distribution-message.js +14 -3
  14. package/lib/Signal/Group/sender-key-message.js +14 -4
  15. package/lib/Signal/Group/sender-key-name.js +15 -5
  16. package/lib/Signal/Group/sender-key-record.js +13 -3
  17. package/lib/Signal/Group/sender-key-state.js +13 -3
  18. package/lib/Signal/Group/sender-message-key.js +14 -4
  19. package/lib/Signal/libsignal.js +18 -7
  20. package/lib/Signal/lid-mapping.js +14 -3
  21. package/lib/Socket/Client/index.js +12 -2
  22. package/lib/Socket/Client/websocket.js +13 -3
  23. package/lib/Socket/index.js +13 -3
  24. package/lib/Socket/newsletter.js +10 -3
  25. package/lib/Socket/socket.js +15 -5
  26. package/lib/Store/index.js +13 -1
  27. package/lib/Types/Auth.js +12 -2
  28. package/lib/Types/Bussines.js +12 -2
  29. package/lib/Types/Call.js +12 -2
  30. package/lib/Types/Chat.js +12 -2
  31. package/lib/Types/Contact.js +12 -2
  32. package/lib/Types/Events.js +12 -2
  33. package/lib/Types/GroupMetadata.js +12 -2
  34. package/lib/Types/Label.js +22 -3
  35. package/lib/Types/LabelAssociation.js +12 -2
  36. package/lib/Types/Message.js +13 -3
  37. package/lib/Types/Newsletter.js +13 -3
  38. package/lib/Types/Product.js +12 -2
  39. package/lib/Types/Signal.js +12 -2
  40. package/lib/Types/Socket.js +12 -2
  41. package/lib/Types/State.js +13 -3
  42. package/lib/Types/USync.js +12 -2
  43. package/lib/Types/index.js +13 -3
  44. package/lib/Utils/auth-utils.js +15 -5
  45. package/lib/Utils/baileys-event-stream.js +14 -4
  46. package/lib/Utils/crypto.js +2 -2
  47. package/lib/Utils/index.js +12 -2
  48. package/lib/Utils/messages-media.js +58 -75
  49. package/lib/Utils/messages.js +5 -8
  50. package/lib/Utils/pre-key-manager.js +14 -4
  51. package/lib/Utils/process-message.js +20 -10
  52. package/lib/Utils/signal.js +22 -12
  53. package/lib/Utils/use-multi-file-auth-state.js +14 -4
  54. package/lib/Utils/validate-connection.js +22 -12
  55. package/lib/WABinary/constants.js +13 -3
  56. package/lib/WABinary/decode.js +16 -6
  57. package/lib/WABinary/encode.js +20 -10
  58. package/lib/WABinary/generic-utils.js +13 -1
  59. package/lib/WABinary/index.js +12 -2
  60. package/lib/WABinary/jid-utils.js +19 -9
  61. package/lib/WABinary/types.js +12 -2
  62. package/lib/WAM/BinaryInfo.js +12 -2
  63. package/lib/WAM/constants.js +12 -0
  64. package/lib/WAM/encode.js +18 -8
  65. package/lib/WAM/index.js +12 -2
  66. package/lib/WAUSync/Protocols/USyncContactProtocol.js +14 -4
  67. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +15 -4
  68. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +15 -4
  69. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +14 -3
  70. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +15 -4
  71. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +14 -3
  72. package/lib/WAUSync/Protocols/index.js +14 -3
  73. package/lib/WAUSync/USyncQuery.js +15 -4
  74. package/lib/WAUSync/USyncUser.js +14 -3
  75. package/lib/WAUSync/index.js +14 -3
  76. package/lib/index.js +14 -6
  77. package/package.json +43 -43
@@ -1,12 +1,23 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  import * as constants from "./constants.js";
3
14
  import { jidDecode } from "./jid-utils.js";
4
- //=======================================================//
15
+
5
16
  export const encodeBinaryNode = (node, opts = constants, buffer = [0]) => {
6
17
  const encoded = encodeBinaryNodeInner(node, opts, buffer);
7
18
  return Buffer.from(encoded);
8
19
  };
9
- //=======================================================//
20
+
10
21
  const encodeBinaryNodeInner = ({ tag, attrs, content }, opts, buffer) => {
11
22
  const { TAGS, TOKEN_MAP } = opts;
12
23
  const pushByte = (value) => buffer.push(value & 0xff);
@@ -27,7 +38,7 @@ const encodeBinaryNodeInner = ({ tag, attrs, content }, opts, buffer) => {
27
38
  const pushInt20 = (value) => pushBytes([(value >> 16) & 0x0f, (value >> 8) & 0xff, value & 0xff]);
28
39
  const writeByteLength = (length) => {
29
40
  if (length >= 4294967296) {
30
- throw new Error("string too large to encode: " + length);
41
+ throw new Error("string muito grande para codificar: " + length);
31
42
  }
32
43
  if (length >= 1 << 20) {
33
44
  pushByte(TAGS.BINARY_32);
@@ -77,7 +88,7 @@ const encodeBinaryNodeInner = ({ tag, attrs, content }, opts, buffer) => {
77
88
  if (char >= "0" && char <= "9") {
78
89
  return char.charCodeAt(0) - "0".charCodeAt(0);
79
90
  }
80
- throw new Error(`invalid byte for nibble "${char}"`);
91
+ throw new Error(`byte inválido para mordidela "${char}"`);
81
92
  }
82
93
  };
83
94
  const packHex = (char) => {
@@ -93,11 +104,11 @@ const encodeBinaryNodeInner = ({ tag, attrs, content }, opts, buffer) => {
93
104
  if (char === "\0") {
94
105
  return 15;
95
106
  }
96
- throw new Error(`Invalid hex char "${char}"`);
107
+ throw new Error(`Caractere hexadecimal inválido "${char}"`);
97
108
  };
98
109
  const writePackedBytes = (str, type) => {
99
110
  if (str.length > TAGS.PACKED_MAX) {
100
- throw new Error("Too many bytes to pack");
111
+ throw new Error("Muitos bytes para empacotar");
101
112
  }
102
113
  pushByte(type === "nibble" ? TAGS.NIBBLE_8 : TAGS.HEX_8);
103
114
  let roundedLength = Math.ceil(str.length / 2.0);
@@ -183,7 +194,7 @@ const encodeBinaryNodeInner = ({ tag, attrs, content }, opts, buffer) => {
183
194
  }
184
195
  };
185
196
  if (!tag) {
186
- throw new Error("Invalid node: tag cannot be undefined");
197
+ throw new Error(" inválido: a tag não pode ser indefinida");
187
198
  }
188
199
  const validAttributes = Object.keys(attrs || {}).filter(k => typeof attrs[k] !== "undefined" && attrs[k] !== null);
189
200
  writeListStart(2 * validAttributes.length + 1 + (typeof content !== "undefined" ? 1 : 0));
@@ -211,8 +222,7 @@ const encodeBinaryNodeInner = ({ tag, attrs, content }, opts, buffer) => {
211
222
  else if (typeof content === "undefined") {
212
223
  }
213
224
  else {
214
- throw new Error(`invalid children for header "${tag}": ${content} (${typeof content})`);
225
+ throw new Error(`filhos inválidos para cabeçalho "${tag}": ${content} (${typeof content})`);
215
226
  }
216
227
  return buffer;
217
228
  };
218
- //=======================================================//
@@ -1,3 +1,15 @@
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
1
13
  import { Boom } from '@hapi/boom';
2
14
  import { proto } from '../../WAProto/index.js';
3
15
  import {} from './types.js';
@@ -44,7 +56,7 @@ export const getBinaryNodeChildUInt = (node, childTag, length) => {
44
56
  export const assertNodeErrorFree = (node) => {
45
57
  const errNode = getBinaryNodeChild(node, 'error');
46
58
  if (errNode) {
47
- throw new Boom(errNode.attrs.text || 'Unknown error', { data: +errNode.attrs.code });
59
+ throw new Boom(errNode.attrs.text || 'Erro desconhecido', { data: +errNode.attrs.code });
48
60
  }
49
61
  };
50
62
  export const reduceBinaryNodeToDictionary = (node, tag) => {
@@ -1,7 +1,17 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  export * from "./generic-utils.js";
3
14
  export * from "./jid-utils.js";
4
15
  export * from "./encode.js";
5
16
  export * from "./decode.js";
6
17
  export * from "./types.js";
7
- //=======================================================//
@@ -1,11 +1,22 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  export const OFFICIAL_BIZ_JID = "16505361212@c.us";
3
14
  export const S_WHATSAPP_NET = "@s.whatsapp.net";
4
15
  export const STORIES_JID = "status@broadcast";
5
16
  export const META_AI_JID = "13135550002@c.us";
6
17
  export const SERVER_JID = "server@c.us";
7
18
  export const PSA_WID = "0@c.us";
8
- //=======================================================//
19
+
9
20
  export var WAJIDDomains;
10
21
  (function (WAJIDDomains) {
11
22
  WAJIDDomains[WAJIDDomains["WHATSAPP"] = 0] = "WHATSAPP";
@@ -26,11 +37,11 @@ export const getServerFromDomainType = (initialServer, domainType) => {
26
37
  return initialServer;
27
38
  }
28
39
  };
29
- //=======================================================//
40
+
30
41
  export const jidEncode = (user, server, device, agent) => {
31
42
  return `${user || ""}${!!agent ? `_${agent}` : ""}${!!device ? `:${device}` : ""}@${server}`;
32
43
  };
33
- //=======================================================//
44
+
34
45
  export const jidDecode = (jid) => {
35
46
  const sepIdx = typeof jid === "string" ? jid.indexOf("@") : -1;
36
47
  if (sepIdx < 0) {
@@ -60,7 +71,7 @@ export const jidDecode = (jid) => {
60
71
  device: device ? +device : undefined
61
72
  };
62
73
  };
63
- //=======================================================//
74
+
64
75
  export const areJidsSameUser = (jid1, jid2) => jidDecode(jid1)?.user === jidDecode(jid2)?.user;
65
76
  export const isJidMetaAI = (jid) => jid?.endsWith("@bot");
66
77
  export const isPnUser = (jid) => jid?.endsWith("@s.whatsapp.net");
@@ -71,9 +82,9 @@ export const isJidStatusBroadcast = (jid) => jid === "status@broadcast";
71
82
  export const isJidNewsletter = (jid) => jid?.endsWith("@newsletter");
72
83
  export const isHostedPnUser = (jid) => jid?.endsWith("@hosted");
73
84
  export const isHostedLidUser = (jid) => jid?.endsWith("@hosted.lid");
74
- //=======================================================//
85
+
75
86
  const botRegexp = /^1313555\d{4}$|^131655500\d{2}$/;
76
- //=======================================================//
87
+
77
88
  export const isJidBot = (jid) => jid && botRegexp.test(jid.split("@")[0]) && jid.endsWith("@c.us");
78
89
  export const jidNormalizedUser = (jid) => {
79
90
  const result = jidDecode(jid);
@@ -83,11 +94,10 @@ export const jidNormalizedUser = (jid) => {
83
94
  const { user, server } = result;
84
95
  return jidEncode(user, server === "c.us" ? "s.whatsapp.net" : server);
85
96
  };
86
- //=======================================================//
97
+
87
98
  export const transferDevice = (fromJid, toJid) => {
88
99
  const fromDecoded = jidDecode(fromJid);
89
100
  const deviceId = fromDecoded?.device || 0;
90
101
  const { server, user } = jidDecode(toJid);
91
102
  return jidEncode(user, server, deviceId);
92
103
  };
93
- //=======================================================//
@@ -1,3 +1,13 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  import * as constants from "./constants.js";
3
- //=======================================================//
@@ -1,4 +1,15 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  export class BinaryInfo {
3
14
  constructor(options = {}) {
4
15
  this.protocolVersion = 5;
@@ -8,4 +19,3 @@ export class BinaryInfo {
8
19
  Object.assign(this, options);
9
20
  }
10
21
  }
11
- //=======================================================//
@@ -1,3 +1,15 @@
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
1
13
  export const WEB_EVENTS = [
2
14
  {
3
15
  name: "WamDroppedEvent",
package/lib/WAM/encode.js CHANGED
@@ -1,7 +1,18 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, WEB_EVENTS, WEB_GLOBALS } from "./constants.js";
3
14
  import { BinaryInfo } from "./BinaryInfo.js";
4
- //=======================================================//
15
+
5
16
  const getHeaderBitLength = (key) => (key < 256 ? 2 : 3);
6
17
  export const encodeWAM = (binaryInfo) => {
7
18
  binaryInfo.buffer = [];
@@ -16,7 +27,7 @@ export const encodeWAM = (binaryInfo) => {
16
27
  }
17
28
  return buffer;
18
29
  };
19
- //=======================================================//
30
+
20
31
  function encodeWAMHeader(binaryInfo) {
21
32
  const headerBuffer = Buffer.alloc(8);
22
33
  headerBuffer.write("WAM", 0, "utf8");
@@ -26,7 +37,7 @@ function encodeWAMHeader(binaryInfo) {
26
37
  headerBuffer.writeUInt8(0, 7);
27
38
  binaryInfo.buffer.push(headerBuffer);
28
39
  }
29
- //=======================================================//
40
+
30
41
  function encodeGlobalAttributes(binaryInfo, globals) {
31
42
  for (const [key, _value] of Object.entries(globals)) {
32
43
  const id = WEB_GLOBALS.find(a => a?.name === key).id;
@@ -37,7 +48,7 @@ function encodeGlobalAttributes(binaryInfo, globals) {
37
48
  binaryInfo.buffer.push(serializeData(id, value, FLAG_GLOBAL));
38
49
  }
39
50
  }
40
- //=======================================================//
51
+
41
52
  function encodeEvents(binaryInfo) {
42
53
  for (const [name, { props, globals }] of binaryInfo.events.map(a => Object.entries(a)[0])) {
43
54
  encodeGlobalAttributes(binaryInfo, globals);
@@ -62,7 +73,7 @@ function encodeEvents(binaryInfo) {
62
73
  }
63
74
  }
64
75
  }
65
- //=======================================================//
76
+
66
77
  function serializeData(key, value, flag) {
67
78
  const bufferLength = getHeaderBitLength(key);
68
79
  let buffer;
@@ -135,7 +146,7 @@ function serializeData(key, value, flag) {
135
146
  }
136
147
  throw "missing";
137
148
  }
138
- //=======================================================//
149
+
139
150
  function serializeHeader(buffer, offset, key, flag) {
140
151
  if (key < 256) {
141
152
  buffer.writeUInt8(flag, offset);
@@ -151,4 +162,3 @@ function serializeHeader(buffer, offset, key, flag) {
151
162
  }
152
163
  return offset;
153
164
  }
154
- //=======================================================//
package/lib/WAM/index.js CHANGED
@@ -1,5 +1,15 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  export * from "./BinaryInfo.js";
3
14
  export * from "./constants.js";
4
15
  export * from "./encode.js";
5
- //=======================================================//
@@ -1,7 +1,18 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
2
13
  import { assertNodeErrorFree } from "../../WABinary/index.js";
3
14
  import { USyncUser } from "../USyncUser.js";
4
- //=======================================================//
15
+
5
16
  export class USyncContactProtocol {
6
17
  constructor() {
7
18
  this.name = "contact";
@@ -26,5 +37,4 @@ export class USyncContactProtocol {
26
37
  }
27
38
  return false;
28
39
  }
29
- }
30
- //=======================================================//
40
+ }
@@ -1,6 +1,18 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  import { assertNodeErrorFree, getBinaryNodeChild } from "../../WABinary/index.js";
3
- //=======================================================//
15
+
4
16
  export class USyncDeviceProtocol {
5
17
  constructor() {
6
18
  this.name = "devices";
@@ -49,5 +61,4 @@ export class USyncDeviceProtocol {
49
61
  keyIndex
50
62
  };
51
63
  }
52
- }
53
- //=======================================================//
64
+ }
@@ -1,6 +1,18 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  import { assertNodeErrorFree } from "../../WABinary/index.js";
3
- //=======================================================//
15
+
4
16
  export class USyncDisappearingModeProtocol {
5
17
  constructor() {
6
18
  this.name = "disappearing_mode";
@@ -25,5 +37,4 @@ export class USyncDisappearingModeProtocol {
25
37
  };
26
38
  }
27
39
  }
28
- }
29
- //=======================================================//
40
+ }
@@ -1,4 +1,16 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  import { assertNodeErrorFree } from "../../WABinary/index.js";
3
15
  export class USyncStatusProtocol {
4
16
  constructor() {
@@ -35,5 +47,4 @@ export class USyncStatusProtocol {
35
47
  };
36
48
  }
37
49
  }
38
- }
39
- //=======================================================//
50
+ }
@@ -1,7 +1,19 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from "../../WABinary/index.js";
3
15
  import { USyncUser } from "../USyncUser.js";
4
- //=======================================================//
16
+
5
17
  export class USyncBotProfileProtocol {
6
18
  constructor() {
7
19
  this.name = "bot";
@@ -49,5 +61,4 @@ export class USyncBotProfileProtocol {
49
61
  prompts
50
62
  };
51
63
  }
52
- }
53
- //=======================================================//
64
+ }
@@ -1,4 +1,16 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  export class USyncLIDProtocol {
3
15
  constructor() {
4
16
  this.name = "lid";
@@ -26,5 +38,4 @@ export class USyncLIDProtocol {
26
38
  }
27
39
  return null;
28
40
  }
29
- }
30
- //=======================================================//
41
+ }
@@ -1,6 +1,17 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  export * from "./USyncDisappearingModeProtocol.js";
3
15
  export * from "./USyncContactProtocol.js";
4
16
  export * from "./USyncDeviceProtocol.js";
5
- export * from "./USyncStatusProtocol.js";
6
- //=======================================================//
17
+ export * from "./USyncStatusProtocol.js";
@@ -1,10 +1,22 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  import { USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncStatusProtocol } from "./Protocols/index.js";
3
15
  import { USyncBotProfileProtocol } from "./Protocols/UsyncBotProfileProtocol.js";
4
16
  import { USyncLIDProtocol } from "./Protocols/UsyncLIDProtocol.js";
5
17
  import { getBinaryNodeChild } from "../WABinary/index.js";
6
18
  import { USyncUser } from "./USyncUser.js";
7
- //=======================================================//
19
+
8
20
  export class USyncQuery {
9
21
  constructor() {
10
22
  this.protocols = [];
@@ -86,5 +98,4 @@ export class USyncQuery {
86
98
  this.protocols.push(new USyncLIDProtocol());
87
99
  return this;
88
100
  }
89
- }
90
- //=======================================================//
101
+ }
@@ -1,4 +1,16 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  export class USyncUser {
3
15
  withId(id) {
4
16
  this.id = id;
@@ -20,5 +32,4 @@ export class USyncUser {
20
32
  this.personaId = personaId;
21
33
  return this;
22
34
  }
23
- }
24
- //=======================================================//
35
+ }
@@ -1,5 +1,16 @@
1
- //=======================================================//
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
13
+
2
14
  export * from "./Protocols/index.js";
3
15
  export * from "./USyncQuery.js";
4
- export * from "./USyncUser.js";
5
- //=======================================================//
16
+ export * from "./USyncUser.js";
package/lib/index.js CHANGED
@@ -1,9 +1,17 @@
1
- //=======================================================//
2
-
3
- import chalk from 'chalk';
1
+ //========================================//
2
+ /**
3
+ * @project @sixcore/baileys
4
+ * @author Sixx.js </>🌿
5
+ * @version 1.0.3
6
+ * @license MIT
7
+ * @country Mozambique 🇲🇿♥️
8
+ * @chamadas || sms +258860817689
9
+ * @whatsApp +55889616-2417 || +258851907875
10
+ * @description Biblioteca Node.js para integração e automação no WhatsApp usando Baileys
11
+ */
12
+
4
13
 
5
14
  import makeWASocket from "./Socket/index.js";
6
- //=======================================================//
7
15
  export * from "./Defaults/index.js";
8
16
  export * from "./WABinary/index.js";
9
17
  export * from "../WAProto/index.js";
@@ -12,7 +20,7 @@ export * from "./Store/index.js";
12
20
  export * from "./Utils/index.js";
13
21
  export * from "./Types/index.js";
14
22
  export * from "./WAM/index.js";
15
- //=======================================================//
23
+
24
+
16
25
  export { makeWASocket };
17
26
  export default makeWASocket;
18
- //=======================================================//