@ostyado/baileys 1.1.8 → 1.1.9
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.
- package/WAProto/fix-import.js +29 -0
- package/WAProto/index.js +65432 -137443
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.d.ts +53 -0
- package/lib/Defaults/index.js +6 -6
- package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/lib/Signal/Group/group-session-builder.d.ts +14 -0
- package/lib/Signal/Group/group_cipher.d.ts +17 -0
- package/lib/Signal/Group/index.d.ts +11 -0
- package/lib/Signal/Group/keyhelper.d.ts +10 -0
- package/lib/Signal/Group/queue-job.d.ts +1 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
- package/lib/Signal/Group/sender-key-message.d.ts +18 -0
- package/lib/Signal/Group/sender-key-name.d.ts +17 -0
- package/lib/Signal/Group/sender-key-record.d.ts +30 -0
- package/lib/Signal/Group/sender-key-state.d.ts +38 -0
- package/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/lib/Signal/libsignal.d.ts +3 -0
- package/lib/Socket/Client/abstract-socket-client.d.ts +17 -0
- package/lib/Socket/Client/index.d.ts +3 -0
- package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
- package/lib/Socket/Client/web-socket-client.d.ts +12 -0
- package/lib/Socket/business.d.ts +171 -0
- package/lib/Socket/chats.d.ts +267 -0
- package/lib/Socket/chats.js +16 -48
- package/lib/Socket/groups.d.ts +115 -0
- package/lib/Socket/groups.js +64 -0
- package/lib/Socket/index.d.ts +173 -0
- package/lib/Socket/luxu.d.ts +278 -0
- package/lib/Socket/luxu.js +620 -0
- package/lib/Socket/messages-recv.d.ts +161 -0
- package/lib/Socket/messages-send.d.ts +149 -0
- package/lib/Socket/messages-send.js +300 -145
- package/lib/Socket/newsletter.d.ts +134 -0
- package/lib/Socket/newsletter.js +15 -134
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/socket.d.ts +44 -0
- package/lib/Socket/socket.js +73 -2
- package/lib/Socket/usync.d.ts +36 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/make-cache-manager-store.d.ts +13 -0
- package/lib/Store/make-in-memory-store.d.ts +118 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Types/Auth.d.ts +110 -0
- package/lib/Types/Call.d.ts +13 -0
- package/lib/Types/Chat.d.ts +102 -0
- package/lib/Types/Contact.d.ts +19 -0
- package/lib/Types/Events.d.ts +157 -0
- package/lib/Types/GroupMetadata.d.ts +55 -0
- package/lib/Types/Label.d.ts +35 -0
- package/lib/Types/LabelAssociation.d.ts +29 -0
- package/lib/Types/Message.d.ts +273 -0
- package/lib/Types/Newsletter.d.ts +103 -0
- package/lib/Types/Product.d.ts +78 -0
- package/lib/Types/Signal.d.ts +57 -0
- package/lib/Types/Socket.d.ts +111 -0
- package/lib/Types/State.d.ts +27 -0
- package/lib/Types/USync.d.ts +25 -0
- package/lib/Types/index.d.ts +57 -0
- package/lib/Utils/auth-utils.d.ts +18 -0
- package/lib/Utils/baileys-event-stream.d.ts +16 -0
- package/lib/Utils/business.d.ts +22 -0
- package/lib/Utils/chat-utils.d.ts +71 -0
- package/lib/Utils/crypto.d.ts +41 -0
- package/lib/Utils/decode-wa-message.d.ts +19 -0
- package/lib/Utils/event-buffer.d.ts +35 -0
- package/lib/Utils/generics.d.ts +92 -0
- package/lib/Utils/generics.js +5 -80
- package/lib/Utils/history.d.ts +15 -0
- package/lib/Utils/index.d.ts +17 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/logger.d.ts +4 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/lib/Utils/messages-media.d.ts +116 -0
- package/lib/Utils/messages.d.ts +77 -0
- package/lib/Utils/messages.js +3 -6
- package/lib/Utils/noise-handler.d.ts +21 -0
- package/lib/Utils/process-message.d.ts +41 -0
- package/lib/Utils/signal.d.ts +32 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/lib/Utils/validate-connection.js +2 -2
- package/lib/WABinary/constants.d.ts +30 -0
- package/lib/WABinary/decode.d.ts +7 -0
- package/lib/WABinary/encode.d.ts +3 -0
- package/lib/WABinary/generic-utils.d.ts +17 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/jid-utils.d.ts +31 -0
- package/lib/WABinary/types.d.ts +18 -0
- package/lib/WAM/BinaryInfo.d.ts +17 -0
- package/lib/WAM/constants.d.ts +38 -0
- package/lib/WAM/encode.d.ts +3 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +8 -0
- package/lib/WAUSync/Protocols/index.d.ts +4 -0
- package/lib/WAUSync/USyncQuery.d.ts +28 -0
- package/lib/WAUSync/USyncUser.d.ts +12 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.js +3 -14
- package/package.json +12 -14
- package/LICENSE +0 -21
- package/lib/Socket/dugong.js +0 -637
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const { readFileSync, writeFileSync } = require 'fs';
|
|
2
|
+
const { exit } = require 'process';
|
|
3
|
+
|
|
4
|
+
const filePath = './index.js';
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
// Read the file
|
|
8
|
+
let content = readFileSync(filePath, 'utf8');
|
|
9
|
+
|
|
10
|
+
// Fix the import statement
|
|
11
|
+
content = content.replace(
|
|
12
|
+
/import \* as (\$protobuf) from/g,
|
|
13
|
+
'import $1 from'
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// add missing extension to the import
|
|
17
|
+
content = content.replace(
|
|
18
|
+
/(['"])protobufjs\/minimal(['"])/g,
|
|
19
|
+
'$1protobufjs/minimal.js$2'
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
// Write back
|
|
23
|
+
writeFileSync(filePath, content, 'utf8');
|
|
24
|
+
|
|
25
|
+
console.log(`✅ Fixed imports in ${filePath}`);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.error(`❌ Error fixing imports: ${error.message}`);
|
|
28
|
+
exit(1);
|
|
29
|
+
}
|