nrx-bails 0.0.1
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/LICENSE +21 -0
- package/README.md +1541 -0
- package/WAProto/GenerateStatics.sh +4 -0
- package/WAProto/WAProto.proto +4775 -0
- package/WAProto/index.d.ts +2 -0
- package/WAProto/index.js +169661 -0
- package/lib/Defaults/index.d.ts +113 -0
- package/lib/Defaults/index.js +156 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Defaults/ye-bail-version.json +3 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
- package/lib/Signal/Group/ciphertext-message.js +41 -0
- package/lib/Signal/Group/group-session-builder.d.ts +8 -0
- package/lib/Signal/Group/group-session-builder.js +90 -0
- package/lib/Signal/Group/group_cipher.d.ts +12 -0
- package/lib/Signal/Group/group_cipher.js +122 -0
- package/lib/Signal/Group/index.d.ts +22 -0
- package/lib/Signal/Group/index.js +83 -0
- package/lib/Signal/Group/keyhelper.d.ts +7 -0
- package/lib/Signal/Group/keyhelper.js +81 -0
- package/lib/Signal/Group/queue-job.d.ts +3 -0
- package/lib/Signal/Group/queue-job.js +83 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
- package/lib/Signal/Group/sender-chain-key.js +60 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +92 -0
- package/lib/Signal/Group/sender-key-message.d.ts +19 -0
- package/lib/Signal/Group/sender-key-message.js +95 -0
- package/lib/Signal/Group/sender-key-name.d.ts +12 -0
- package/lib/Signal/Group/sender-key-name.js +77 -0
- package/lib/Signal/Group/sender-key-record.d.ts +13 -0
- package/lib/Signal/Group/sender-key-record.js +79 -0
- package/lib/Signal/Group/sender-key-state.d.ts +17 -0
- package/lib/Signal/Group/sender-key-state.js +125 -0
- package/lib/Signal/Group/sender-message-key.d.ts +12 -0
- package/lib/Signal/Group/sender-message-key.js +55 -0
- package/lib/Signal/libsignal.d.ts +37 -0
- package/lib/Signal/libsignal.js +200 -0
- package/lib/Socket/Client/index.d.ts +1 -0
- package/lib/Socket/Client/index.js +44 -0
- package/lib/Socket/Client/types.d.ts +7 -0
- package/lib/Socket/Client/types.js +39 -0
- package/lib/Socket/Client/websocket.d.ts +19 -0
- package/lib/Socket/Client/websocket.js +137 -0
- package/lib/Socket/business.d.ts +329 -0
- package/lib/Socket/business.js +286 -0
- package/lib/Socket/chats.d.ts +84 -0
- package/lib/Socket/chats.js +1022 -0
- package/lib/Socket/groups.d.ts +216 -0
- package/lib/Socket/groups.js +358 -0
- package/lib/Socket/index.d.ts +330 -0
- package/lib/Socket/index.js +36 -0
- package/lib/Socket/messages-recv.d.ts +271 -0
- package/lib/Socket/messages-recv.js +1079 -0
- package/lib/Socket/messages-send.d.ts +258 -0
- package/lib/Socket/messages-send.js +1190 -0
- package/lib/Socket/newsletter.d.ts +253 -0
- package/lib/Socket/newsletter.js +362 -0
- package/lib/Socket/registration.d.ts +361 -0
- package/lib/Socket/registration.js +179 -0
- package/lib/Socket/socket.d.ts +33 -0
- package/lib/Socket/socket.js +699 -0
- package/lib/Socket/usync.d.ts +27 -0
- package/lib/Socket/usync.js +96 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +36 -0
- package/lib/Store/make-cache-manager-auth-state.d.ts +16 -0
- package/lib/Store/make-cache-manager-auth-state.js +118 -0
- package/lib/Store/make-in-memory-store.d.ts +64 -0
- package/lib/Store/make-in-memory-store.js +465 -0
- package/lib/Store/make-ordered-dictionary.d.ts +14 -0
- package/lib/Store/make-ordered-dictionary.js +107 -0
- package/lib/Store/object-repository.d.ts +11 -0
- package/lib/Store/object-repository.js +53 -0
- package/lib/Types/Auth.d.ts +1 -0
- package/lib/Types/Auth.js +28 -0
- package/lib/Types/Call.d.ts +1 -0
- package/lib/Types/Call.js +28 -0
- package/lib/Types/Chat.d.ts +2 -0
- package/lib/Types/Chat.js +30 -0
- package/lib/Types/Contact.d.ts +1 -0
- package/lib/Types/Contact.js +28 -0
- package/lib/Types/Events.d.ts +1 -0
- package/lib/Types/Events.js +28 -0
- package/lib/Types/GroupMetadata.d.ts +1 -0
- package/lib/Types/GroupMetadata.js +28 -0
- package/lib/Types/Label.d.ts +2 -0
- package/lib/Types/Label.js +53 -0
- package/lib/Types/LabelAssociation.d.ts +2 -0
- package/lib/Types/LabelAssociation.js +35 -0
- package/lib/Types/Message.d.ts +2 -0
- package/lib/Types/Message.js +33 -0
- package/lib/Types/Newsletter.d.ts +4 -0
- package/lib/Types/Newsletter.js +62 -0
- package/lib/Types/Product.d.ts +1 -0
- package/lib/Types/Product.js +28 -0
- package/lib/Types/Signal.d.ts +1 -0
- package/lib/Types/Signal.js +28 -0
- package/lib/Types/Socket.d.ts +1 -0
- package/lib/Types/Socket.js +28 -0
- package/lib/Types/State.d.ts +1 -0
- package/lib/Types/State.js +28 -0
- package/lib/Types/USync.d.ts +1 -0
- package/lib/Types/USync.js +28 -0
- package/lib/Types/index.d.ts +2 -0
- package/lib/Types/index.js +68 -0
- package/lib/Utils/auth-utils.d.ts +63 -0
- package/lib/Utils/auth-utils.js +248 -0
- package/lib/Utils/browser-utils.d.ts +3 -0
- package/lib/Utils/browser-utils.js +61 -0
- package/lib/Utils/business.d.ts +53 -0
- package/lib/Utils/business.js +260 -0
- package/lib/Utils/chat-utils.d.ts +253 -0
- package/lib/Utils/chat-utils.js +756 -0
- package/lib/Utils/crypto.d.ts +43 -0
- package/lib/Utils/crypto.js +219 -0
- package/lib/Utils/decode-wa-message.d.ts +61 -0
- package/lib/Utils/decode-wa-message.js +233 -0
- package/lib/Utils/event-buffer.d.ts +17 -0
- package/lib/Utils/event-buffer.js +544 -0
- package/lib/Utils/generics.d.ts +89 -0
- package/lib/Utils/generics.js +471 -0
- package/lib/Utils/history.d.ts +59 -0
- package/lib/Utils/history.js +120 -0
- package/lib/Utils/index.d.ts +1 -0
- package/lib/Utils/index.js +61 -0
- package/lib/Utils/link-preview.d.ts +19 -0
- package/lib/Utils/link-preview.js +152 -0
- package/lib/Utils/logger.d.ts +3 -0
- package/lib/Utils/logger.js +33 -0
- package/lib/Utils/lt-hash.d.ts +13 -0
- package/lib/Utils/lt-hash.js +77 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/lib/Utils/make-mutex.js +69 -0
- package/lib/Utils/message-retry-manager.d.ts +34 -0
- package/lib/Utils/message-retry-manager.js +154 -0
- package/lib/Utils/messages-media.d.ts +137 -0
- package/lib/Utils/messages-media.js +1024 -0
- package/lib/Utils/messages.d.ts +66 -0
- package/lib/Utils/messages.js +1407 -0
- package/lib/Utils/noise-handler.d.ts +21 -0
- package/lib/Utils/noise-handler.js +176 -0
- package/lib/Utils/pre-key-manager.d.ts +13 -0
- package/lib/Utils/pre-key-manager.js +93 -0
- package/lib/Utils/process-message.d.ts +40 -0
- package/lib/Utils/process-message.js +430 -0
- package/lib/Utils/signal.d.ts +72 -0
- package/lib/Utils/signal.js +179 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +18 -0
- package/lib/Utils/use-multi-file-auth-state.js +151 -0
- package/lib/Utils/validate-connection.d.ts +43 -0
- package/lib/Utils/validate-connection.js +255 -0
- package/lib/Utils/ye-bail-event-stream.d.ts +16 -0
- package/lib/Utils/ye-bail-event-stream.js +89 -0
- package/lib/WABinary/constants.d.ts +23 -0
- package/lib/WABinary/constants.js +1328 -0
- package/lib/WABinary/decode.d.ts +10 -0
- package/lib/WABinary/decode.js +291 -0
- package/lib/WABinary/encode.d.ts +2 -0
- package/lib/WABinary/encode.js +276 -0
- package/lib/WABinary/generic-utils.d.ts +16 -0
- package/lib/WABinary/generic-utils.js +155 -0
- package/lib/WABinary/index.d.ts +1 -0
- package/lib/WABinary/index.js +47 -0
- package/lib/WABinary/jid-utils.d.ts +34 -0
- package/lib/WABinary/jid-utils.js +111 -0
- package/lib/WABinary/types.d.ts +1 -0
- package/lib/WABinary/types.js +28 -0
- package/lib/WAM/BinaryInfo.d.ts +8 -0
- package/lib/WAM/BinaryInfo.js +39 -0
- package/lib/WAM/constants.d.ts +35374 -0
- package/lib/WAM/constants.js +15376 -0
- package/lib/WAM/encode.d.ts +2 -0
- package/lib/WAM/encode.js +181 -0
- package/lib/WAM/index.d.ts +1 -0
- package/lib/WAM/index.js +45 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +14 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +58 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +83 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +56 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +68 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +39 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +79 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +50 -0
- package/lib/WAUSync/Protocols/index.d.ts +1 -0
- package/lib/WAUSync/Protocols/index.js +46 -0
- package/lib/WAUSync/USyncQuery.d.ts +20 -0
- package/lib/WAUSync/USyncQuery.js +115 -0
- package/lib/WAUSync/USyncUser.d.ts +13 -0
- package/lib/WAUSync/USyncUser.js +52 -0
- package/lib/WAUSync/index.d.ts +1 -0
- package/lib/WAUSync/index.js +45 -0
- package/lib/index.js +81 -0
- package/package.json +113 -0
- package/requirements.js +32 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export const __esModule: boolean;
|
|
2
|
+
/** generates all the keys required to encrypt/decrypt & sign a media message */
|
|
3
|
+
export function getMediaKeys(buffer: any, mediaType: any): Promise<{
|
|
4
|
+
iv: Buffer<ArrayBuffer>;
|
|
5
|
+
cipherKey: Buffer<ArrayBuffer>;
|
|
6
|
+
macKey: Buffer<ArrayBuffer>;
|
|
7
|
+
}>;
|
|
8
|
+
export function uploadFile(buffer: any, logger: any): Promise<any>;
|
|
9
|
+
export function vid2jpg(videoUrl: any): Promise<any>;
|
|
10
|
+
export function getAudioDuration(buffer: any): Promise<any>;
|
|
11
|
+
export function getAudioWaveform(buffer: any, logger: any): Promise<Uint8Array<ArrayBuffer>>;
|
|
12
|
+
/** generates a thumbnail for a given media, if required */
|
|
13
|
+
export function generateThumbnail(file: any, mediaType: any, options: any): Promise<{
|
|
14
|
+
thumbnail: any;
|
|
15
|
+
originalImageDimensions: {
|
|
16
|
+
width: any;
|
|
17
|
+
height: any;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
export function extensionForMediaMessage(message: any): any;
|
|
21
|
+
export function hkdfInfoKey(type: any): string;
|
|
22
|
+
/**
|
|
23
|
+
* Extracts video thumbnail using FFmpeg
|
|
24
|
+
*/
|
|
25
|
+
export function extractVideoThumb(videoPath: any, time?: string, size?: {
|
|
26
|
+
width: number;
|
|
27
|
+
}): Promise<any>;
|
|
28
|
+
export function extractImageThumb(bufferOrFilePath: any, width?: number): Promise<{
|
|
29
|
+
buffer: any;
|
|
30
|
+
original: {
|
|
31
|
+
width: any;
|
|
32
|
+
height: any;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export function encodeBase64EncodedStringForUpload(b64: any): string;
|
|
36
|
+
export function generateProfilePicture(mediaUpload: any): Promise<{
|
|
37
|
+
img: any;
|
|
38
|
+
}>;
|
|
39
|
+
/** gets the SHA256 of the given media message */
|
|
40
|
+
export function mediaMessageSHA256B64(message: any): string;
|
|
41
|
+
export function toReadable(buffer: any): stream_1.Readable;
|
|
42
|
+
export function toBuffer(stream: any): Promise<Buffer<ArrayBuffer>>;
|
|
43
|
+
export function getStream(item: any, opts: any): Promise<{
|
|
44
|
+
stream: any;
|
|
45
|
+
type: string;
|
|
46
|
+
}>;
|
|
47
|
+
export function getHttpStream(url: any, options?: {}): Promise<any>;
|
|
48
|
+
export function prepareStream(media: any, mediaType: any, { logger, saveOriginalFileIfRequired, opts }?: {}): Promise<{
|
|
49
|
+
mediaKey: any;
|
|
50
|
+
encWriteStream: Buffer<ArrayBuffer>;
|
|
51
|
+
fileLength: number;
|
|
52
|
+
fileSha256: any;
|
|
53
|
+
fileEncSha256: any;
|
|
54
|
+
bodyPath: any;
|
|
55
|
+
didSaveToTmpPath: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
export function encryptedStream(media: any, mediaType: any, { logger, saveOriginalFileIfRequired, opts }?: {}): Promise<{
|
|
58
|
+
mediaKey: any;
|
|
59
|
+
encWriteStream: stream_1.Readable;
|
|
60
|
+
bodyPath: any;
|
|
61
|
+
mac: any;
|
|
62
|
+
fileEncSha256: any;
|
|
63
|
+
fileSha256: any;
|
|
64
|
+
fileLength: number;
|
|
65
|
+
didSaveToTmpPath: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
export function getUrlFromDirectPath(directPath: any): string;
|
|
68
|
+
export function downloadContentFromMessage(mediaMessage: {
|
|
69
|
+
mediaKey?: any;
|
|
70
|
+
directPath?: any;
|
|
71
|
+
url?: any;
|
|
72
|
+
} | undefined, type: any, opts?: {
|
|
73
|
+
mediaKey?: any;
|
|
74
|
+
options?: any;
|
|
75
|
+
}): Promise<any>;
|
|
76
|
+
export function downloadEncryptedContent(downloadUrl: any, { cipherKey, iv }: {
|
|
77
|
+
cipherKey: any;
|
|
78
|
+
iv: any;
|
|
79
|
+
}, { startByte, endByte, options }?: {}): Promise<any>;
|
|
80
|
+
export function getWAUploadToServer({ customUploadHosts, fetchAgent, logger, options }: {
|
|
81
|
+
customUploadHosts: any;
|
|
82
|
+
fetchAgent: any;
|
|
83
|
+
logger: any;
|
|
84
|
+
options: any;
|
|
85
|
+
}, refreshMediaConn: any): (stream: any, { mediaType, fileEncSha256B64, newsletter, timeoutMs }: {
|
|
86
|
+
mediaType: any;
|
|
87
|
+
fileEncSha256B64: any;
|
|
88
|
+
newsletter: any;
|
|
89
|
+
timeoutMs: any;
|
|
90
|
+
}) => Promise<{
|
|
91
|
+
mediaUrl: any;
|
|
92
|
+
directPath: any;
|
|
93
|
+
handle: any;
|
|
94
|
+
}>;
|
|
95
|
+
export function encryptMediaRetryRequest(key: any, mediaKey: any, meId: any): Promise<{
|
|
96
|
+
tag: string;
|
|
97
|
+
attrs: {
|
|
98
|
+
id: any;
|
|
99
|
+
to: any;
|
|
100
|
+
type: string;
|
|
101
|
+
};
|
|
102
|
+
content: ({
|
|
103
|
+
tag: string;
|
|
104
|
+
attrs: {
|
|
105
|
+
jid?: undefined;
|
|
106
|
+
from_me?: undefined;
|
|
107
|
+
participant?: undefined;
|
|
108
|
+
};
|
|
109
|
+
content: {
|
|
110
|
+
tag: string;
|
|
111
|
+
attrs: {};
|
|
112
|
+
content: any;
|
|
113
|
+
}[];
|
|
114
|
+
} | {
|
|
115
|
+
tag: string;
|
|
116
|
+
attrs: {
|
|
117
|
+
jid: any;
|
|
118
|
+
from_me: string;
|
|
119
|
+
participant: any;
|
|
120
|
+
};
|
|
121
|
+
content?: undefined;
|
|
122
|
+
})[];
|
|
123
|
+
}>;
|
|
124
|
+
export function decodeMediaRetryNode(node: any): {
|
|
125
|
+
key: {
|
|
126
|
+
id: any;
|
|
127
|
+
remoteJid: any;
|
|
128
|
+
fromMe: boolean;
|
|
129
|
+
participant: any;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export function decryptMediaRetryData({ ciphertext, iv }: {
|
|
133
|
+
ciphertext: any;
|
|
134
|
+
iv: any;
|
|
135
|
+
}, mediaKey: any, msgId: any): Promise<any>;
|
|
136
|
+
export function getStatusCodeForMediaRetry(code: any): number;
|
|
137
|
+
import stream_1 = require("stream");
|