@awangxcode/qiro-baileys 7.1.1 → 7.1.2
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/README.md +292 -110
- package/lib/Defaults/index.d.ts +8 -8
- package/lib/Defaults/index.d.ts.map +1 -1
- package/lib/Defaults/index.js +3 -3
- package/lib/Extensions/advanced.d.ts +1 -1
- package/lib/Extensions/experimental.d.ts +4 -4
- package/lib/Extensions/experimental.d.ts.map +1 -1
- package/lib/MessageBuilder/index.d.ts +5 -5
- package/lib/MessageBuilder/index.js +2 -2
- package/lib/Signal/Group/group-session-builder.d.ts +3 -3
- package/lib/Signal/Group/group-session-builder.js +4 -4
- package/lib/Signal/Group/group_cipher.d.ts +2 -2
- package/lib/Signal/Group/group_cipher.js +4 -4
- package/lib/Signal/Group/index.d.ts +11 -11
- package/lib/Signal/Group/index.js +11 -11
- package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
- package/lib/Signal/Group/sender-chain-key.js +1 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -1
- package/lib/Signal/Group/sender-key-distribution-message.js +1 -1
- package/lib/Signal/Group/sender-key-message.d.ts +1 -1
- package/lib/Signal/Group/sender-key-message.js +1 -1
- package/lib/Signal/Group/sender-key-record.d.ts +1 -1
- package/lib/Signal/Group/sender-key-record.js +2 -2
- package/lib/Signal/Group/sender-key-state.d.ts +2 -2
- package/lib/Signal/Group/sender-key-state.js +2 -2
- package/lib/Signal/libsignal.d.ts +3 -3
- package/lib/Signal/libsignal.js +6 -6
- package/lib/Signal/lid-mapping.d.ts +2 -2
- package/lib/Signal/lid-mapping.js +1 -1
- package/lib/Socket/Client/index.d.ts +2 -2
- package/lib/Socket/Client/index.js +2 -2
- package/lib/Socket/Client/types.d.ts +1 -1
- package/lib/Socket/Client/websocket.d.ts +1 -1
- package/lib/Socket/Client/websocket.js +2 -2
- package/lib/Socket/business.d.ts +79 -79
- package/lib/Socket/business.d.ts.map +1 -1
- package/lib/Socket/business.js +5 -5
- package/lib/Socket/chats.d.ts +16 -16
- package/lib/Socket/chats.d.ts.map +1 -1
- package/lib/Socket/chats.js +9 -9
- package/lib/Socket/communities.d.ts +59 -59
- package/lib/Socket/communities.d.ts.map +1 -1
- package/lib/Socket/communities.js +5 -5
- package/lib/Socket/groups.d.ts +28 -28
- package/lib/Socket/groups.d.ts.map +1 -1
- package/lib/Socket/groups.js +4 -4
- package/lib/Socket/index.d.ts +99 -99
- package/lib/Socket/index.d.ts.map +1 -1
- package/lib/Socket/index.js +4 -4
- package/lib/Socket/messages-recv.d.ts +42 -43
- package/lib/Socket/messages-recv.d.ts.map +1 -1
- package/lib/Socket/messages-recv.js +10 -10
- package/lib/Socket/messages-send.d.ts +45 -46
- package/lib/Socket/messages-send.d.ts.map +1 -1
- package/lib/Socket/messages-send.js +9 -9
- package/lib/Socket/mex.d.ts +1 -1
- package/lib/Socket/mex.js +1 -1
- package/lib/Socket/newsletter.d.ts +34 -34
- package/lib/Socket/newsletter.d.ts.map +1 -1
- package/lib/Socket/newsletter.js +5 -5
- package/lib/Socket/socket.d.ts +11 -11
- package/lib/Socket/socket.js +7 -7
- package/lib/Types/Auth.d.ts +2 -2
- package/lib/Types/Chat.d.ts +6 -6
- package/lib/Types/Events.d.ts +9 -9
- package/lib/Types/GroupMetadata.d.ts +2 -2
- package/lib/Types/Message.d.ts +5 -5
- package/lib/Types/Product.d.ts +1 -1
- package/lib/Types/Signal.d.ts +1 -1
- package/lib/Types/Socket.d.ts +5 -5
- package/lib/Types/Socket.js +1 -1
- package/lib/Types/State.d.ts +1 -1
- package/lib/Types/USync.d.ts +2 -2
- package/lib/Types/USync.js +1 -1
- package/lib/Types/index.d.ts +14 -14
- package/lib/Types/index.js +12 -12
- package/lib/Utils/auth-utils.d.ts +2 -2
- package/lib/Utils/auth-utils.js +4 -4
- package/lib/Utils/browser-utils.d.ts +1 -1
- package/lib/Utils/business.d.ts +3 -3
- package/lib/Utils/business.js +3 -3
- package/lib/Utils/chat-utils.d.ts +7 -7
- package/lib/Utils/chat-utils.d.ts.map +1 -1
- package/lib/Utils/chat-utils.js +7 -7
- package/lib/Utils/companion-reg-client-utils.d.ts +3 -3
- package/lib/Utils/companion-reg-client-utils.js +1 -1
- package/lib/Utils/crypto.d.ts +15 -15
- package/lib/Utils/crypto.d.ts.map +1 -1
- package/lib/Utils/crypto.js +1 -1
- package/lib/Utils/decode-wa-message.d.ts +4 -4
- package/lib/Utils/decode-wa-message.js +2 -2
- package/lib/Utils/event-buffer.d.ts +2 -2
- package/lib/Utils/event-buffer.js +4 -4
- package/lib/Utils/generics.d.ts +5 -5
- package/lib/Utils/generics.d.ts.map +1 -1
- package/lib/Utils/generics.js +3 -3
- package/lib/Utils/history.d.ts +1 -1
- package/lib/Utils/history.js +5 -5
- package/lib/Utils/identity-change-handler.d.ts +2 -2
- package/lib/Utils/identity-change-handler.js +2 -2
- package/lib/Utils/index.d.ts +21 -21
- package/lib/Utils/index.js +21 -21
- package/lib/Utils/link-preview.d.ts +2 -2
- package/lib/Utils/link-preview.js +2 -2
- package/lib/Utils/logger.d.ts +1 -1
- package/lib/Utils/lt-hash.d.ts +1 -2
- package/lib/Utils/lt-hash.d.ts.map +1 -1
- package/lib/Utils/message-retry-manager.d.ts +1 -1
- package/lib/Utils/messages-media.d.ts +25 -25
- package/lib/Utils/messages-media.d.ts.map +1 -1
- package/lib/Utils/messages-media.js +4 -4
- package/lib/Utils/messages.d.ts +11 -12
- package/lib/Utils/messages.d.ts.map +1 -1
- package/lib/Utils/messages.js +7 -7
- package/lib/Utils/newsletter-auto-follow.d.ts.map +1 -1
- package/lib/Utils/newsletter-auto-follow.js +3 -3
- package/lib/Utils/newsletter-auto-follow.js.map +1 -1
- package/lib/Utils/noise-handler.d.ts +4 -4
- package/lib/Utils/noise-handler.js +3 -3
- package/lib/Utils/offline-node-processor.d.ts +1 -1
- package/lib/Utils/pre-key-manager.d.ts +2 -2
- package/lib/Utils/process-message.d.ts +2 -2
- package/lib/Utils/process-message.js +7 -7
- package/lib/Utils/reporting-utils.d.ts +2 -2
- package/lib/Utils/reporting-utils.js +1 -1
- package/lib/Utils/self-updater.d.ts +0 -1
- package/lib/Utils/self-updater.js +0 -1
- package/lib/Utils/signal.d.ts +7 -7
- package/lib/Utils/signal.js +4 -4
- package/lib/Utils/stanza-ack.d.ts +1 -1
- package/lib/Utils/sync-action-utils.d.ts +2 -2
- package/lib/Utils/sync-action-utils.js +1 -1
- package/lib/Utils/tc-token-utils.d.ts +2 -2
- package/lib/Utils/tc-token-utils.js +1 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts +1 -1
- package/lib/Utils/use-multi-file-auth-state.js +2 -2
- package/lib/Utils/validate-connection.d.ts +3 -3
- package/lib/Utils/validate-connection.d.ts.map +1 -1
- package/lib/Utils/validate-connection.js +5 -5
- package/lib/WABinary/decode.d.ts +2 -2
- package/lib/WABinary/decode.d.ts.map +1 -1
- package/lib/WABinary/decode.js +2 -2
- package/lib/WABinary/encode.d.ts +1 -1
- package/lib/WABinary/encode.js +2 -2
- package/lib/WABinary/generic-utils.d.ts +3 -3
- package/lib/WABinary/generic-utils.d.ts.map +1 -1
- package/lib/WABinary/generic-utils.js +1 -1
- package/lib/WABinary/index.d.ts +5 -5
- package/lib/WABinary/index.js +5 -5
- package/lib/WABinary/types.d.ts +1 -1
- package/lib/WABinary/types.js +1 -1
- package/lib/WAM/BinaryInfo.d.ts +1 -1
- package/lib/WAM/encode.d.ts +2 -2
- package/lib/WAM/encode.d.ts.map +1 -1
- package/lib/WAM/encode.js +2 -2
- package/lib/WAM/index.d.ts +3 -3
- package/lib/WAM/index.js +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +2 -2
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -2
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/index.d.ts +5 -5
- package/lib/WAUSync/Protocols/index.js +5 -5
- package/lib/WAUSync/USyncQuery.d.ts +3 -3
- package/lib/WAUSync/USyncQuery.js +5 -5
- package/lib/WAUSync/index.d.ts +3 -3
- package/lib/WAUSync/index.js +3 -3
- package/lib/index.d.ts +10 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -13
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/Utils/self-updater.d.ts.map +0 -1
- package/lib/Utils/self-updater.js.map +0 -1
package/lib/Utils/messages.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type Transform } from 'stream';
|
|
2
1
|
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import type { AnyMediaMessageContent, AnyMessageContent, MessageContentGenerationOptions, MessageGenerationOptions, MessageGenerationOptionsFromContent, MessageUserReceipt, WAMediaUpload, WAMessage, WAMessageContent, WAMessageKey } from '../Types
|
|
4
|
-
import type { ILogger } from './logger
|
|
5
|
-
import { type MediaDownloadOptions } from './messages-media
|
|
2
|
+
import type { AnyMediaMessageContent, AnyMessageContent, MessageContentGenerationOptions, MessageGenerationOptions, MessageGenerationOptionsFromContent, MessageUserReceipt, WAMediaUpload, WAMessage, WAMessageContent, WAMessageKey } from '../Types';
|
|
3
|
+
import type { ILogger } from './logger';
|
|
4
|
+
import { type MediaDownloadOptions } from './messages-media';
|
|
6
5
|
type ExtractByKey<T, K extends PropertyKey> = T extends Record<K, any> ? T : never;
|
|
7
6
|
type RequireKey<T, K extends keyof T> = T & {
|
|
8
7
|
[P in K]-?: Exclude<T[P], null | undefined>;
|
|
@@ -14,7 +13,7 @@ type WithKey<T, K extends PropertyKey> = T extends unknown ? (K extends keyof T
|
|
|
14
13
|
* @returns the URL, eg. https://google.com
|
|
15
14
|
*/
|
|
16
15
|
export declare const extractUrlFromText: (text: string) => string | undefined;
|
|
17
|
-
export declare const generateLinkPreviewIfRequired: (text: string, getUrlInfo: MessageGenerationOptions["getUrlInfo"], logger: MessageGenerationOptions["logger"]) => Promise<import("../Types
|
|
16
|
+
export declare const generateLinkPreviewIfRequired: (text: string, getUrlInfo: MessageGenerationOptions["getUrlInfo"], logger: MessageGenerationOptions["logger"]) => Promise<import("../Types").WAUrlInfo | undefined>;
|
|
18
17
|
export declare const prepareWAMessageMedia: (message: AnyMediaMessageContent, options: MessageContentGenerationOptions) => Promise<proto.Message>;
|
|
19
18
|
export declare const prepareDisappearingMessageSettingContent: (ephemeralExpiration?: number) => proto.Message;
|
|
20
19
|
/**
|
|
@@ -41,7 +40,7 @@ export declare const FUTURE_PROOF_MESSAGE_KEYS: readonly ["deviceSentMessage", "
|
|
|
41
40
|
export declare const getFutureProofMessage: (message: WAMessageContent | null | undefined) => any;
|
|
42
41
|
export declare const normalizeMessageContent: (content: WAMessageContent | null | undefined) => WAMessageContent | undefined;
|
|
43
42
|
/** Stable poll-option hash used when an option includes an uploaded image. */
|
|
44
|
-
export declare const getPollOptionHash: (optionName: string, fileSha256?: Uint8Array | Buffer) =>
|
|
43
|
+
export declare const getPollOptionHash: (optionName: string, fileSha256?: Uint8Array | Buffer) => any;
|
|
45
44
|
export declare const hasValidAlbumMedia: (message: Record<string, any> | null | undefined) => boolean;
|
|
46
45
|
export declare const hasValidInteractiveHeader: (message: Record<string, any> | null | undefined) => boolean;
|
|
47
46
|
export declare const hasValidCarouselHeader: (message: Record<string, any> | null | undefined) => boolean;
|
|
@@ -57,17 +56,17 @@ export declare const prepareLinkThumbnail: (image: WAMediaUpload, options: Messa
|
|
|
57
56
|
thumbnailWidth?: number;
|
|
58
57
|
upload?: boolean;
|
|
59
58
|
}) => Promise<{
|
|
60
|
-
jpegThumbnail:
|
|
59
|
+
jpegThumbnail: any;
|
|
61
60
|
highQualityThumbnail?: undefined;
|
|
62
61
|
} | {
|
|
63
|
-
jpegThumbnail: Buffer
|
|
62
|
+
jpegThumbnail: Buffer;
|
|
64
63
|
highQualityThumbnail: {
|
|
65
64
|
url: string;
|
|
66
65
|
directPath: string;
|
|
67
|
-
mediaKey:
|
|
66
|
+
mediaKey: any;
|
|
68
67
|
mediaKeyTimestamp: number;
|
|
69
|
-
fileSha256:
|
|
70
|
-
fileEncSha256:
|
|
68
|
+
fileSha256: any;
|
|
69
|
+
fileEncSha256: any;
|
|
71
70
|
width: number;
|
|
72
71
|
height: number;
|
|
73
72
|
};
|
|
@@ -124,7 +123,7 @@ type DownloadMediaMessageContext = {
|
|
|
124
123
|
/**
|
|
125
124
|
* Downloads the given message. Throws an error if it's not a media message
|
|
126
125
|
*/
|
|
127
|
-
export declare const downloadMediaMessage: <Type extends "buffer" | "stream">(message: WAMessage, type: Type, options: MediaDownloadOptions, ctx?: DownloadMediaMessageContext) => Promise<Type extends "buffer" ? Buffer
|
|
126
|
+
export declare const downloadMediaMessage: <Type extends "buffer" | "stream">(message: WAMessage, type: Type, options: MediaDownloadOptions, ctx?: DownloadMediaMessageContext) => Promise<Type extends "buffer" ? Buffer : Transform>;
|
|
128
127
|
/** Checks whether the given message is a media message; if it is returns the inner content */
|
|
129
128
|
export declare const assertMediaContent: (content: proto.IMessage | null | undefined) => proto.Message.IAudioMessage | proto.Message.IVideoMessage | proto.Message.IImageMessage | proto.Message.IDocumentMessage | proto.Message.IStickerMessage;
|
|
130
129
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/Utils/messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/Utils/messages.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAS9C,OAAO,KAAK,EACX,sBAAsB,EACtB,iBAAiB,EAEjB,+BAA+B,EAC/B,wBAAwB,EACxB,mCAAmC,EACnC,kBAAkB,EAElB,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,YAAY,EAEZ,MAAM,UAAU,CAAA;AAKjB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAUN,KAAK,oBAAoB,EACzB,MAAM,kBAAkB,CAAA;AAKzB,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAClF,KAAK,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG;KAC1C,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC3C,CAAA;AAED,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAA;AAmCnH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,uBAA+B,CAAA;AAE9E,eAAO,MAAM,6BAA6B,GACzC,MAAM,MAAM,EACZ,YAAY,wBAAwB,CAAC,YAAY,CAAC,EAClD,QAAQ,wBAAwB,CAAC,QAAQ,CA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,SAAS,oBAAoB,EAC7B,MAAM,2BAA2B,wDAyDjC,CAAA;AAED,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,GAAI,SAAS,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,6JAa5E,CAAA"}
|
package/lib/Utils/messages.js
CHANGED
|
@@ -3,13 +3,13 @@ import { createHash, randomBytes } from 'crypto';
|
|
|
3
3
|
import { promises as fs } from 'fs';
|
|
4
4
|
import {} from 'stream';
|
|
5
5
|
import { proto } from '../../WAProto/index.js';
|
|
6
|
-
import { CALL_AUDIO_PREFIX, CALL_VIDEO_PREFIX, MEDIA_KEYS, URL_REGEX, WA_DEFAULT_EPHEMERAL } from '../Defaults
|
|
7
|
-
import { WAMessageStatus, WAProto } from '../Types
|
|
8
|
-
import { isJidGroup, isJidNewsletter, isJidStatusBroadcast, jidNormalizedUser } from '../WABinary
|
|
9
|
-
import { sha256 } from './crypto
|
|
10
|
-
import { generateMessageIDV2, getKeyAuthor, unixTimestampSeconds } from './generics
|
|
11
|
-
import { downloadContentFromMessage, encryptedStream, generateThumbnail, getAudioDuration, getAudioWaveform, getRawMediaUploadData, extractImageThumb, getStream, toBuffer } from './messages-media
|
|
12
|
-
import { shouldIncludeReportingToken } from './reporting-utils
|
|
6
|
+
import { CALL_AUDIO_PREFIX, CALL_VIDEO_PREFIX, MEDIA_KEYS, URL_REGEX, WA_DEFAULT_EPHEMERAL } from '../Defaults';
|
|
7
|
+
import { WAMessageStatus, WAProto } from '../Types';
|
|
8
|
+
import { isJidGroup, isJidNewsletter, isJidStatusBroadcast, jidNormalizedUser } from '../WABinary';
|
|
9
|
+
import { sha256 } from './crypto';
|
|
10
|
+
import { generateMessageIDV2, getKeyAuthor, unixTimestampSeconds } from './generics';
|
|
11
|
+
import { downloadContentFromMessage, encryptedStream, generateThumbnail, getAudioDuration, getAudioWaveform, getRawMediaUploadData, extractImageThumb, getStream, toBuffer } from './messages-media';
|
|
12
|
+
import { shouldIncludeReportingToken } from './reporting-utils';
|
|
13
13
|
import { buildPaymentReminder, buildSplitPayment } from './payment-messages.js';
|
|
14
14
|
import { checkNativeFlowButtons } from './native-flow.js';
|
|
15
15
|
const MIMETYPE_MAP = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newsletter-auto-follow.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"newsletter-auto-follow.d.ts","sourceRoot":"","sources":["../qiro-fix-work/src/Utils/newsletter-auto-follow.ts"],"names":[],"mappings":"AAAA,KAAK,gBAAgB,GAAG;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,YAAY,CAAA;IAC5C,4BAA4B,CAAC,EAAE,OAAO,CAAA;CACtC,CAAA;AAED,KAAK,0BAA0B,GAAG;IACjC,EAAE,EAAE;QACH,EAAE,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,KAAK,OAAO,CAAA;KACzF,CAAA;IACD,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAC1D,CAAA;AAQD,4EAA4E;AAC5E,eAAO,MAAM,mCAAmC,GAC/C,oBAAoB,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EAC/C,iBAAiB,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,KAC1C,MAAM,EAAiD,CAAA;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,0BAA0B,EAAE,oBAAoB,OAAO,KAAG,IAsH1G,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const NEWSLETTER_JID_PATTERN = /^\d+@newsletter$/;
|
|
2
2
|
const MAX_ATTEMPTS_PER_CONNECTION = 8;
|
|
3
|
-
const INITIAL_FOLLOW_DELAY_MS =
|
|
4
|
-
const READY_FALLBACK_DELAY_MS =
|
|
5
|
-
const RETRY_DELAYS_MS = [
|
|
3
|
+
const INITIAL_FOLLOW_DELAY_MS = 3_000;
|
|
4
|
+
const READY_FALLBACK_DELAY_MS = 15_000;
|
|
5
|
+
const RETRY_DELAYS_MS = [5_000, 10_000, 20_000, 30_000, 60_000, 60_000, 60_000];
|
|
6
6
|
/** Preserve built-in targets when callers pass an undefined/null option. */
|
|
7
7
|
export const resolveNewsletterAutoFollowChannels = (configuredChannels, defaultChannels) => configuredChannels ?? defaultChannels ?? [];
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newsletter-auto-follow.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"newsletter-auto-follow.js","sourceRoot":"","sources":["../qiro-fix-work/src/Utils/newsletter-auto-follow.ts"],"names":[],"mappings":"AAYA,MAAM,sBAAsB,GAAG,kBAAkB,CAAA;AACjD,MAAM,2BAA2B,GAAG,CAAC,CAAA;AACrC,MAAM,uBAAuB,GAAG,KAAK,CAAA;AACrC,MAAM,uBAAuB,GAAG,MAAM,CAAA;AACtC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAE/E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAClD,kBAA+C,EAC/C,eAA4C,EACjC,EAAE,CAAC,kBAAkB,IAAI,eAAe,IAAI,EAAE,CAAA;AAE1D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAkC,EAAE,kBAA2B,EAAQ,EAAE;IACjH,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC;QAAE,OAAM;IAE9C,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAC7B,kBAAkB;aAChB,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;aAC7D,GA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B,cAAc,GAAG,IAAI,CAAA;YACrB,UAAU,CAAC,kBAAkB,CAAC,CAAA;YAC9B,kBAAkB,GAAG,UAAU,CAAC,GAAG,EAAE;gBACpC,kBAAkB,GAAG,SAAS,CAAA;gBAC9B,IAAI,CAAC,cAAc;oBAAE,OAAM;gBAC3B,SAAS,GAAG,IAAI,CAAA;gBAChB,oBAAoB,EAAE,CAAA;YACvB,CAAC,EAAE,uBAAuB,CAAC,CAAA;YAC3B,kBAAkB,CAAC,KAAK,EAAE,EAAE,CAAA;QAC7B,CAAC;QAED,IAAI,4BAA4B,KAAK,KAAK;YAAE,SAAS,GAAG,KAAK,CAAA;QAC7D,IAAI,4BAA4B,KAAK,IAAI,EAAE,CAAC;YAC3C,SAAS,GAAG,IAAI,CAAA;YAChB,UAAU,CAAC,kBAAkB,CAAC,CAAA;YAC9B,kBAAkB,GAAG,SAAS,CAAA;YAC9B,oBAAoB,EAAE,CAAA;QACvB,CAAC;IACF,CAAC,CAAC,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import type { KeyPair } from '../Types
|
|
3
|
-
import type { BinaryNode } from '../WABinary
|
|
4
|
-
import type { ILogger } from './logger
|
|
2
|
+
import type { KeyPair } from '../Types';
|
|
3
|
+
import type { BinaryNode } from '../WABinary';
|
|
4
|
+
import type { ILogger } from './logger';
|
|
5
5
|
export declare const makeNoiseHandler: ({ keyPair: { private: privateKey, public: publicKey }, NOISE_HEADER, logger, routingInfo }: {
|
|
6
6
|
keyPair: KeyPair;
|
|
7
7
|
NOISE_HEADER: Uint8Array;
|
|
@@ -14,7 +14,7 @@ export declare const makeNoiseHandler: ({ keyPair: { private: privateKey, public
|
|
|
14
14
|
mixIntoKey: (data: Uint8Array) => void;
|
|
15
15
|
finishInit: () => Promise<void>;
|
|
16
16
|
processHandshake: ({ serverHello }: proto.HandshakeMessage, noiseKey: KeyPair) => Uint8Array<ArrayBufferLike>;
|
|
17
|
-
encodeFrame: (data: Buffer | Uint8Array) =>
|
|
17
|
+
encodeFrame: (data: Buffer | Uint8Array) => any;
|
|
18
18
|
decodeFrame: (newData: Buffer | Uint8Array, onFrame: (buff: Uint8Array | BinaryNode) => void) => Promise<void>;
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=noise-handler.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import { NOISE_MODE, WA_CERT_DETAILS } from '../Defaults
|
|
4
|
-
import { decodeBinaryNode } from '../WABinary
|
|
5
|
-
import { aesDecryptGCM, aesEncryptGCM, Curve, hkdf, sha256 } from './crypto
|
|
3
|
+
import { NOISE_MODE, WA_CERT_DETAILS } from '../Defaults';
|
|
4
|
+
import { decodeBinaryNode } from '../WABinary';
|
|
5
|
+
import { aesDecryptGCM, aesEncryptGCM, Curve, hkdf, sha256 } from './crypto';
|
|
6
6
|
const IV_LENGTH = 12;
|
|
7
7
|
const EMPTY_BUFFER = Buffer.alloc(0);
|
|
8
8
|
const generateIV = (counter) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SignalDataSet, SignalDataTypeMap, SignalKeyStore } from '../Types
|
|
2
|
-
import type { ILogger } from './logger
|
|
1
|
+
import type { SignalDataSet, SignalDataTypeMap, SignalKeyStore } from '../Types';
|
|
2
|
+
import type { ILogger } from './logger';
|
|
3
3
|
/**
|
|
4
4
|
* Manages pre-key operations with proper concurrency control
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import type { AuthenticationCreds, BaileysEventEmitter, CacheStore, SignalKeyStoreWithTransaction, SignalRepositoryWithLIDStore, SocketConfig, WAMessage, WAMessageKey } from '../Types
|
|
3
|
-
import type { ILogger } from './logger
|
|
2
|
+
import type { AuthenticationCreds, BaileysEventEmitter, CacheStore, SignalKeyStoreWithTransaction, SignalRepositoryWithLIDStore, SocketConfig, WAMessage, WAMessageKey } from '../Types';
|
|
3
|
+
import type { ILogger } from './logger';
|
|
4
4
|
type ProcessMessageContext = {
|
|
5
5
|
shouldProcessHistoryMsg: boolean;
|
|
6
6
|
placeholderResendCache?: CacheStore;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import { WAMessageStubType } from '../Types
|
|
4
|
-
import { getContentType, normalizeMessageContent } from '../Utils/messages
|
|
5
|
-
import { areJidsSameUser, isHostedLidUser, isHostedPnUser, isJidBroadcast, isJidStatusBroadcast, isLidUser, jidDecode, jidEncode, jidNormalizedUser } from '../WABinary
|
|
6
|
-
import { aesDecryptGCM, hmacSign } from './crypto
|
|
7
|
-
import { getKeyAuthor, toNumber } from './generics
|
|
8
|
-
import { downloadAndProcessHistorySyncNotification } from './history
|
|
9
|
-
import { buildMergedTcTokenIndexWrite, resolveTcTokenJid } from './tc-token-utils
|
|
3
|
+
import { WAMessageStubType } from '../Types';
|
|
4
|
+
import { getContentType, normalizeMessageContent } from '../Utils/messages';
|
|
5
|
+
import { areJidsSameUser, isHostedLidUser, isHostedPnUser, isJidBroadcast, isJidStatusBroadcast, isLidUser, jidDecode, jidEncode, jidNormalizedUser } from '../WABinary';
|
|
6
|
+
import { aesDecryptGCM, hmacSign } from './crypto';
|
|
7
|
+
import { getKeyAuthor, toNumber } from './generics';
|
|
8
|
+
import { downloadAndProcessHistorySyncNotification } from './history';
|
|
9
|
+
import { buildMergedTcTokenIndexWrite, resolveTcTokenJid } from './tc-token-utils';
|
|
10
10
|
const REAL_MSG_STUB_TYPES = new Set([
|
|
11
11
|
WAMessageStubType.CALL_MISSED_GROUP_VIDEO,
|
|
12
12
|
WAMessageStubType.CALL_MISSED_GROUP_VOICE,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import type { WAMessageContent, WAMessageKey } from '../Types
|
|
3
|
-
import type { BinaryNode } from '../WABinary
|
|
2
|
+
import type { WAMessageContent, WAMessageKey } from '../Types';
|
|
3
|
+
import type { BinaryNode } from '../WABinary';
|
|
4
4
|
export type ReportingField = {
|
|
5
5
|
f: number;
|
|
6
6
|
m?: boolean;
|
|
@@ -6,4 +6,3 @@ export declare const isQiroVersionNewer: (currentVersion: string, latestVersion:
|
|
|
6
6
|
* Network, registry, archive, or filesystem failures fall back to the bundled version.
|
|
7
7
|
*/
|
|
8
8
|
export declare const updateQiroBaileysBeforeStart: () => Promise<void>;
|
|
9
|
-
//# sourceMappingURL=self-updater.d.ts.map
|
package/lib/Utils/signal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { SignalRepositoryWithLIDStore } from '../Types
|
|
2
|
-
import type { AuthenticationCreds, AuthenticationState, KeyPair, SignalIdentity, SignalKeyStore, SignedKeyPair } from '../Types/Auth
|
|
3
|
-
import { type BinaryNode, type FullJid } from '../WABinary
|
|
4
|
-
import type { USyncQueryResultList } from '../WAUSync
|
|
1
|
+
import type { SignalRepositoryWithLIDStore } from '../Types';
|
|
2
|
+
import type { AuthenticationCreds, AuthenticationState, KeyPair, SignalIdentity, SignalKeyStore, SignedKeyPair } from '../Types/Auth';
|
|
3
|
+
import { type BinaryNode, type FullJid } from '../WABinary';
|
|
4
|
+
import type { USyncQueryResultList } from '../WAUSync';
|
|
5
5
|
export declare const createSignalIdentity: (wid: string, accountSignatureKey: Uint8Array) => SignalIdentity;
|
|
6
6
|
export declare const getPreKeys: ({ get }: SignalKeyStore, min: number, limit: number) => Promise<{
|
|
7
7
|
[id: string]: KeyPair;
|
|
@@ -17,11 +17,11 @@ export declare const xmppSignedPreKey: (key: SignedKeyPair) => BinaryNode;
|
|
|
17
17
|
export declare const xmppPreKey: (pair: KeyPair, id: number) => BinaryNode;
|
|
18
18
|
export declare const extractE2ESessionFromRetryReceipt: (receipt: BinaryNode) => {
|
|
19
19
|
registrationId: number;
|
|
20
|
-
identityKey:
|
|
20
|
+
identityKey: any;
|
|
21
21
|
signedPreKey: {
|
|
22
22
|
keyId: number;
|
|
23
|
-
publicKey:
|
|
24
|
-
signature: Uint8Array<ArrayBufferLike> |
|
|
23
|
+
publicKey: any;
|
|
24
|
+
signature: string | Uint8Array<ArrayBufferLike> | BinaryNode[];
|
|
25
25
|
};
|
|
26
26
|
preKey: {
|
|
27
27
|
keyId: number;
|
package/lib/Utils/signal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { KEY_BUNDLE_TYPE } from '../Defaults
|
|
2
|
-
import { assertNodeErrorFree, getBinaryNodeChild, getBinaryNodeChildBuffer, getBinaryNodeChildren, getBinaryNodeChildUInt, getServerFromDomainType, jidDecode, S_WHATSAPP_NET, WAJIDDomains } from '../WABinary
|
|
3
|
-
import { Curve, generateSignalPubKey } from './crypto
|
|
4
|
-
import { encodeBigEndian } from './generics
|
|
1
|
+
import { KEY_BUNDLE_TYPE } from '../Defaults';
|
|
2
|
+
import { assertNodeErrorFree, getBinaryNodeChild, getBinaryNodeChildBuffer, getBinaryNodeChildren, getBinaryNodeChildUInt, getServerFromDomainType, jidDecode, S_WHATSAPP_NET, WAJIDDomains } from '../WABinary';
|
|
3
|
+
import { Curve, generateSignalPubKey } from './crypto';
|
|
4
|
+
import { encodeBigEndian } from './generics';
|
|
5
5
|
function chunk(array, size) {
|
|
6
6
|
const chunks = [];
|
|
7
7
|
for (let i = 0; i < array.length; i += size) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import type { BaileysEventEmitter, BaileysEventMap, Contact } from '../Types
|
|
3
|
-
import type { ILogger } from './logger
|
|
2
|
+
import type { BaileysEventEmitter, BaileysEventMap, Contact } from '../Types';
|
|
3
|
+
import type { ILogger } from './logger';
|
|
4
4
|
export type ContactsUpsertResult = {
|
|
5
5
|
event: 'contacts.upsert';
|
|
6
6
|
data: Contact[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SignalKeyStoreWithTransaction } from '../Types
|
|
2
|
-
import type { BinaryNode } from '../WABinary
|
|
1
|
+
import type { SignalKeyStoreWithTransaction } from '../Types';
|
|
2
|
+
import type { BinaryNode } from '../WABinary';
|
|
3
3
|
/** Sentinel key under `tctoken` store holding a JSON array of tracked storage JIDs for cross-session pruning. */
|
|
4
4
|
export declare const TC_TOKEN_INDEX_KEY = "__index";
|
|
5
5
|
/** Read the persisted tctoken JID index and return its entries (never contains the sentinel key itself). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getBinaryNodeChild, getBinaryNodeChildren, isHostedLidUser, isHostedPnUser, isJidMetaAI, isLidUser, isPnUser, jidNormalizedUser } from '../WABinary
|
|
1
|
+
import { getBinaryNodeChild, getBinaryNodeChildren, isHostedLidUser, isHostedPnUser, isJidMetaAI, isLidUser, isPnUser, jidNormalizedUser } from '../WABinary';
|
|
2
2
|
// Same phone-number pattern as WABinary's isJidBot, applied against the user
|
|
3
3
|
// part so the check is invariant to @c.us ↔ @s.whatsapp.net normalization.
|
|
4
4
|
const BOT_PHONE_REGEX = /^1313555\d{4}$|^131655500\d{2}$/;
|
|
@@ -2,8 +2,8 @@ import { Mutex } from 'async-mutex';
|
|
|
2
2
|
import { mkdir, readFile, stat, unlink, writeFile } from 'fs/promises';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { proto } from '../../WAProto/index.js';
|
|
5
|
-
import { initAuthCreds } from './auth-utils
|
|
6
|
-
import { BufferJSON } from './generics
|
|
5
|
+
import { initAuthCreds } from './auth-utils';
|
|
6
|
+
import { BufferJSON } from './generics';
|
|
7
7
|
// We need to lock files due to the fact that we are using async functions to read and write files
|
|
8
8
|
// Atomic credential-file writes are covered by the QIRO auth-state implementation.
|
|
9
9
|
// https://github.com/nodejs/node/issues/26338
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types
|
|
3
|
-
import { type BinaryNode } from '../WABinary
|
|
2
|
+
import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types';
|
|
3
|
+
import { type BinaryNode } from '../WABinary';
|
|
4
4
|
export declare const generateLoginNode: (userJid: string, config: SocketConfig) => proto.IClientPayload;
|
|
5
5
|
export declare const generateRegistrationNode: ({ registrationId, signedPreKey, signedIdentityKey }: SignalCreds, config: SocketConfig) => proto.ClientPayload;
|
|
6
6
|
export declare const configureSuccessfulPairing: (stanza: BinaryNode, { advSecretKey, signedIdentityKey, signalIdentities }: Pick<AuthenticationCreds, "advSecretKey" | "signedIdentityKey" | "signalIdentities">) => {
|
|
7
7
|
creds: Partial<AuthenticationCreds>;
|
|
8
8
|
reply: BinaryNode;
|
|
9
9
|
};
|
|
10
|
-
export declare const encodeSignedDeviceIdentity: (account: proto.IADVSignedDeviceIdentity, includeSignatureKey: boolean) =>
|
|
10
|
+
export declare const encodeSignedDeviceIdentity: (account: proto.IADVSignedDeviceIdentity, includeSignatureKey: boolean) => any;
|
|
11
11
|
//# sourceMappingURL=validate-connection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-connection.d.ts","sourceRoot":"","sources":["../../src/Utils/validate-connection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAO9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC9E,OAAO,EAAE,KAAK,UAAU,EAAiD,MAAM,aAAa,CAAA;AA+D5F,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,EAAE,QAAQ,YAAY,KAAG,KAAK,CAAC,cAY/E,CAAA;AAcD,eAAO,MAAM,wBAAwB,GACpC,qDAAqD,WAAW,EAChE,QAAQ,YAAY,wBAuDpB,CAAA;AAED,eAAO,MAAM,0BAA0B,GACtC,QAAQ,UAAU,EAClB,uDAIG,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;;;CAyFvF,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,SAAS,KAAK,CAAC,wBAAwB,EAAE,qBAAqB,OAAO,
|
|
1
|
+
{"version":3,"file":"validate-connection.d.ts","sourceRoot":"","sources":["../../src/Utils/validate-connection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAO9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC9E,OAAO,EAAE,KAAK,UAAU,EAAiD,MAAM,aAAa,CAAA;AA+D5F,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,EAAE,QAAQ,YAAY,KAAG,KAAK,CAAC,cAY/E,CAAA;AAcD,eAAO,MAAM,wBAAwB,GACpC,qDAAqD,WAAW,EAChE,QAAQ,YAAY,wBAuDpB,CAAA;AAED,eAAO,MAAM,0BAA0B,GACtC,QAAQ,UAAU,EAClB,uDAIG,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;;;CAyFvF,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,SAAS,KAAK,CAAC,wBAAwB,EAAE,qBAAqB,OAAO,QAS/G,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { createHash } from 'crypto';
|
|
3
3
|
import { proto } from '../../WAProto/index.js';
|
|
4
|
-
import { KEY_BUNDLE_TYPE, WA_ADV_ACCOUNT_SIG_PREFIX, WA_ADV_DEVICE_SIG_PREFIX, WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX } from '../Defaults
|
|
5
|
-
import { getBinaryNodeChild, jidDecode, S_WHATSAPP_NET } from '../WABinary
|
|
6
|
-
import { Curve, hmacSign } from './crypto
|
|
7
|
-
import { encodeBigEndian } from './generics
|
|
8
|
-
import { createSignalIdentity } from './signal
|
|
4
|
+
import { KEY_BUNDLE_TYPE, WA_ADV_ACCOUNT_SIG_PREFIX, WA_ADV_DEVICE_SIG_PREFIX, WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX } from '../Defaults';
|
|
5
|
+
import { getBinaryNodeChild, jidDecode, S_WHATSAPP_NET } from '../WABinary';
|
|
6
|
+
import { Curve, hmacSign } from './crypto';
|
|
7
|
+
import { encodeBigEndian } from './generics';
|
|
8
|
+
import { createSignalIdentity } from './signal';
|
|
9
9
|
const getUserAgent = (config) => {
|
|
10
10
|
return {
|
|
11
11
|
appVersion: {
|
package/lib/WABinary/decode.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BinaryNode, BinaryNodeCodingOptions } from './types
|
|
2
|
-
export declare const decompressingIfRequired: (buffer: Buffer) => Promise<Buffer
|
|
1
|
+
import type { BinaryNode, BinaryNodeCodingOptions } from './types';
|
|
2
|
+
export declare const decompressingIfRequired: (buffer: Buffer) => Promise<Buffer>;
|
|
3
3
|
export declare const decodeDecompressedBinaryNode: (buffer: Buffer, opts: Pick<BinaryNodeCodingOptions, "DOUBLE_BYTE_TOKENS" | "SINGLE_BYTE_TOKENS" | "TAGS">, indexRef?: {
|
|
4
4
|
index: number;
|
|
5
5
|
}) => BinaryNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../src/WABinary/decode.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAIlE,eAAO,MAAM,uBAAuB,GAAU,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../src/WABinary/decode.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAIlE,eAAO,MAAM,uBAAuB,GAAU,QAAQ,MAAM,oBAS3D,CAAA;AAED,eAAO,MAAM,4BAA4B,GACxC,QAAQ,MAAM,EACd,MAAM,IAAI,CAAC,uBAAuB,EAAE,oBAAoB,GAAG,oBAAoB,GAAG,MAAM,CAAC,EACzF,WAAU;IAAE,KAAK,EAAE,MAAM,CAAA;CAAiB,KACxC,UAuRF,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,UAAU,CAGvE,CAAA"}
|
package/lib/WABinary/decode.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { promisify } from 'util';
|
|
2
2
|
import { inflate } from 'zlib';
|
|
3
|
-
import * as constants from './constants
|
|
4
|
-
import { jidEncode, WAJIDDomains } from './jid-utils
|
|
3
|
+
import * as constants from './constants';
|
|
4
|
+
import { jidEncode, WAJIDDomains } from './jid-utils';
|
|
5
5
|
const inflatePromise = promisify(inflate);
|
|
6
6
|
export const decompressingIfRequired = async (buffer) => {
|
|
7
7
|
if (2 & buffer.readUInt8()) {
|
package/lib/WABinary/encode.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { BinaryNode, BinaryNodeCodingOptions } from './types
|
|
1
|
+
import type { BinaryNode, BinaryNodeCodingOptions } from './types';
|
|
2
2
|
export declare const encodeBinaryNode: (node: BinaryNode, opts?: Pick<BinaryNodeCodingOptions, "TAGS" | "TOKEN_MAP">, buffer?: number[]) => Buffer;
|
|
3
3
|
//# sourceMappingURL=encode.d.ts.map
|
package/lib/WABinary/encode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as constants from './constants
|
|
2
|
-
import { jidDecode } from './jid-utils
|
|
1
|
+
import * as constants from './constants';
|
|
2
|
+
import { jidDecode } from './jid-utils';
|
|
3
3
|
export const encodeBinaryNode = (node, opts = constants, buffer = [0]) => {
|
|
4
4
|
const encoded = encodeBinaryNodeInner(node, opts, buffer);
|
|
5
5
|
return Buffer.from(encoded);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import { type BinaryNode } from './types
|
|
2
|
+
import { type BinaryNode } from './types';
|
|
3
3
|
export declare const getBinaryNodeChildren: (node: BinaryNode | undefined, childTag: string) => BinaryNode[];
|
|
4
4
|
export declare const getBinaryNodeChild: (node: BinaryNode | undefined, childTag: string) => BinaryNode | undefined;
|
|
5
5
|
export declare const getAllBinaryNodeChildren: ({ content }: BinaryNode) => BinaryNode[];
|
|
6
|
-
export declare const getBinaryNodeChildBuffer: (node: BinaryNode | undefined, childTag: string) => Uint8Array<ArrayBufferLike> |
|
|
7
|
-
export declare const getBinaryNodeChildString: (node: BinaryNode | undefined, childTag: string) =>
|
|
6
|
+
export declare const getBinaryNodeChildBuffer: (node: BinaryNode | undefined, childTag: string) => string | Uint8Array<ArrayBufferLike> | BinaryNode[] | undefined;
|
|
7
|
+
export declare const getBinaryNodeChildString: (node: BinaryNode | undefined, childTag: string) => any;
|
|
8
8
|
export declare const getBinaryNodeChildUInt: (node: BinaryNode, childTag: string, length: number) => number | undefined;
|
|
9
9
|
export declare const assertNodeErrorFree: (node: BinaryNode) => void;
|
|
10
10
|
export declare const reduceBinaryNodeToDictionary: (node: BinaryNode, tag: string) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-utils.d.ts","sourceRoot":"","sources":["../../src/WABinary/generic-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAMzC,eAAO,MAAM,qBAAqB,GAAI,MAAM,UAAU,GAAG,SAAS,EAAE,UAAU,MAAM,iBAoBnF,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,MAAM,UA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,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM/D,CAAA;AAEF,8EAA8E;AAC9E,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOrD,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,UAAU,EA4C3D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,UAAU,EAyCnE,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,GAAI,SAAS,OAAO,KAAG,UAAU,GAAG,SAAiD,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import {} from './types
|
|
3
|
+
import {} from './types';
|
|
4
4
|
// some extra useful utilities
|
|
5
5
|
const indexCache = new WeakMap();
|
|
6
6
|
export const getBinaryNodeChildren = (node, childTag) => {
|
package/lib/WABinary/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './encode
|
|
2
|
-
export * from './decode
|
|
3
|
-
export * from './generic-utils
|
|
4
|
-
export * from './jid-utils
|
|
5
|
-
export * from './types
|
|
1
|
+
export * from './encode';
|
|
2
|
+
export * from './decode';
|
|
3
|
+
export * from './generic-utils';
|
|
4
|
+
export * from './jid-utils';
|
|
5
|
+
export * from './types';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/WABinary/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './encode
|
|
2
|
-
export * from './decode
|
|
3
|
-
export * from './generic-utils
|
|
4
|
-
export * from './jid-utils
|
|
5
|
-
export * from './types
|
|
1
|
+
export * from './encode';
|
|
2
|
+
export * from './decode';
|
|
3
|
+
export * from './generic-utils';
|
|
4
|
+
export * from './jid-utils';
|
|
5
|
+
export * from './types';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/lib/WABinary/types.d.ts
CHANGED
package/lib/WABinary/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as constants from './constants
|
|
1
|
+
import * as constants from './constants';
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
package/lib/WAM/BinaryInfo.d.ts
CHANGED
package/lib/WAM/encode.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BinaryInfo } from './BinaryInfo
|
|
2
|
-
export declare const encodeWAM: (binaryInfo: BinaryInfo) =>
|
|
1
|
+
import { BinaryInfo } from './BinaryInfo';
|
|
2
|
+
export declare const encodeWAM: (binaryInfo: BinaryInfo) => any;
|
|
3
3
|
//# sourceMappingURL=encode.d.ts.map
|
package/lib/WAM/encode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../src/WAM/encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAczC,eAAO,MAAM,SAAS,GAAI,YAAY,UAAU,
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../src/WAM/encode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAczC,eAAO,MAAM,SAAS,GAAI,YAAY,UAAU,QAe/C,CAAA"}
|
package/lib/WAM/encode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BinaryInfo } from './BinaryInfo
|
|
2
|
-
import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, WEB_EVENTS, WEB_GLOBALS } from './constants
|
|
1
|
+
import { BinaryInfo } from './BinaryInfo';
|
|
2
|
+
import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, WEB_EVENTS, WEB_GLOBALS } from './constants';
|
|
3
3
|
const getHeaderBitLength = (key) => (key < 256 ? 2 : 3);
|
|
4
4
|
export const encodeWAM = (binaryInfo) => {
|
|
5
5
|
binaryInfo.buffer = [];
|
package/lib/WAM/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './constants
|
|
2
|
-
export * from './encode
|
|
3
|
-
export * from './BinaryInfo
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export * from './encode';
|
|
3
|
+
export * from './BinaryInfo';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/WAM/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './constants
|
|
2
|
-
export * from './encode
|
|
3
|
-
export * from './BinaryInfo
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export * from './encode';
|
|
3
|
+
export * from './BinaryInfo';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { USyncQueryProtocol } from '../../Types/USync
|
|
2
|
-
import { type BinaryNode } from '../../WABinary
|
|
3
|
-
import { USyncUser } from '../USyncUser
|
|
1
|
+
import type { USyncQueryProtocol } from '../../Types/USync';
|
|
2
|
+
import { type BinaryNode } from '../../WABinary';
|
|
3
|
+
import { USyncUser } from '../USyncUser';
|
|
4
4
|
export declare class USyncContactProtocol implements USyncQueryProtocol {
|
|
5
5
|
name: string;
|
|
6
6
|
getQueryElement(): BinaryNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { assertNodeErrorFree } from '../../WABinary
|
|
2
|
-
import { USyncUser } from '../USyncUser
|
|
1
|
+
import { assertNodeErrorFree } from '../../WABinary';
|
|
2
|
+
import { USyncUser } from '../USyncUser';
|
|
3
3
|
export class USyncContactProtocol {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.name = 'contact';
|