kage-baileys 3.0.6 → 3.2.3

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 (216) hide show
  1. package/Example/connection.cjs +4 -0
  2. package/README.MD +4726 -48
  3. package/WAProto/WAProto.proto +3395 -415
  4. package/WAProto/compat.cjs +12 -0
  5. package/WAProto/index.d.ts +47104 -19888
  6. package/WAProto/index.js +131979 -57361
  7. package/lib/Addon/http-error.js +43 -0
  8. package/lib/Addon/index.js +32 -0
  9. package/lib/Addon/keyed-db.js +250 -0
  10. package/lib/Addon/link-preview.js +82 -0
  11. package/lib/Defaults/baileys-version.json +3 -0
  12. package/lib/Defaults/connection.js +110 -0
  13. package/lib/Defaults/constants.js +156 -0
  14. package/lib/Defaults/history.js +46 -0
  15. package/lib/Defaults/index.js +230 -0
  16. package/lib/Defaults/media.js +104 -0
  17. package/lib/Defaults/phonenumber-mcc.json +223 -0
  18. package/lib/Defaults/prefix.js +44 -0
  19. package/lib/Extensions/business-advanced.js +382 -0
  20. package/lib/Extensions/business.js +159 -0
  21. package/lib/Extensions/chats-advanced.js +1106 -0
  22. package/lib/Extensions/chats.js +349 -0
  23. package/lib/Extensions/communities-advanced.js +430 -0
  24. package/lib/Extensions/community.js +94 -0
  25. package/lib/Extensions/groups-advanced.js +343 -0
  26. package/lib/Extensions/index.js +30 -0
  27. package/lib/Extensions/messages-recv-advanced.js +1690 -0
  28. package/lib/Extensions/messages-send-advanced.js +622 -0
  29. package/lib/Extensions/messages-send.js +1380 -0
  30. package/lib/Extensions/newsletter-advanced.js +228 -0
  31. package/lib/Extensions/newsletter.js +72 -0
  32. package/lib/Extensions/socket.js +389 -0
  33. package/lib/Modded/message_builder.js +2084 -4
  34. package/lib/Signal/Group/ciphertext-message.js +54 -0
  35. package/lib/Signal/Group/group-session-builder.js +124 -0
  36. package/lib/Signal/Group/group_cipher.js +216 -0
  37. package/lib/Signal/Group/index.js +124 -0
  38. package/lib/Signal/Group/keyhelper.js +108 -0
  39. package/lib/Signal/Group/sender-chain-key.js +83 -0
  40. package/lib/Signal/Group/sender-key-distribution-message.js +157 -0
  41. package/lib/Signal/Group/sender-key-message.js +166 -0
  42. package/lib/Signal/Group/sender-key-name.js +130 -0
  43. package/lib/Signal/Group/sender-key-record.js +113 -0
  44. package/lib/Signal/Group/sender-key-state.js +208 -0
  45. package/lib/Signal/Group/sender-message-key.js +82 -0
  46. package/lib/Signal/libsignal.js +935 -0
  47. package/lib/Signal/lid-mapping.js +545 -1
  48. package/lib/Socket/Client/index.js +60 -0
  49. package/lib/Socket/Client/types.js +51 -0
  50. package/lib/Socket/Client/websocket.js +152 -0
  51. package/lib/Socket/business.js +831 -0
  52. package/lib/Socket/chats.js +2535 -49
  53. package/lib/Socket/communities.js +450 -1
  54. package/lib/Socket/community.js +1022 -0
  55. package/lib/Socket/dugong.js +1 -1
  56. package/lib/Socket/groups.js +747 -0
  57. package/lib/Socket/index.js +60 -2
  58. package/lib/Socket/messages-recv.js +3450 -5
  59. package/lib/Socket/messages-send.js +3123 -0
  60. package/lib/Socket/mex.js +126 -1
  61. package/lib/Socket/newsletter.js +465 -0
  62. package/lib/Socket/socket.js +2217 -1
  63. package/lib/Store/index.js +79 -0
  64. package/lib/Store/make-cache-manager-store.js +186 -0
  65. package/lib/Store/make-in-memory-store.js +878 -0
  66. package/lib/Store/make-ordered-dictionary.js +187 -0
  67. package/lib/Store/object-repository.js +78 -0
  68. package/lib/Types/Auth.js +25 -0
  69. package/lib/Types/Bussines.js +25 -1
  70. package/lib/Types/Call.js +25 -0
  71. package/lib/Types/Chat.js +39 -0
  72. package/lib/Types/Contact.js +25 -0
  73. package/lib/Types/Events.js +25 -0
  74. package/lib/Types/GroupMetadata.js +25 -0
  75. package/lib/Types/Label.js +76 -0
  76. package/lib/Types/LabelAssociation.js +40 -0
  77. package/lib/Types/Message.js +57 -0
  78. package/lib/Types/Mex.js +56 -1
  79. package/lib/Types/MexUpdates.js +46 -0
  80. package/lib/Types/Newsletter.js +56 -0
  81. package/lib/Types/Product.js +25 -0
  82. package/lib/Types/RichType.js +23 -0
  83. package/lib/Types/Signal.js +25 -0
  84. package/lib/Types/Socket.js +25 -0
  85. package/lib/Types/State.js +92 -0
  86. package/lib/Types/USync.js +25 -0
  87. package/lib/Types/index.js +133 -0
  88. package/lib/Utils/auth-utils.js +703 -0
  89. package/lib/Utils/automation-tools.js +51 -16
  90. package/lib/Utils/baileys-event-stream.js +146 -0
  91. package/lib/Utils/browser-utils.js +95 -0
  92. package/lib/Utils/business.js +525 -0
  93. package/lib/Utils/chat-utils.js +1861 -0
  94. package/lib/Utils/companion-reg-client-utils.js +55 -1
  95. package/lib/Utils/crypto.js +355 -0
  96. package/lib/Utils/decode-wa-message.js +709 -0
  97. package/lib/Utils/event-buffer.js +1323 -8
  98. package/lib/Utils/generics.js +945 -1
  99. package/lib/Utils/history.js +266 -0
  100. package/lib/Utils/identity-change-handler.js +62 -1
  101. package/lib/Utils/index.js +114 -0
  102. package/lib/Utils/link-preview.js +179 -0
  103. package/lib/Utils/logger.js +42 -0
  104. package/lib/Utils/lt-hash.js +73 -0
  105. package/lib/Utils/make-mutex.js +104 -0
  106. package/lib/Utils/message-inspector.js +110 -0
  107. package/lib/Utils/message-retry-manager.js +507 -2
  108. package/lib/Utils/messages-media.js +1931 -1
  109. package/lib/Utils/messages.js +3748 -0
  110. package/lib/Utils/noise-handler.js +423 -0
  111. package/lib/Utils/offline-node-processor.js +53 -1
  112. package/lib/Utils/pre-key-manager.js +255 -1
  113. package/lib/Utils/process-message.js +1592 -0
  114. package/lib/Utils/reporting-utils.js +272 -1
  115. package/lib/Utils/rich-message-utils.js +377 -0
  116. package/lib/Utils/rich-messages.js +1 -1
  117. package/lib/Utils/signal.js +437 -0
  118. package/lib/Utils/stanza-ack.js +51 -1
  119. package/lib/Utils/status-refresh.js +37 -0
  120. package/lib/Utils/status-tools.js +4 -2
  121. package/lib/Utils/sync-action-utils.js +63 -1
  122. package/lib/Utils/tc-token-utils.js +185 -1
  123. package/lib/Utils/terminal-banner.js +31 -0
  124. package/lib/Utils/use-multi-file-auth-state.js +271 -0
  125. package/lib/Utils/use-single-file-auth-state.js +108 -0
  126. package/lib/Utils/use-sqlite-auth-state.js +142 -0
  127. package/lib/Utils/validate-connection.js +497 -1
  128. package/lib/Utils/view-once-compat.js +13 -5
  129. package/lib/VoIP/audio-feeder.js +150 -0
  130. package/lib/VoIP/index.js +289 -0
  131. package/lib/VoIP/relay-transport.js +608 -0
  132. package/lib/VoIP/signaling.js +583 -0
  133. package/lib/VoIP/types.js +30 -0
  134. package/lib/VoIP/wasm-engine.js +1261 -2
  135. package/lib/VoIP/worker-bootstrap.js +1090 -2
  136. package/lib/WABinary/constants.js +2805 -0
  137. package/lib/WABinary/decode.js +649 -2
  138. package/lib/WABinary/encode.js +564 -2
  139. package/lib/WABinary/generic-utils.js +401 -0
  140. package/lib/WABinary/index.js +82 -0
  141. package/lib/WABinary/jid-utils.js +290 -0
  142. package/lib/WABinary/types.js +25 -0
  143. package/lib/WAM/BinaryInfo.js +50 -0
  144. package/lib/WAM/constants.js +45747 -0
  145. package/lib/WAM/encode.js +393 -0
  146. package/lib/WAM/index.js +78 -0
  147. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +135 -0
  148. package/lib/WAUSync/Protocols/USyncContactProtocol.js +110 -0
  149. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +142 -0
  150. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +85 -0
  151. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +69 -0
  152. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +107 -0
  153. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +38 -1
  154. package/lib/WAUSync/Protocols/index.js +83 -0
  155. package/lib/WAUSync/USyncQuery.js +241 -2
  156. package/lib/WAUSync/USyncUser.js +86 -0
  157. package/lib/WAUSync/index.js +78 -0
  158. package/lib/assets/wasm/loader.js +1875 -1
  159. package/lib/assets/wasm/worker-modules.js +11047 -1
  160. package/lib/index.d.ts +126 -0
  161. package/lib/index.js +53 -21
  162. package/lib/index.mjs +437 -0
  163. package/licenses/upstream-MIT.txt +22 -0
  164. package/maintenance/api-coverage.json +1642 -0
  165. package/maintenance/archivos-sha256.json +207 -0
  166. package/maintenance/consumer-validation.log +3 -0
  167. package/maintenance/dependency-audit.json +4 -4
  168. package/maintenance/extension-inventory.json +57 -0
  169. package/maintenance/protocol-update.json +1101 -0
  170. package/maintenance/protocol-wire-audit.json +4 -0
  171. package/maintenance/reference-socket-surface.json +209 -0
  172. package/maintenance/resumen-validacion.json +50 -0
  173. package/maintenance/validation.log +2725 -0
  174. package/maintenance/verification.json +566 -0
  175. package/package.json +107 -9
  176. package/scripts/check-imports.cjs +10 -0
  177. package/scripts/check-package.cjs +40 -0
  178. package/scripts/check-syntax.cjs +1 -1
  179. package/scripts/generate-protobuf.cjs +6 -1
  180. package/scripts/generate-public-types.cjs +9 -0
  181. package/scripts/kage-base64-fix.cjs +45 -0
  182. package/scripts/maintenance.cjs +10 -0
  183. package/test/advanced.test.cjs +24 -0
  184. package/test/base64-fix.test.cjs +49 -0
  185. package/test/maintenance.test.cjs +1 -1
  186. package/test/npm-publication.test.cjs +141 -0
  187. package/test/recepcion-reparada.test.cjs +98 -0
  188. package/test/resilience-binary.test.cjs +69 -0
  189. package/test/resilience-transport.test.cjs +34 -0
  190. package/test/types.test.ts +5 -0
  191. package/test/upgrade.test.cjs +104 -0
  192. package/tsconfig.json +20 -0
  193. package/WAProto/p.html +0 -1
  194. package/lib/KageExtra/Modded/message_builder.js +0 -2330
  195. package/lib/KageExtra/VoIP/audio-feeder.js +0 -136
  196. package/lib/KageExtra/VoIP/index.js +0 -282
  197. package/lib/KageExtra/VoIP/relay-transport.js +0 -559
  198. package/lib/KageExtra/VoIP/signaling.js +0 -603
  199. package/lib/KageExtra/VoIP/types.js +0 -17
  200. package/lib/KageExtra/VoIP/wasm-engine.js +0 -1214
  201. package/lib/KageExtra/VoIP/worker-bootstrap.js +0 -1042
  202. package/lib/KageExtra/assets/wasm/loader.js +0 -5
  203. package/lib/KageExtra/assets/wasm/whatsapp.wasm +0 -0
  204. package/lib/KageExtra/assets/wasm/worker-modules.js +0 -273
  205. package/lib/KageExtra/index.js +0 -3
  206. package/lib/KageExtra/package.json +0 -1
  207. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +0 -53
  208. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +0 -24
  209. package/maintenance/revision-full-check.txt +0 -1097
  210. package/maintenance/revision-library-tests.tap +0 -1088
  211. package/maintenance/revision-protobuf.txt +0 -5
  212. package/maintenance/revision-syntax.txt +0 -5
  213. package/maintenance/schema-coverage.json +0 -23
  214. package/maintenance/schema-merge.json +0 -30
  215. package/maintenance/validation-node20.txt +0 -191
  216. package/maintenance/validation-node22.txt +0 -237
