@devil-fight/baileys 1.0.4 → 1.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 (105) hide show
  1. package/README.md +1 -1
  2. package/lib/Defaults/index.d.ts +53 -0
  3. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  4. package/lib/Signal/Group/group-session-builder.d.ts +14 -0
  5. package/lib/Signal/Group/group_cipher.d.ts +17 -0
  6. package/lib/Signal/Group/index.d.ts +11 -0
  7. package/lib/Signal/Group/keyhelper.d.ts +10 -0
  8. package/lib/Signal/Group/queue-job.d.ts +1 -0
  9. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  10. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  11. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  12. package/lib/Signal/Group/sender-key-name.d.ts +17 -0
  13. package/lib/Signal/Group/sender-key-record.d.ts +30 -0
  14. package/lib/Signal/Group/sender-key-state.d.ts +38 -0
  15. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  16. package/lib/Signal/libsignal.d.ts +3 -0
  17. package/lib/Socket/Client/abstract-socket-client.d.ts +17 -0
  18. package/lib/Socket/Client/index.d.ts +3 -0
  19. package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
  20. package/lib/Socket/Client/web-socket-client.d.ts +12 -0
  21. package/lib/Socket/business.d.ts +171 -0
  22. package/lib/Socket/chats.d.ts +267 -0
  23. package/lib/Socket/chats.js +1 -20
  24. package/lib/Socket/dugong.d.ts +254 -0
  25. package/lib/Socket/dugong.js +7 -160
  26. package/lib/Socket/groups.d.ts +115 -0
  27. package/lib/Socket/index.d.ts +173 -0
  28. package/lib/Socket/messages-recv.d.ts +161 -0
  29. package/lib/Socket/messages-send.d.ts +149 -0
  30. package/lib/Socket/messages-send.js +210 -132
  31. package/lib/Socket/newsletter.d.ts +134 -0
  32. package/lib/Socket/newsletter.js +31 -139
  33. package/lib/Socket/registration.d.ts +267 -0
  34. package/lib/Socket/socket.d.ts +43 -0
  35. package/lib/Socket/usync.d.ts +36 -0
  36. package/lib/Store/index.d.ts +3 -0
  37. package/lib/Store/make-cache-manager-store.d.ts +13 -0
  38. package/lib/Store/make-in-memory-store.d.ts +118 -0
  39. package/lib/Store/make-ordered-dictionary.d.ts +13 -0
  40. package/lib/Store/object-repository.d.ts +10 -0
  41. package/lib/Types/Auth.d.ts +110 -0
  42. package/lib/Types/Call.d.ts +13 -0
  43. package/lib/Types/Chat.d.ts +102 -0
  44. package/lib/Types/Contact.d.ts +19 -0
  45. package/lib/Types/Events.d.ts +157 -0
  46. package/lib/Types/GroupMetadata.d.ts +55 -0
  47. package/lib/Types/Label.d.ts +35 -0
  48. package/lib/Types/LabelAssociation.d.ts +29 -0
  49. package/lib/Types/Message.d.ts +273 -0
  50. package/lib/Types/Newsletter.d.ts +103 -0
  51. package/lib/Types/Product.d.ts +78 -0
  52. package/lib/Types/Signal.d.ts +57 -0
  53. package/lib/Types/Socket.d.ts +111 -0
  54. package/lib/Types/State.d.ts +27 -0
  55. package/lib/Types/USync.d.ts +25 -0
  56. package/lib/Types/index.d.ts +57 -0
  57. package/lib/Utils/auth-utils.d.ts +18 -0
  58. package/lib/Utils/baileys-event-stream.d.ts +16 -0
  59. package/lib/Utils/business.d.ts +22 -0
  60. package/lib/Utils/chat-utils.d.ts +71 -0
  61. package/lib/Utils/crypto.d.ts +41 -0
  62. package/lib/Utils/decode-wa-message.d.ts +19 -0
  63. package/lib/Utils/event-buffer.d.ts +35 -0
  64. package/lib/Utils/generics.d.ts +92 -0
  65. package/lib/Utils/generics.js +4 -79
  66. package/lib/Utils/history.d.ts +15 -0
  67. package/lib/Utils/index.d.ts +17 -0
  68. package/lib/Utils/link-preview.d.ts +21 -0
  69. package/lib/Utils/logger.d.ts +4 -0
  70. package/lib/Utils/lt-hash.d.ts +12 -0
  71. package/lib/Utils/make-mutex.d.ts +7 -0
  72. package/lib/Utils/messages-media.d.ts +116 -0
  73. package/lib/Utils/messages.d.ts +77 -0
  74. package/lib/Utils/messages.js +1 -4
  75. package/lib/Utils/noise-handler.d.ts +21 -0
  76. package/lib/Utils/process-message.d.ts +41 -0
  77. package/lib/Utils/signal.d.ts +32 -0
  78. package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
  79. package/lib/Utils/validate-connection.d.ts +11 -0
  80. package/lib/WABinary/constants.d.ts +30 -0
  81. package/lib/WABinary/decode.d.ts +7 -0
  82. package/lib/WABinary/encode.d.ts +3 -0
  83. package/lib/WABinary/generic-utils.d.ts +17 -0
  84. package/lib/WABinary/index.d.ts +5 -0
  85. package/lib/WABinary/jid-utils.d.ts +31 -0
  86. package/lib/WABinary/types.d.ts +18 -0
  87. package/lib/WAM/BinaryInfo.d.ts +17 -0
  88. package/lib/WAM/constants.d.ts +38 -0
  89. package/lib/WAM/encode.d.ts +3 -0
  90. package/lib/WAM/index.d.ts +3 -0
  91. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
  92. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
  93. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  94. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  95. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
  96. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +8 -0
  97. package/lib/WAUSync/Protocols/index.d.ts +4 -0
  98. package/lib/WAUSync/USyncQuery.d.ts +28 -0
  99. package/lib/WAUSync/USyncUser.d.ts +12 -0
  100. package/lib/WAUSync/index.d.ts +3 -0
  101. package/lib/index.d.ts +12 -0
  102. package/lib/index.js +1 -1
  103. package/package.json +8 -6
  104. package/LICENSE +0 -21
  105. package/lib/Defaults/information.json +0 -1
