@fer2809fl/baileys 7.0.4 → 7.0.5

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 (51) hide show
  1. package/README.md +347 -50
  2. package/lib/Defaults/index.js +1 -1
  3. package/lib/Modded/message_builder.js +2356 -0
  4. package/lib/Socket/chats.d.ts +14 -0
  5. package/lib/Socket/chats.js +48 -0
  6. package/lib/Socket/index.d.ts +17 -0
  7. package/lib/Socket/messages-send.d.ts +18 -0
  8. package/lib/Socket/messages-send.js +50 -2
  9. package/lib/Utils/anti-ban.d.ts +41 -0
  10. package/lib/Utils/anti-ban.js +182 -0
  11. package/lib/Utils/banner.d.ts +8 -0
  12. package/lib/Utils/banner.js +76 -0
  13. package/lib/Utils/bot-utils.d.ts +57 -0
  14. package/lib/Utils/bot-utils.js +241 -0
  15. package/lib/Utils/enhanced-cache.d.ts +40 -0
  16. package/lib/Utils/enhanced-cache.js +242 -0
  17. package/lib/Utils/enhanced-logger.d.ts +41 -0
  18. package/lib/Utils/enhanced-logger.js +185 -0
  19. package/lib/Utils/index.d.ts +14 -0
  20. package/lib/Utils/index.js +13 -0
  21. package/lib/Utils/lid-utils.d.ts +139 -0
  22. package/lib/Utils/lid-utils.js +503 -0
  23. package/lib/Utils/message-queue.d.ts +47 -0
  24. package/lib/Utils/message-queue.js +226 -0
  25. package/lib/Utils/rich-message-utils.d.ts +21 -0
  26. package/lib/Utils/rich-message-utils.js +229 -0
  27. package/lib/Utils/rich-messages.d.ts +52 -0
  28. package/lib/Utils/rich-messages.js +185 -0
  29. package/lib/Utils/scheduled-messages.d.ts +122 -0
  30. package/lib/Utils/scheduled-messages.js +289 -0
  31. package/lib/Utils/smart-reconnect.d.ts +48 -0
  32. package/lib/Utils/smart-reconnect.js +207 -0
  33. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  34. package/lib/Utils/use-sqlite-auth-state.js +95 -0
  35. package/lib/VoIP/audio-feeder.d.ts +15 -0
  36. package/lib/VoIP/audio-feeder.js +132 -0
  37. package/lib/VoIP/index.js +277 -0
  38. package/lib/VoIP/relay-transport.d.ts +43 -0
  39. package/lib/VoIP/relay-transport.js +559 -0
  40. package/lib/VoIP/signaling.js +594 -0
  41. package/lib/VoIP/types.d.ts +69 -0
  42. package/lib/VoIP/types.js +17 -0
  43. package/lib/VoIP/wasm-engine.d.ts +103 -0
  44. package/lib/VoIP/wasm-engine.js +1214 -0
  45. package/lib/VoIP/worker-bootstrap.js +1042 -0
  46. package/lib/assets/wasm/loader.js +5 -0
  47. package/lib/assets/wasm/whatsapp.wasm +0 -0
  48. package/lib/assets/wasm/worker-modules.js +273 -0
  49. package/lib/index.d.ts +41 -0
  50. package/lib/index.js +3 -0
  51. package/package.json +10 -2
package/lib/index.d.ts CHANGED
@@ -7,6 +7,47 @@ export * from './WABinary/index.js';
7
7
  export * from './WAM/index.js';
8
8
  export * from './WAUSync/index.js';
9
9
  export { Dugong } from './Socket/dugong.js';
10
+ // -- Añadido en v7.0.5: portado desde el fork beta (tipado laxo, ver README) --
11
+ export declare const VERSION: string;
12
+ export declare class Button {
13
+ [key: string]: any;
14
+ constructor(...args: any[]);
15
+ }
16
+ export declare class ButtonV2 {
17
+ [key: string]: any;
18
+ constructor(...args: any[]);
19
+ }
20
+ export declare class Carousel {
21
+ [key: string]: any;
22
+ constructor(...args: any[]);
23
+ }
24
+ export declare class AIRich {
25
+ [key: string]: any;
26
+ constructor(...args: any[]);
27
+ }
28
+ export declare class ORich extends AIRich {
29
+ }
30
+ export declare const Toolkit: any;
31
+ export declare class VoipClient {
32
+ [key: string]: any;
33
+ constructor(...args: any[]);
34
+ }
35
+ export declare class ActiveCall {
36
+ [key: string]: any;
37
+ constructor(...args: any[]);
38
+ }
39
+ /** Mirrors the WhatsApp WASM `CallState` enum. */
40
+ export declare const CallState: {
41
+ readonly Idle: 0;
42
+ readonly Calling: 1;
43
+ readonly PreacceptReceived: 2;
44
+ readonly ReceivedCall: 3;
45
+ readonly AcceptSent: 4;
46
+ readonly AcceptReceived: 5;
47
+ readonly Active: 6;
48
+ readonly ActiveElsewhere: 7;
49
+ readonly Ending: 13;
50
+ };
10
51
  export type WASocket = ReturnType<typeof makeWASocket>;
11
52
  export { makeWASocket };
12
53
  export default makeWASocket;
package/lib/index.js CHANGED
@@ -7,6 +7,9 @@ export * from './WABinary/index.js';
7
7
  export * from './WAM/index.js';
8
8
  export * from './WAUSync/index.js';
9
9
  export { Dugong } from './Socket/dugong.js';
10
+ // -- Añadido en v7.0.5: portado desde el fork beta --
11
+ export * from './Modded/message_builder.js';
12
+ export { VoipClient, ActiveCall, CallState } from './VoIP/index.js';
10
13
  export { makeWASocket };
11
14
  export default makeWASocket;
12
15
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fer2809fl/baileys",
3
3
  "type": "module",
4
- "version": "7.0.4",
4
+ "version": "7.0.5",
5
5
  "description": "BAILEYS",
6
6
  "homepage": "https://github.com/Fer2809fl/Bail",
7
7
  "repository": {
@@ -28,7 +28,11 @@
28
28
  "multi-device",
29
29
  "bot",
30
30
  "automation",
31
- "interactive-messages"
31
+ "interactive-messages",
32
+ "voip",
33
+ "voice-calls",
34
+ "anti-ban",
35
+ "scheduler"
32
36
  ],
33
37
  "dependencies": {
34
38
  "@cacheable/node-cache": "^1.4.0",
@@ -55,6 +59,7 @@
55
59
  },
56
60
  "peerDependencies": {
57
61
  "audio-decode": "^2.1.3",
62
+ "better-sqlite3": "^11.0.0",
58
63
  "jimp": "^1.6.0",
59
64
  "link-preview-js": "^3.0.0",
60
65
  "sharp": "*"
@@ -63,6 +68,9 @@
63
68
  "audio-decode": {
64
69
  "optional": true
65
70
  },
71
+ "better-sqlite3": {
72
+ "optional": true
73
+ },
66
74
  "jimp": {
67
75
  "optional": true
68
76
  },