package/lib/Types/Mex.js CHANGED
@@ -34,4 +34,59 @@
34
34
  QueryIds["REACHOUT_TIMELOCK"] = "23983697327930364";
35
35
  QueryIds["MESSAGE_CAPPING_INFO"] = "24503548349331633";
36
36
  })(exports.QueryIds || (exports.QueryIds = {}));
37
- //# sourceMappingURL=Mex.js.map
37
+ //#
38
+ // Kage: funciones avanzadas.
39
+ const __kageModule154 = (() => {
40
+ const module = { exports: {} }; const exports = module.exports;
41
+ "use strict";
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.QueryIds = exports.XWAPaths = void 0;
44
+ (function (XWAPaths) {
45
+ XWAPaths["xwa2_newsletter_create"] = "xwa2_newsletter_create";
46
+ XWAPaths["xwa2_newsletter_subscribers"] = "xwa2_newsletter_subscribers";
47
+ XWAPaths["xwa2_newsletter_subscribed"] = "xwa2_newsletter_subscribed";
48
+ XWAPaths["xwa2_newsletter_view"] = "xwa2_newsletter_view";
49
+ XWAPaths["xwa2_newsletter_metadata"] = "xwa2_newsletter";
50
+ XWAPaths["xwa2_newsletter_admin_count"] = "xwa2_newsletter_admin";
51
+ XWAPaths["xwa2_newsletter_mute_v2"] = "xwa2_newsletter_mute_v2";
52
+ XWAPaths["xwa2_newsletter_unmute_v2"] = "xwa2_newsletter_unmute_v2";
53
+ XWAPaths["xwa2_newsletter_follow"] = "xwa2_newsletter_follow";
54
+ XWAPaths["xwa2_newsletter_unfollow"] = "xwa2_newsletter_unfollow";
55
+ XWAPaths["xwa2_newsletter_join_v2"] = "xwa2_newsletter_join_v2";
56
+ XWAPaths["xwa2_newsletter_leave_v2"] = "xwa2_newsletter_leave_v2";
57
+ XWAPaths["xwa2_newsletter_change_owner"] = "xwa2_newsletter_change_owner";
58
+ XWAPaths["xwa2_newsletter_demote"] = "xwa2_newsletter_demote";
59
+ XWAPaths["xwa2_newsletter_delete_v2"] = "xwa2_newsletter_delete_v2";
60
+ XWAPaths["xwa2_fetch_account_reachout_timelock"] = "xwa2_fetch_account_reachout_timelock";
61
+ XWAPaths["xwa2_message_capping_info"] = "xwa2_message_capping_info";
62
+ })(exports.XWAPaths || (exports.XWAPaths = {}));
63
+ (function (QueryIds) {
64
+ QueryIds["CREATE"] = "8823471724422422";
65
+ QueryIds["UPDATE_METADATA"] = "24250201037901610";
66
+ QueryIds["METADATA"] = "6563316087068696";
67
+ QueryIds["SUBSCRIBERS"] = "9783111038412085";
68
+ QueryIds["SUBSCRIBED"] = "6388546374527196";
69
+ QueryIds["FOLLOW"] = "24404358912487870";
70
+ QueryIds["UNFOLLOW"] = "9767147403369991";
71
+ QueryIds["MUTE"] = "29766401636284406";
72
+ QueryIds["UNMUTE"] = "9864994326891137";
73
+ QueryIds["ADMIN_COUNT"] = "7130823597031706";
74
+ QueryIds["CHANGE_OWNER"] = "7341777602580933";
75
+ QueryIds["DEMOTE"] = "6551828931592903";
76
+ QueryIds["DELETE"] = "30062808666639665";
77
+ QueryIds["REACHOUT_TIMELOCK"] = "23983697327930364";
78
+ QueryIds["MESSAGE_CAPPING_INFO"] = "24503548349331633";
79
+ })(exports.QueryIds || (exports.QueryIds = {}));
80
+
81
+ return module.exports;
82
+ })();
83
+ for (const key of Object.keys(__kageModule154)) {
84
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule154[key]});
85
+ }
86
+ Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule154, configurable:true});
87
+
88
+ // Kage: superficie pública completa.
89
+ for (const name of ["XWAPaths","QueryIds"]) {
90
+ const advanced = exports[Symbol.for('kage.advanced')][name];
91
+ for (const [key, value] of Object.entries(advanced || {})) if (!(key in exports[name])) exports[name][key] = value;
92
+ }
@@ -0,0 +1,46 @@
1
+ "use strict"
2
+
3
+ Object.defineProperty(exports, "__esModule", { value: true })
4
+
5
+ const MexUpdatesOperations = {
6
+ OWNER_COMMUNITY: "NotificationCommunityOwnerUpdate",
7
+ GROUP_MEMBER_LINK: "NotificationGroupMemberLinkPropertyUpdate",
8
+ GROUP_LIMIT_SHARING: "NotificationGroupLimitSharingPropertyUpdate"
9
+ }
10
+
11
+ const XWAPathsMexUpdates = {
12
+ GROUP_SHARING_CHANGE: "xwa2_notify_group_on_prop_change",
13
+ COMMUNITY_OWNER_CHANGE: "xwa2_notify_group_on_participants_roles_change"
14
+ }
15
+
16
+ module.exports = {
17
+ MexUpdatesOperations,
18
+ XWAPathsMexUpdates
19
+ }
20
+ // Kage: compatibilidad de API.
21
+ const __kageModule49 = (() => {
22
+ const module = { exports: {} }; const exports = module.exports;
23
+ "use strict"
24
+
25
+ Object.defineProperty(exports, "__esModule", { value: true })
26
+
27
+ const MexUpdatesOperations = {
28
+ OWNER_COMMUNITY: "NotificationCommunityOwnerUpdate",
29
+ GROUP_MEMBER_LINK: "NotificationGroupMemberLinkPropertyUpdate",
30
+ GROUP_LIMIT_SHARING: "NotificationGroupLimitSharingPropertyUpdate"
31
+ }
32
+
33
+ const XWAPathsMexUpdates = {
34
+ GROUP_SHARING_CHANGE: "xwa2_notify_group_on_prop_change",
35
+ COMMUNITY_OWNER_CHANGE: "xwa2_notify_group_on_participants_roles_change"
36
+ }
37
+
38
+ module.exports = {
39
+ MexUpdatesOperations,
40
+ XWAPathsMexUpdates
41
+ }
42
+ return module.exports;
43
+ })();
44
+ for (const key of Object.keys(__kageModule49)) {
45
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule49[key]});
46
+ }
@@ -16,3 +16,59 @@ var XWAPaths;
16
16
  XWAPaths["NEWSLETTER"] = "xwa2_newsletter";
