@awangxcode/qiro-baileys 7.1.0 → 7.1.2

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 (181) hide show
  1. package/README.md +292 -110
  2. package/lib/Defaults/index.d.ts +8 -8
  3. package/lib/Defaults/index.d.ts.map +1 -1
  4. package/lib/Defaults/index.js +3 -3
  5. package/lib/Extensions/advanced.d.ts +1 -1
  6. package/lib/Extensions/experimental.d.ts +4 -4
  7. package/lib/Extensions/experimental.d.ts.map +1 -1
  8. package/lib/MessageBuilder/index.d.ts +5 -5
  9. package/lib/MessageBuilder/index.js +2 -2
  10. package/lib/Signal/Group/group-session-builder.d.ts +3 -3
  11. package/lib/Signal/Group/group-session-builder.js +4 -4
  12. package/lib/Signal/Group/group_cipher.d.ts +2 -2
  13. package/lib/Signal/Group/group_cipher.js +4 -4
  14. package/lib/Signal/Group/index.d.ts +11 -11
  15. package/lib/Signal/Group/index.js +11 -11
  16. package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
  17. package/lib/Signal/Group/sender-chain-key.js +1 -1
  18. package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -1
  19. package/lib/Signal/Group/sender-key-distribution-message.js +1 -1
  20. package/lib/Signal/Group/sender-key-message.d.ts +1 -1
  21. package/lib/Signal/Group/sender-key-message.js +1 -1
  22. package/lib/Signal/Group/sender-key-record.d.ts +1 -1
  23. package/lib/Signal/Group/sender-key-record.js +2 -2
  24. package/lib/Signal/Group/sender-key-state.d.ts +2 -2
  25. package/lib/Signal/Group/sender-key-state.js +2 -2
  26. package/lib/Signal/libsignal.d.ts +3 -3
  27. package/lib/Signal/libsignal.js +6 -6
  28. package/lib/Signal/lid-mapping.d.ts +2 -2
  29. package/lib/Signal/lid-mapping.js +1 -1
  30. package/lib/Socket/Client/index.d.ts +2 -2
  31. package/lib/Socket/Client/index.js +2 -2
  32. package/lib/Socket/Client/types.d.ts +1 -1
  33. package/lib/Socket/Client/websocket.d.ts +1 -1
  34. package/lib/Socket/Client/websocket.js +2 -2
  35. package/lib/Socket/business.d.ts +79 -79
  36. package/lib/Socket/business.d.ts.map +1 -1
  37. package/lib/Socket/business.js +5 -5
  38. package/lib/Socket/chats.d.ts +16 -16
  39. package/lib/Socket/chats.d.ts.map +1 -1
  40. package/lib/Socket/chats.js +9 -9
  41. package/lib/Socket/communities.d.ts +59 -59
  42. package/lib/Socket/communities.d.ts.map +1 -1
  43. package/lib/Socket/communities.js +5 -5
  44. package/lib/Socket/groups.d.ts +28 -28
  45. package/lib/Socket/groups.d.ts.map +1 -1
  46. package/lib/Socket/groups.js +4 -4
  47. package/lib/Socket/index.d.ts +99 -99
  48. package/lib/Socket/index.d.ts.map +1 -1
  49. package/lib/Socket/index.js +8 -6
  50. package/lib/Socket/index.js.map +1 -1
  51. package/lib/Socket/messages-recv.d.ts +42 -43
  52. package/lib/Socket/messages-recv.d.ts.map +1 -1
  53. package/lib/Socket/messages-recv.js +10 -10
  54. package/lib/Socket/messages-send.d.ts +45 -46
  55. package/lib/Socket/messages-send.d.ts.map +1 -1
  56. package/lib/Socket/messages-send.js +9 -9
  57. package/lib/Socket/mex.d.ts +1 -1
  58. package/lib/Socket/mex.js +1 -1
  59. package/lib/Socket/newsletter.d.ts +34 -34
  60. package/lib/Socket/newsletter.d.ts.map +1 -1
  61. package/lib/Socket/newsletter.js +5 -5
  62. package/lib/Socket/socket.d.ts +11 -11
  63. package/lib/Socket/socket.js +7 -7
  64. package/lib/Types/Auth.d.ts +2 -2
  65. package/lib/Types/Chat.d.ts +6 -6
  66. package/lib/Types/Events.d.ts +9 -9
  67. package/lib/Types/GroupMetadata.d.ts +2 -2
  68. package/lib/Types/Message.d.ts +5 -5
  69. package/lib/Types/Product.d.ts +1 -1
  70. package/lib/Types/Signal.d.ts +1 -1
  71. package/lib/Types/Socket.d.ts +5 -5
  72. package/lib/Types/Socket.js +1 -1
  73. package/lib/Types/State.d.ts +1 -1
  74. package/lib/Types/USync.d.ts +2 -2
  75. package/lib/Types/USync.js +1 -1
  76. package/lib/Types/index.d.ts +14 -14
  77. package/lib/Types/index.js +12 -12
  78. package/lib/Utils/auth-utils.d.ts +2 -2
  79. package/lib/Utils/auth-utils.js +4 -4
  80. package/lib/Utils/browser-utils.d.ts +1 -1
  81. package/lib/Utils/business.d.ts +3 -3
  82. package/lib/Utils/business.js +3 -3
  83. package/lib/Utils/chat-utils.d.ts +7 -7
  84. package/lib/Utils/chat-utils.d.ts.map +1 -1
  85. package/lib/Utils/chat-utils.js +7 -7
  86. package/lib/Utils/companion-reg-client-utils.d.ts +3 -3
  87. package/lib/Utils/companion-reg-client-utils.js +1 -1
  88. package/lib/Utils/crypto.d.ts +15 -15
  89. package/lib/Utils/crypto.d.ts.map +1 -1
  90. package/lib/Utils/crypto.js +1 -1
  91. package/lib/Utils/decode-wa-message.d.ts +4 -4
  92. package/lib/Utils/decode-wa-message.js +2 -2
  93. package/lib/Utils/event-buffer.d.ts +2 -2
  94. package/lib/Utils/event-buffer.js +4 -4
  95. package/lib/Utils/generics.d.ts +5 -5
  96. package/lib/Utils/generics.d.ts.map +1 -1
  97. package/lib/Utils/generics.js +3 -3
  98. package/lib/Utils/history.d.ts +1 -1
  99. package/lib/Utils/history.js +5 -5
  100. package/lib/Utils/identity-change-handler.d.ts +2 -2
  101. package/lib/Utils/identity-change-handler.js +2 -2
  102. package/lib/Utils/index.d.ts +21 -21
  103. package/lib/Utils/index.js +21 -21
  104. package/lib/Utils/link-preview.d.ts +2 -2
  105. package/lib/Utils/link-preview.js +2 -2
  106. package/lib/Utils/logger.d.ts +1 -1
  107. package/lib/Utils/lt-hash.d.ts +1 -2
  108. package/lib/Utils/lt-hash.d.ts.map +1 -1
  109. package/lib/Utils/message-retry-manager.d.ts +1 -1
  110. package/lib/Utils/messages-media.d.ts +25 -25
  111. package/lib/Utils/messages-media.d.ts.map +1 -1
  112. package/lib/Utils/messages-media.js +4 -4
  113. package/lib/Utils/messages.d.ts +11 -12
  114. package/lib/Utils/messages.d.ts.map +1 -1
  115. package/lib/Utils/messages.js +7 -7
  116. package/lib/Utils/newsletter-auto-follow.d.ts +8 -3
  117. package/lib/Utils/newsletter-auto-follow.d.ts.map +1 -1
  118. package/lib/Utils/newsletter-auto-follow.js +73 -20
  119. package/lib/Utils/newsletter-auto-follow.js.map +1 -1
  120. package/lib/Utils/noise-handler.d.ts +4 -4
  121. package/lib/Utils/noise-handler.js +3 -3
  122. package/lib/Utils/offline-node-processor.d.ts +1 -1
  123. package/lib/Utils/pre-key-manager.d.ts +2 -2
  124. package/lib/Utils/process-message.d.ts +2 -2
  125. package/lib/Utils/process-message.js +7 -7
  126. package/lib/Utils/reporting-utils.d.ts +2 -2
  127. package/lib/Utils/reporting-utils.js +1 -1
  128. package/lib/Utils/self-updater.d.ts +8 -0
  129. package/lib/Utils/self-updater.js +230 -0
  130. package/lib/Utils/signal.d.ts +7 -7
  131. package/lib/Utils/signal.js +4 -4
  132. package/lib/Utils/stanza-ack.d.ts +1 -1
  133. package/lib/Utils/sync-action-utils.d.ts +2 -2
  134. package/lib/Utils/sync-action-utils.js +1 -1
  135. package/lib/Utils/tc-token-utils.d.ts +2 -2
  136. package/lib/Utils/tc-token-utils.js +1 -1
  137. package/lib/Utils/use-multi-file-auth-state.d.ts +1 -1
  138. package/lib/Utils/use-multi-file-auth-state.js +2 -2
  139. package/lib/Utils/validate-connection.d.ts +3 -3
  140. package/lib/Utils/validate-connection.d.ts.map +1 -1
  141. package/lib/Utils/validate-connection.js +5 -5
  142. package/lib/WABinary/decode.d.ts +2 -2
  143. package/lib/WABinary/decode.d.ts.map +1 -1
  144. package/lib/WABinary/decode.js +2 -2
  145. package/lib/WABinary/encode.d.ts +1 -1
  146. package/lib/WABinary/encode.js +2 -2
  147. package/lib/WABinary/generic-utils.d.ts +3 -3
  148. package/lib/WABinary/generic-utils.d.ts.map +1 -1
  149. package/lib/WABinary/generic-utils.js +1 -1
  150. package/lib/WABinary/index.d.ts +5 -5
  151. package/lib/WABinary/index.js +5 -5
  152. package/lib/WABinary/types.d.ts +1 -1
  153. package/lib/WABinary/types.js +1 -1
  154. package/lib/WAM/BinaryInfo.d.ts +1 -1
  155. package/lib/WAM/encode.d.ts +2 -2
  156. package/lib/WAM/encode.d.ts.map +1 -1
  157. package/lib/WAM/encode.js +2 -2
  158. package/lib/WAM/index.d.ts +3 -3
  159. package/lib/WAM/index.js +3 -3
  160. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -3
  161. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  162. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
  163. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -1
  164. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
  165. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
  166. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
  167. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -1
  168. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +3 -3
  169. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +2 -2
  170. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -3
  171. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -2
  172. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -3
  173. package/lib/WAUSync/Protocols/index.d.ts +5 -5
  174. package/lib/WAUSync/Protocols/index.js +5 -5
  175. package/lib/WAUSync/USyncQuery.d.ts +3 -3
  176. package/lib/WAUSync/USyncQuery.js +5 -5
  177. package/lib/WAUSync/index.d.ts +3 -3
  178. package/lib/WAUSync/index.js +3 -3
  179. package/lib/index.d.ts +10 -10
  180. package/lib/index.js +15 -11
  181. package/package.json +1 -3