@@ -0,0 +1,12 @@
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
+ export type DisappearingModeData = {
4
+ duration: number;
5
+ setAt?: Date;
6
+ };
7
+ export declare class USyncDisappearingModeProtocol implements USyncQueryProtocol {
8
+ name: string;
9
+ getQueryElement(): BinaryNode;
10
+ getUserElement(): null;
11
+ parser(node: BinaryNode): DisappearingModeData | undefined;
12
+ }
@@ -0,0 +1,12 @@
1
+ import { USyncQueryProtocol } from '../../Types/USync';
2
+ import { BinaryNode } from '../../WABinary';
3
+ export type StatusData = {
4
+ status?: string | null;
5
+ setAt?: Date;
6
+ };
7
+ export declare class USyncStatusProtocol implements USyncQueryProtocol {
8
+ name: string;
9
+ getQueryElement(): BinaryNode;
10
+ getUserElement(): null;
11
+ parser(node: BinaryNode): StatusData | undefined;
12
+ }
@@ -0,0 +1,25 @@
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
+ }
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,4 @@
1
+ export * from './USyncDeviceProtocol';
2
+ export * from './USyncContactProtocol';
3
+ export * from './USyncStatusProtocol';
4
+ export * from './USyncDisappearingModeProtocol';
@@ -0,0 +1,28 @@
1
+ import { USyncQueryProtocol } from '../Types/USync';
2
+ import { BinaryNode } from '../WABinary';
3
+ import { USyncUser } from './USyncUser';
4
+ export type USyncQueryResultList = {
5
+ [protocol: string]: unknown;
6
+ id: string;
7
+ };
8
+ export type USyncQueryResult = {
9
+ list: USyncQueryResultList[];
10
+ sideList: USyncQueryResultList[];
11
+ };
12
+ export declare class USyncQuery {
13
+ protocols: USyncQueryProtocol[];
14
+ users: USyncUser[];
15
+ context: string;
16
+ mode: string;
17
+ constructor();
18
+ withMode(mode: string): this;
19
+ withContext(context: string): this;
20
+ withUser(user: USyncUser): this;
21
+ parseUSyncQueryResult(result: BinaryNode): USyncQueryResult | undefined;
22
+ withDeviceProtocol(): this;
23
+ withContactProtocol(): this;
24
+ withStatusProtocol(): this;
25
+ withDisappearingModeProtocol(): this;
26
+ withBotProfileProtocol(): this;
27
+ withLIDProtocol(): this;
28
+ }
@@ -0,0 +1,12 @@
1
+ export declare class USyncUser {
2
+ id: string;
3
+ lid: string;
4
+ phone: string;
5
+ type: string;
6
+ personaId: string;
7
+ withId(id: string): this;
8
+ withLid(lid: string): this;
9
+ withPhone(phone: string): this;
10
+ withType(type: string): this;
11
+ withPersonaId(personaId: string): this;
12
+ }
@@ -0,0 +1,3 @@
1
+ export * from './Protocols';
2
+ export * from './USyncQuery';
3
+ export * from './USyncUser';
package/lib/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import makeWASocket from './Socket';
2
+ export * from '../WAProto';
3
+ export * from './Utils';
4
+ export * from './Types';
5
+ export * from './Store';
6
+ export * from './Defaults';
7
+ export * from './WABinary';
8
+ export * from './WAM';
9
+ export * from './WAUSync';
10
+ export type WASocket = ReturnType<typeof makeWASocket>;
11
+ export { makeWASocket };
12
+ export default makeWASocket;
package/lib/index.js CHANGED
@@ -30,4 +30,4 @@ __exportStar(require("./WABinary"), exports);
30
30
  __exportStar(require("./WAM"), exports);