17
17
  XWAPaths["METADATA_UPDATE"] = "xwa2_notify_newsletter_on_metadata_update";
18
18
  })(XWAPaths || (exports.XWAPaths = XWAPaths = {}));
19
+
20
+ // Kage: compatibilidad de API.
21
+ const __kageModule50 = (() => {
22
+ const module = { exports: {} }; const exports = module.exports;
23
+ "use strict"
24
+
25
+ Object.defineProperty(exports, "__esModule", { value: true })
26
+
27
+
28
+ const XWAPaths = {
29
+ CREATE: 'xwa2_newsletter_create',
30
+ SUBSCRIBERS: 'xwa2_newsletter_subscribers',
31
+ VIEW: 'xwa2_newsletter_view',
32
+ METADATA: 'xwa2_newsletter',
33
+ UPDATE: 'xwa2_newsletter_update',
34
+ ADMIN_COUNT: 'xwa2_newsletter_admin',
35
+ MUTE_V2: 'xwa2_newsletter_mute_v2',
36
+ UNMUTE_V2: 'xwa2_newsletter_unmute_v2',
37
+ FOLLOW: 'xwa2_newsletter_follow',
38
+ UNFOLLOW: 'xwa2_newsletter_unfollow',
39
+ CHANGE_OWNER: 'xwa2_newsletter_change_owner',
40
+ DEMOTE: 'xwa2_newsletter_demote',
41
+ DELETE_V2: 'xwa2_newsletter_delete_v2'
42
+ }
43
+
44
+ const QueryIds = {
45
+ CREATE: '8823471724422422',
46
+ UPDATE_METADATA: '24250201037901610',
47
+ METADATA: '6563316087068696',
48
+ SUBSCRIBERS: '9783111038412085',
49
+ FOLLOW: '7871414976211147',
50
+ UNFOLLOW: '7238632346214362',
51
+ MUTE: '29766401636284406',
52
+ UNMUTE: '9864994326891137',
53
+ ADMIN_COUNT: '7130823597031706',
54
+ CHANGE_OWNER: '7341777602580933',
55
+ DEMOTE: '6551828931592903',
56
+ DELETE: '30062808666639665'
57
+ }
58
+
59
+ /*const MexOperations = {
60
+ PROMOTE: "NotificationNewsletterAdminPromote",
61
+ DEMOTE: "NotificationNewsletterAdminDemote",
62
+ UPDATE: "NotificationNewsletterUpdate"
63
+ }*/
64
+
65
+ module.exports = {
66
+ //MexOperations,
67
+ XWAPaths,
68
+ QueryIds
69
+ }
70
+ return module.exports;
71
+ })();
72
+ for (const key of Object.keys(__kageModule50)) {
73
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule50[key]});
74
+ }
@@ -1,2 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ // Kage: compatibilidad de API.
5
+ const __kageModule51 = (() => {
6
+ const module = { exports: {} }; const exports = module.exports;
7
+ "use strict"
8
+
9
+ Object.defineProperty(exports, "__esModule", { value: true })
10
+ return module.exports;
11
+ })();
12
+ for (const key of Object.keys(__kageModule51)) {
13
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule51[key]});
14
+ }
15
+
16
+ // Kage: funciones avanzadas.
17
+ const __kageModule155 = (() => {
18
+ const module = { exports: {} }; const exports = module.exports;
19
+ "use strict";
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+
22
+ return module.exports;
23
+ })();
24
+ for (const key of Object.keys(__kageModule155)) {
25
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule155[key]});
26
+ }
27
+ Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule155, configurable:true});
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RichSubMessageType = exports.CodeHighlightType = void 0;
4
+ (function (CodeHighlightType) {
5
+ CodeHighlightType[CodeHighlightType["DEFAULT"] = 0] = "DEFAULT";
6
+ CodeHighlightType[CodeHighlightType["KEYWORD"] = 1] = "KEYWORD";
7
+ CodeHighlightType[CodeHighlightType["METHOD"] = 2] = "METHOD";
8
+ CodeHighlightType[CodeHighlightType["STRING"] = 3] = "STRING";
9
+ CodeHighlightType[CodeHighlightType["NUMBER"] = 4] = "NUMBER";
10
+ CodeHighlightType[CodeHighlightType["COMMENT"] = 5] = "COMMENT";
11
+ })(exports.CodeHighlightType || (exports.CodeHighlightType = {}));
12
+ (function (RichSubMessageType) {
13
+ RichSubMessageType[RichSubMessageType["UNKNOWN"] = 0] = "UNKNOWN";
14
+ RichSubMessageType[RichSubMessageType["GRID_IMAGE"] = 1] = "GRID_IMAGE";
15
+ RichSubMessageType[RichSubMessageType["TEXT"] = 2] = "TEXT";
16
+ RichSubMessageType[RichSubMessageType["INLINE_IMAGE"] = 3] = "INLINE_IMAGE";
17
+ RichSubMessageType[RichSubMessageType["TABLE"] = 4] = "TABLE";
18
+ RichSubMessageType[RichSubMessageType["CODE"] = 5] = "CODE";
19
+ RichSubMessageType[RichSubMessageType["DYNAMIC"] = 6] = "DYNAMIC";
20
+ RichSubMessageType[RichSubMessageType["MAP"] = 7] = "MAP";
21
+ RichSubMessageType[RichSubMessageType["LATEX"] = 8] = "LATEX";
22
+ RichSubMessageType[RichSubMessageType["CONTENT_ITEMS"] = 9] = "CONTENT_ITEMS";
23
+ })(exports.RichSubMessageType || (exports.RichSubMessageType = {}));
@@ -1,2 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ // Kage: compatibilidad de API.
5
+ const __kageModule52 = (() => {
6
+ const module = { exports: {} }; const exports = module.exports;
7
+ "use strict"
8
+
9
+ Object.defineProperty(exports, "__esModule", { value: true })
10
+ return module.exports;
11
+ })();
12
+ for (const key of Object.keys(__kageModule52)) {
13
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule52[key]});
14
+ }
15
+
16
+ // Kage: funciones avanzadas.
17
+ const __kageModule156 = (() => {
18
+ const module = { exports: {} }; const exports = module.exports;
19
+ "use strict";
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+
22
+ return module.exports;
23
+ })();
24
+ for (const key of Object.keys(__kageModule156)) {
25
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule156[key]});
26
+ }
27
+ Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule156, configurable:true});
@@ -1,2 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ // Kage: compatibilidad de API.
5
+ const __kageModule53 = (() => {
6
+ const module = { exports: {} }; const exports = module.exports;
7
+ "use strict"
8
+
9
+ Object.defineProperty(exports, "__esModule", { value: true })
10
+ return module.exports;
11
+ })();
12
+ for (const key of Object.keys(__kageModule53)) {
13
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule53[key]});
14
+ }
15
+
16
+ // Kage: funciones avanzadas.
17
+ const __kageModule157 = (() => {
18
+ const module = { exports: {} }; const exports = module.exports;
19
+ "use strict";
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+
22
+ return module.exports;
23
+ })();
24
+ for (const key of Object.keys(__kageModule157)) {
25
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule157[key]});
26
+ }
27
+ Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule157, configurable:true});
@@ -1,2 +1,94 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ // Kage: compatibilidad de API.
5
+ const __kageModule54 = (() => {
6
+ const module = { exports: {} }; const exports = module.exports;
7
+ "use strict"
8
+
9
+ Object.defineProperty(exports, "__esModule", { value: true })
10
+
11
+ const SyncState = {
12
+ Connecting: 0,
13
+ AwaitingInitialSync: 1,
14
+ Syncing: 2,
15
+ Online: 3
16
+ }
17
+
18
+ module.exports = {
19
+ SyncState
20
+ }
21
+ return module.exports;
22
+ })();
23
+ for (const key of Object.keys(__kageModule54)) {
24
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule54[key]});
25
+ }
26
+
27
+ // Kage: funciones avanzadas.
28
+ const __kageModule158 = (() => {
29
+ const module = { exports: {} }; const exports = module.exports;
30
+ "use strict";
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.NewChatMessageCappingOTEStatusType = exports.NewChatMessageCappingMVStatusType = exports.NewChatMessageCappingStatusType = exports.ReachoutTimelockEnforcementType = exports.SyncState = void 0;
33
+ (function (SyncState) {
34
+ /** The socket is connecting, but we haven't received pending notifications yet. */
35
+ SyncState[SyncState["Connecting"] = 0] = "Connecting";
36
+ /** Pending notifications received. Buffering events until we decide whether to sync or not. */
37
+ SyncState[SyncState["AwaitingInitialSync"] = 1] = "AwaitingInitialSync";
38
+ /** The initial app state sync (history, etc.) is in progress. Buffering continues. */
39
+ SyncState[SyncState["Syncing"] = 2] = "Syncing";
40
+ /** Initial sync is complete, or was skipped. The socket is fully operational and events are processed in real-time. */
41
+ SyncState[SyncState["Online"] = 3] = "Online";
42
+ })(exports.SyncState || (exports.SyncState = {}));
43
+ (function (ReachoutTimelockEnforcementType) {
44
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_ALCOHOL"] = "BIZ_COMMERCE_VIOLATION_ALCOHOL";
45
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_ADULT"] = "BIZ_COMMERCE_VIOLATION_ADULT";
46
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_ANIMALS"] = "BIZ_COMMERCE_VIOLATION_ANIMALS";
47
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_BODY_PARTS_FLUIDS"] = "BIZ_COMMERCE_VIOLATION_BODY_PARTS_FLUIDS";
48
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DATING"] = "BIZ_COMMERCE_VIOLATION_DATING";
49
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DIGITAL_SERVICES_PRODUCTS"] = "BIZ_COMMERCE_VIOLATION_DIGITAL_SERVICES_PRODUCTS";
50
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DRUGS"] = "BIZ_COMMERCE_VIOLATION_DRUGS";
51
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DRUGS_ONLY_OTC"] = "BIZ_COMMERCE_VIOLATION_DRUGS_ONLY_OTC";
52
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_GAMBLING"] = "BIZ_COMMERCE_VIOLATION_GAMBLING";
53
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_HEALTHCARE"] = "BIZ_COMMERCE_VIOLATION_HEALTHCARE";
54
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_REAL_FAKE_CURRENCY"] = "BIZ_COMMERCE_VIOLATION_REAL_FAKE_CURRENCY";
55
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_SUPPLEMENTS"] = "BIZ_COMMERCE_VIOLATION_SUPPLEMENTS";
56
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_TOBACCO"] = "BIZ_COMMERCE_VIOLATION_TOBACCO";
57
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_VIOLENT_CONTENT"] = "BIZ_COMMERCE_VIOLATION_VIOLENT_CONTENT";
58
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_WEAPONS"] = "BIZ_COMMERCE_VIOLATION_WEAPONS";
59
+ ReachoutTimelockEnforcementType["BIZ_QUALITY"] = "BIZ_QUALITY";
60
+ /** This means there is no restriction */
61
+ ReachoutTimelockEnforcementType["DEFAULT"] = "DEFAULT";
62
+ ReachoutTimelockEnforcementType["WEB_COMPANION_ONLY"] = "WEB_COMPANION_ONLY";
63
+ })(exports.ReachoutTimelockEnforcementType || (exports.ReachoutTimelockEnforcementType = {}));
64
+ (function (NewChatMessageCappingStatusType) {
65
+ NewChatMessageCappingStatusType["NONE"] = "NONE";
66
+ NewChatMessageCappingStatusType["FIRST_WARNING"] = "FIRST_WARNING";
67
+ NewChatMessageCappingStatusType["SECOND_WARNING"] = "SECOND_WARNING";
68
+ NewChatMessageCappingStatusType["CAPPED"] = "CAPPED";
69
+ })(exports.NewChatMessageCappingStatusType || (exports.NewChatMessageCappingStatusType = {}));
70
+ (function (NewChatMessageCappingMVStatusType) {
71
+ NewChatMessageCappingMVStatusType["NOT_ELIGIBLE"] = "NOT_ELIGIBLE";
72
+ NewChatMessageCappingMVStatusType["NOT_ACTIVE"] = "NOT_ACTIVE";
73
+ NewChatMessageCappingMVStatusType["ACTIVE"] = "ACTIVE";
74
+ NewChatMessageCappingMVStatusType["ACTIVE_UPGRADE_AVAILABLE"] = "ACTIVE_UPGRADE_AVAILABLE";
75
+ })(exports.NewChatMessageCappingMVStatusType || (exports.NewChatMessageCappingMVStatusType = {}));
76
+ (function (NewChatMessageCappingOTEStatusType) {
77
+ NewChatMessageCappingOTEStatusType["NOT_ELIGIBLE"] = "NOT_ELIGIBLE";
78
+ NewChatMessageCappingOTEStatusType["ELIGIBLE"] = "ELIGIBLE";
79
+ NewChatMessageCappingOTEStatusType["ACTIVE_IN_CURRENT_CYCLE"] = "ACTIVE_IN_CURRENT_CYCLE";
80
+ NewChatMessageCappingOTEStatusType["EXHAUSTED"] = "EXHAUSTED";
81
+ })(exports.NewChatMessageCappingOTEStatusType || (exports.NewChatMessageCappingOTEStatusType = {}));
82
+
83
+ return module.exports;
84
+ })();
85
+ for (const key of Object.keys(__kageModule158)) {
86
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule158[key]});
87
+ }
88
+ Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule158, configurable:true});
89
+
90
+ // Kage: superficie pública completa.
91
+ for (const name of ["SyncState"]) {
92
+ const advanced = exports[Symbol.for('kage.advanced')][name];
93
+ for (const [key, value] of Object.entries(advanced || {})) if (!(key in exports[name])) exports[name][key] = value;
94
+ }
@@ -1,2 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ // Kage: compatibilidad de API.
5
+ const __kageModule55 = (() => {
6
+ const module = { exports: {} }; const exports = module.exports;
7
+ "use strict"
8
+
9
+ Object.defineProperty(exports, "__esModule", { value: true })
10
+ return module.exports;
11
+ })();
12
+ for (const key of Object.keys(__kageModule55)) {
13
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule55[key]});
14
+ }
15
+
16
+ // Kage: funciones avanzadas.
17
+ const __kageModule159 = (() => {
18
+ const module = { exports: {} }; const exports = module.exports;
19
+ "use strict";
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+
22
+ return module.exports;
23
+ })();
24
+ for (const key of Object.keys(__kageModule159)) {
25
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule159[key]});
26
+ }
27
+ Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule159, configurable:true});
@@ -40,3 +40,136 @@ var DisconnectReason;
40
40
  DisconnectReason[DisconnectReason["forbidden"] = 403] = "forbidden";