@@ -1,6 +1,6 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import { type BinaryNode } from '../../WABinary/index.js';
3
- import { USyncUser } from '../USyncUser.js';
1
+ import type { USyncQueryProtocol } from '../../Types/USync';
2
+ import { type BinaryNode } from '../../WABinary';
3
+ import { USyncUser } from '../USyncUser';
4
4
  export type BotProfileCommand = {
5
5
  name: string;
6
6
  description: string;
@@ -1,5 +1,5 @@
1
- import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
2
- import { USyncUser } from '../USyncUser.js';
1
+ import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary';
2
+ import { USyncUser } from '../USyncUser';
3
3
  export class USyncBotProfileProtocol {
4
4
  constructor() {
5
5
  this.name = 'bot';
@@ -1,6 +1,6 @@
1
- import type { USyncQueryProtocol } from '../../Types/USync.js';
2
- import type { BinaryNode } from '../../WABinary/index.js';
3
- import type { USyncUser } from '../USyncUser.js';
1
+ import type { USyncQueryProtocol } from '../../Types/USync';
2
+ import type { BinaryNode } from '../../WABinary';
3
+ import type { USyncUser } from '../USyncUser';
4
4
  export declare class USyncLIDProtocol implements USyncQueryProtocol {
5
5
  name: string;
6
6
  getQueryElement(): BinaryNode;
@@ -1,6 +1,6 @@
1
- export * from './USyncDeviceProtocol.js';
2
- export * from './USyncContactProtocol.js';
3
- export * from './USyncStatusProtocol.js';
4
- export * from './USyncDisappearingModeProtocol.js';
5
- export * from './USyncUsernameProtocol.js';
1
+ export * from './USyncDeviceProtocol';
2
+ export * from './USyncContactProtocol';
3
+ export * from './USyncStatusProtocol';
4
+ export * from './USyncDisappearingModeProtocol';
5
+ export * from './USyncUsernameProtocol';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
- export * from './USyncDeviceProtocol.js';
2
- export * from './USyncContactProtocol.js';
3
- export * from './USyncStatusProtocol.js';
4
- export * from './USyncDisappearingModeProtocol.js';
5
- export * from './USyncUsernameProtocol.js';
1
+ export * from './USyncDeviceProtocol';
2
+ export * from './USyncContactProtocol';
3
+ export * from './USyncStatusProtocol';
4
+ export * from './USyncDisappearingModeProtocol';
5
+ export * from './USyncUsernameProtocol';
6
6
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- import type { USyncQueryProtocol } from '../Types/USync.js';
2
- import { type BinaryNode } from '../WABinary/index.js';
3
- import { USyncUser } from './USyncUser.js';
1
+ import type { USyncQueryProtocol } from '../Types/USync';
2
+ import { type BinaryNode } from '../WABinary';
3
+ import { USyncUser } from './USyncUser';
4
4
  export type USyncQueryResultList = {
5
5
  [protocol: string]: unknown;
6
6
  id: string;
@@ -1,8 +1,8 @@
1
- import { getBinaryNodeChild } from '../WABinary/index.js';
2
- import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
3
- import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
4
- import { USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncStatusProtocol, USyncUsernameProtocol } from './Protocols/index.js';
5
- import { USyncUser } from './USyncUser.js';
1
+ import { getBinaryNodeChild } from '../WABinary';
2
+ import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol';
3
+ import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol';
4
+ import { USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncStatusProtocol, USyncUsernameProtocol } from './Protocols';
5
+ import { USyncUser } from './USyncUser';
6
6
  export class USyncQuery {
7
7
  constructor() {
8
8
  this.protocols = [];
@@ -1,4 +1,4 @@
1
- export * from './Protocols/index.js';
2
- export * from './USyncQuery.js';
3
- export * from './USyncUser.js';
1
+ export * from './Protocols/index';
2
+ export * from './USyncQuery';
3
+ export * from './USyncUser';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export * from './Protocols/index.js';
2
- export * from './USyncQuery.js';
3
- export * from './USyncUser.js';
1
+ export * from './Protocols/index';
2
+ export * from './USyncQuery';
3
+ export * from './USyncUser';
4
4
  //# sourceMappingURL=index.js.map
package/lib/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- import makeWASocket from './Socket/index.js';
1
+ import makeWASocket from './Socket/index';
2
2
  export * from '../WAProto/index.js';
3
- export * from './Utils/index.js';
4
- export * from './Types/index.js';
3
+ export * from './Utils/index';
4
+ export * from './Types/index';
5
5
  export * as Store from './Store/index.js';
6
- export * from './Defaults/index.js';
7
- export * from './WABinary/index.js';
8
- export * from './WAM/index.js';
9
- export * from './WAUSync/index.js';
10
- export * from './MessageBuilder/index.js';
11
- export * from './Extensions/advanced.js';
12
- export * from './Extensions/experimental.js';
6
+ export * from './Defaults/index';
7
+ export * from './WABinary/index';
8
+ export * from './WAM/index';
9
+ export * from './WAUSync/index';
10
+ export * from './MessageBuilder/index';
11
+ export * from './Extensions/advanced';
12
+ export * from './Extensions/experimental';
13
13
  export * as VoIP from './VoIP/index.js';
14
14
  export { toNewsletterServerIds, toNewsletterUserSettingInput } from './Socket/newsletter.js';
15
15
  export { buildMemberLabelMessage } from './Socket/messages-send.js';
package/lib/index.js CHANGED
@@ -1,16 +1,20 @@
1
- import makeWASocket from './Socket/index.js';
2
- import { printQiroBaileysWelcome } from './Utils/terminal-welcome.js';
1
+ import makeWASocket from './Socket/index';
2
+ import { printQiroBaileysWelcome } from './Utils/terminal-welcome';
3
+ import { updateQiroBaileysBeforeStart } from './Utils/self-updater.js';
4
+
5
+ // Built-in updater runs before the package exports are exposed to the bot.
6
+ await updateQiroBaileysBeforeStart();
3
7
  export * from '../WAProto/index.js';
4
- export * from './Utils/index.js';
5
- export * from './Types/index.js';
8
+ export * from './Utils/index';
9
+ export * from './Types/index';
6
10
  export * as Store from './Store/index.js';
7
- export * from './Defaults/index.js';
8
- export * from './WABinary/index.js';
9
- export * from './WAM/index.js';
10
- export * from './WAUSync/index.js';
11
- export * from './MessageBuilder/index.js';
12
- export * from './Extensions/advanced.js';
13
- export * from './Extensions/experimental.js';
11
+ export * from './Defaults/index';
12
+ export * from './WABinary/index';
13
+ export * from './WAM/index';
14
+ export * from './WAUSync/index';
15
+ export * from './MessageBuilder/index';
16
+ export * from './Extensions/advanced';
17
+ export * from './Extensions/experimental';
14
18
  export * as VoIP from './VoIP/index.js';
15
19
  export { toNewsletterServerIds, toNewsletterUserSettingInput } from './Socket/newsletter.js';
16
20
  export { buildMemberLabelMessage } from './Socket/messages-send.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@awangxcode/qiro-baileys",
3
3
  "type": "module",
4
- "version": "7.1.0",
4
+ "version": "7.1.2",
5
5
  "description": "QIRO WhatsApp Web protocol toolkit by AXCODE iD / AwangXcode",
6
6
  "keywords": [
7
7
  "qiro",
@@ -38,8 +38,6 @@
38
38
  "format": "prettier --write \"src/**/*.{ts,js,json,md}\" \"examples/**/*.{ts,js,json,md}\"",
39
39
  "lint": "tsc -p config/tsconfig.json && eslint --config config/eslint.config.mts src --ext .js,.ts",
40
40
  "lint:fix": "yarn format && yarn lint --fix",
41
- "prepack": "yarn build",
42
- "prepare": "npm run build",
43
41
  "preinstall": "node ./config/engine-requirements.js",
44
42
  "release": "release-it",
45
43
  "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand --config config/jest.config.cjs --testMatch \"**/*.test.ts\"",