31
31
  __exportStar(require("./WAUSync"), exports);
32
32
 
33
- exports.default = Socket_1.default;
33
+ exports.default = Socket_1.default;
package/package.json CHANGED
@@ -1,18 +1,20 @@
1
1
  {
2
2
  "name": "@devil-fight/baileys",
3
- "version": "1.0.4",
4
- "description": " Baileys Modifikasi",
3
+ "version": "1.0.5",
4
+ "description": "WhatsApp API Modification",
5
5
  "keywords": [
6
6
  "whatsapp",
7
+ "laurine-wabot",
7
8
  "baileys",
8
9
  "whatsapp-web",
9
10
  "whatsapp-chat",
10
11
  "whatsapp-group",
11
- "botwa"
12
+ "botwa",
13
+ "stvnnvs"
12
14
  ],
13
- "homepage": "https://github.com/DevilFight/Baileys",
15
+ "homepage": "https://github.com/VinzzOfficial/Baileys",
14
16
  "repository": {
15
- "url": "https://github.com/DevilFight/Baileys"
17
+ "url": "git@github.com/VinzzOfficial/Baileys.git"
16
18
  },
17
19
  "license": "MIT",
18
20
  "author": "Devil Fight",
@@ -49,7 +51,7 @@
49
51
  "futoin-hkdf": "^1.5.1",
50
52
  "libphonenumber-js": "^1.10.20",
51
53
  "lodash": "^4.17.21",
52
- "libsignal": "npm:@devil-fight/libsignal-node",
54
+ "libsignal": "github:DevilFight/libsignal-node",
53
55
  "music-metadata": "^7.12.3",
54
56
  "node-cache": "^5.1.2",
55
57
  "node-fetch": "^2.6.1",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Devil Fight
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 +0,0 @@
1
- ["hello world"]