41
41
  DisconnectReason[DisconnectReason["unavailableService"] = 503] = "unavailableService";
42
42
  })(DisconnectReason || (exports.DisconnectReason = DisconnectReason = {}));
43
+
44
+ // Kage: compatibilidad de API.
45
+ const __kageModule56 = (() => {
46
+ const module = { exports: {} }; const exports = module.exports;
47
+ "use strict"
48
+
49
+ const __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
50
+ if (k2 === undefined) k2 = k
51
+
52
+ let desc = Object.getOwnPropertyDescriptor(m, k)
53
+
54
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
55
+ desc = {
56
+ enumerable: true,
57
+ get: function() {
58
+ return m[k]
59
+ }
60
+ }
61
+ }
62
+
63
+ Object.defineProperty(o, k2, desc)
64
+
65
+ }) : (function(o, m, k, k2) {
66
+ if (k2 === undefined) k2 = k
67
+ o[k2] = m[k]
68
+ }
69
+ ))
70
+
71
+ const __exportStar = (this && this.__exportStar) || function(m, exports) {
72
+ for (var p in m) {
73
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) {
74
+ __createBinding(exports, m, p)
75
+ }
76
+ }
77
+ }
78
+
79
+ Object.defineProperty(exports, "__esModule", {
80
+ value: true
81
+ })
82
+
83
+ exports.DisconnectReason = null
84
+ __exportStar(require("./Auth"), exports)
85
+ __exportStar(require("./Bussines"), exports)
86
+ __exportStar(require("./Chat"), exports)
87
+ __exportStar(require("./Contact"), exports)
88
+ __exportStar(require("./GroupMetadata"), exports)
89
+ __exportStar(require("./State"), exports)
90
+ __exportStar(require("./MexUpdates"), exports)
91
+ __exportStar(require("./Message"), exports)
92
+ __exportStar(require("./Newsletter"), exports)
93
+ __exportStar(require("./Socket"), exports)
94
+ __exportStar(require("./Events"), exports)
95
+ __exportStar(require("./Product"), exports)
96
+ __exportStar(require("./Call"), exports)
97
+ __exportStar(require("./Signal"), exports)
98
+
99
+ const DisconnectReason = {
100
+ connectionClosed: 428,
101
+ connectionLost: 408,
102
+ connectionReplaced: 440,
103
+ timedOut: 408,
104
+ loggedOut: 401,
105
+ badSession: 500,
106
+ restartRequired: 515,
107
+ multideviceMismatch: 411,
108
+ forbidden: 403,
109
+ unavailableService: 503
110
+ }
111
+
112
+ exports.DisconnectReason = DisconnectReason
113
+ return module.exports;
114
+ })();
115
+ for (const key of Object.keys(__kageModule56)) {
116
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule56[key]});
117
+ }
118
+
119
+ // Kage: funciones avanzadas.
120
+ const __kageModule160 = (() => {
121
+ const module = { exports: {} }; const exports = module.exports;
122
+ "use strict";
123
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
124
+ if (k2 === undefined) k2 = k;
125
+ var desc = Object.getOwnPropertyDescriptor(m, k);
126
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
127
+ desc = { enumerable: true, get: function() { return m[k]; } };
128
+ }
129
+ Object.defineProperty(o, k2, desc);
130
+ }) : (function(o, m, k, k2) {
131
+ if (k2 === undefined) k2 = k;
132
+ o[k2] = m[k];
133
+ }));
134
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
135
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
136
+ };
137
+ Object.defineProperty(exports, "__esModule", { value: true });
138
+ exports.DisconnectReason = void 0;
139
+ __exportStar(require("./Auth.js"), exports);
140
+ __exportStar(require("./GroupMetadata.js"), exports);
141
+ __exportStar(require("./Chat.js"), exports);
142
+ __exportStar(require("./Contact.js"), exports);
143
+ __exportStar(require("./State.js"), exports);
144
+ __exportStar(require("./Message.js"), exports);
145
+ __exportStar(require("./Socket.js"), exports);
146
+ __exportStar(require("./Events.js"), exports);
147
+ __exportStar(require("./Product.js"), exports);
148
+ __exportStar(require("./Call.js"), exports);
149
+ __exportStar(require("./Signal.js"), exports);
150
+ __exportStar(require("./Mex.js"), exports);
151
+ (function (DisconnectReason) {
152
+ DisconnectReason[DisconnectReason["connectionClosed"] = 428] = "connectionClosed";
153
+ DisconnectReason[DisconnectReason["connectionLost"] = 408] = "connectionLost";
154
+ DisconnectReason[DisconnectReason["connectionReplaced"] = 440] = "connectionReplaced";
155
+ DisconnectReason[DisconnectReason["timedOut"] = 408] = "timedOut";
156
+ DisconnectReason[DisconnectReason["loggedOut"] = 401] = "loggedOut";
157
+ DisconnectReason[DisconnectReason["badSession"] = 500] = "badSession";
158
+ DisconnectReason[DisconnectReason["restartRequired"] = 515] = "restartRequired";
159
+ DisconnectReason[DisconnectReason["multideviceMismatch"] = 411] = "multideviceMismatch";
160
+ DisconnectReason[DisconnectReason["forbidden"] = 403] = "forbidden";
161
+ DisconnectReason[DisconnectReason["unavailableService"] = 503] = "unavailableService";
162
+ })(exports.DisconnectReason || (exports.DisconnectReason = {}));
163
+
164
+ return module.exports;
165
+ })();
166
+ for (const key of Object.keys(__kageModule160)) {
167
+ if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule160[key]});
168
+ }
169
+ Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule160, configurable:true});
170
+
171
+ // Kage: superficie pública completa.
172
+ const canonicalMex = require('./Mex');
173
+ for (const name of ['XWAPaths', 'QueryIds']) {
174
+ if (exports[name]) Object.assign(exports[name], canonicalMex[name]);
175
+ }