@queenanya/baileys 9.2.1 → 9.4.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/README.md +349 -1171
- package/WAProto/fix-imports.js +74 -18
- package/WAProto/index.js +201 -160
- package/engine-requirements.js +7 -7
- package/lib/Defaults/index.d.ts +19 -0
- package/lib/Defaults/index.d.ts.map +1 -1
- package/lib/Defaults/index.js +32 -6
- package/lib/Defaults/index.js.map +1 -1
- package/lib/Signal/libsignal.d.ts.map +1 -1
- package/lib/Signal/libsignal.js +61 -2
- package/lib/Signal/libsignal.js.map +1 -1
- package/lib/Signal/lid-mapping.d.ts +5 -9
- package/lib/Signal/lid-mapping.d.ts.map +1 -1
- package/lib/Signal/lid-mapping.js +170 -70
- package/lib/Signal/lid-mapping.js.map +1 -1
- package/lib/Socket/Client/websocket.d.ts +1 -1
- package/lib/Socket/Client/websocket.d.ts.map +1 -1
- package/lib/Socket/Client/websocket.js +5 -1
- package/lib/Socket/Client/websocket.js.map +1 -1
- package/lib/Socket/business.d.ts +125 -5
- package/lib/Socket/business.d.ts.map +1 -1
- package/lib/Socket/business.js +11 -8
- package/lib/Socket/business.js.map +1 -1
- package/lib/Socket/chats.d.ts +22 -3
- package/lib/Socket/chats.d.ts.map +1 -1
- package/lib/Socket/chats.js +277 -58
- package/lib/Socket/chats.js.map +1 -1
- package/lib/Socket/communities.d.ts +125 -5
- package/lib/Socket/communities.d.ts.map +1 -1
- package/lib/Socket/groups.d.ts +19 -3
- package/lib/Socket/groups.d.ts.map +1 -1
- package/lib/Socket/groups.js +7 -1
- package/lib/Socket/groups.js.map +1 -1
- package/lib/Socket/index.d.ts +125 -5
- package/lib/Socket/index.d.ts.map +1 -1
- package/lib/Socket/index.js +0 -6
- package/lib/Socket/index.js.map +1 -1
- package/lib/Socket/messages-recv.d.ts +126 -6
- package/lib/Socket/messages-recv.d.ts.map +1 -1
- package/lib/Socket/messages-recv.js +771 -177
- package/lib/Socket/messages-recv.js.map +1 -1
- package/lib/Socket/messages-send.d.ts +129 -7
- package/lib/Socket/messages-send.d.ts.map +1 -1
- package/lib/Socket/messages-send.js +430 -119
- package/lib/Socket/messages-send.js.map +1 -1
- package/lib/Socket/newsletter.d.ts +20 -5
- package/lib/Socket/newsletter.d.ts.map +1 -1
- package/lib/Socket/newsletter.js +2 -47
- package/lib/Socket/newsletter.js.map +1 -1
- package/lib/Socket/socket.d.ts +3 -1
- package/lib/Socket/socket.d.ts.map +1 -1
- package/lib/Socket/socket.js +151 -29
- package/lib/Socket/socket.js.map +1 -1
- package/lib/Types/Auth.d.ts +2 -0
- package/lib/Types/Auth.d.ts.map +1 -1
- package/lib/Types/Call.d.ts +10 -1
- package/lib/Types/Call.d.ts.map +1 -1
- package/lib/Types/Contact.d.ts +2 -0
- package/lib/Types/Contact.d.ts.map +1 -1
- package/lib/Types/Events.d.ts +60 -6
- package/lib/Types/Events.d.ts.map +1 -1
- package/lib/Types/GroupMetadata.d.ts +4 -0
- package/lib/Types/GroupMetadata.d.ts.map +1 -1
- package/lib/Types/Message.d.ts +530 -16
- package/lib/Types/Message.d.ts.map +1 -1
- package/lib/Types/Message.js.map +1 -1
- package/lib/Types/Newsletter.d.ts +32 -45
- package/lib/Types/Newsletter.d.ts.map +1 -1
- package/lib/Types/Newsletter.js +25 -23
- package/lib/Types/Newsletter.js.map +1 -1
- package/lib/Types/State.d.ts +54 -0
- package/lib/Types/State.d.ts.map +1 -1
- package/lib/Types/State.js +42 -0
- package/lib/Types/State.js.map +1 -1
- package/lib/Types/index.d.ts +9 -0
- package/lib/Types/index.d.ts.map +1 -1
- package/lib/Types/index.js.map +1 -1
- package/lib/Utils/auth-utils.d.ts.map +1 -1
- package/lib/Utils/auth-utils.js +53 -20
- package/lib/Utils/auth-utils.js.map +1 -1
- package/lib/Utils/browser-utils.d.ts +13 -0
- package/lib/Utils/browser-utils.d.ts.map +1 -1
- package/lib/Utils/browser-utils.js +90 -10
- package/lib/Utils/browser-utils.js.map +1 -1
- package/lib/Utils/chat-utils.d.ts +30 -0
- package/lib/Utils/chat-utils.d.ts.map +1 -1
- package/lib/Utils/chat-utils.js +134 -59
- package/lib/Utils/chat-utils.js.map +1 -1
- package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
- package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
- package/lib/Utils/companion-reg-client-utils.js +34 -0
- package/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/lib/Utils/crypto.d.ts +4 -8
- package/lib/Utils/crypto.d.ts.map +1 -1
- package/lib/Utils/crypto.js +2 -26
- package/lib/Utils/crypto.js.map +1 -1
- package/lib/Utils/decode-wa-message.d.ts +12 -0
- package/lib/Utils/decode-wa-message.d.ts.map +1 -1
- package/lib/Utils/decode-wa-message.js +16 -0
- package/lib/Utils/decode-wa-message.js.map +1 -1
- package/lib/Utils/event-buffer.d.ts.map +1 -1
- package/lib/Utils/event-buffer.js +43 -8
- package/lib/Utils/event-buffer.js.map +1 -1
- package/lib/Utils/generics.d.ts +3 -1
- package/lib/Utils/generics.d.ts.map +1 -1
- package/lib/Utils/generics.js +17 -4
- package/lib/Utils/generics.js.map +1 -1
- package/lib/Utils/history.d.ts +8 -3
- package/lib/Utils/history.d.ts.map +1 -1
- package/lib/Utils/history.js +60 -16
- package/lib/Utils/history.js.map +1 -1
- package/lib/Utils/identity-change-handler.d.ts +44 -0
- package/lib/Utils/identity-change-handler.d.ts.map +1 -0
- package/lib/Utils/identity-change-handler.js +50 -0
- package/lib/Utils/identity-change-handler.js.map +1 -0
- package/lib/Utils/index.d.ts +6 -0
- package/lib/Utils/index.d.ts.map +1 -1
- package/lib/Utils/index.js +6 -0
- package/lib/Utils/index.js.map +1 -1
- package/lib/Utils/interactive-message.d.ts +201 -0
- package/lib/Utils/interactive-message.d.ts.map +1 -0
- package/lib/Utils/interactive-message.js +256 -0
- package/lib/Utils/interactive-message.js.map +1 -0
- package/lib/Utils/lt-hash.d.ts +7 -12
- package/lib/Utils/lt-hash.d.ts.map +1 -1
- package/lib/Utils/lt-hash.js +2 -42
- package/lib/Utils/lt-hash.js.map +1 -1
- package/lib/Utils/make-mutex.d.ts +1 -0
- package/lib/Utils/make-mutex.d.ts.map +1 -1
- package/lib/Utils/make-mutex.js +20 -27
- package/lib/Utils/make-mutex.js.map +1 -1
- package/lib/Utils/message-composer.d.ts +5 -0
- package/lib/Utils/message-composer.d.ts.map +1 -0
- package/lib/Utils/message-composer.js +5 -0
- package/lib/Utils/message-composer.js.map +1 -0
- package/lib/Utils/message-retry-manager.d.ts +30 -2
- package/lib/Utils/message-retry-manager.d.ts.map +1 -1
- package/lib/Utils/message-retry-manager.js +58 -5
- package/lib/Utils/message-retry-manager.js.map +1 -1
- package/lib/Utils/messages-media.d.ts +35 -5
- package/lib/Utils/messages-media.d.ts.map +1 -1
- package/lib/Utils/messages-media.js +171 -51
- package/lib/Utils/messages-media.js.map +1 -1
- package/lib/Utils/messages.d.ts +2 -0
- package/lib/Utils/messages.d.ts.map +1 -1
- package/lib/Utils/messages.js +475 -35
- package/lib/Utils/messages.js.map +1 -1
- package/lib/Utils/noise-handler.d.ts +4 -4
- package/lib/Utils/noise-handler.d.ts.map +1 -1
- package/lib/Utils/noise-handler.js +139 -85
- package/lib/Utils/noise-handler.js.map +1 -1
- package/lib/Utils/offline-node-processor.d.ts +17 -0
- package/lib/Utils/offline-node-processor.d.ts.map +1 -0
- package/lib/Utils/offline-node-processor.js +40 -0
- package/lib/Utils/offline-node-processor.js.map +1 -0
- package/lib/Utils/process-message.d.ts.map +1 -1
- package/lib/Utils/process-message.js +115 -16
- package/lib/Utils/process-message.js.map +1 -1
- package/lib/Utils/reporting-utils.d.ts +11 -0
- package/lib/Utils/reporting-utils.d.ts.map +1 -0
- package/lib/Utils/reporting-utils.js +258 -0
- package/lib/Utils/reporting-utils.js.map +1 -0
- package/lib/Utils/stanza-ack.d.ts +11 -0
- package/lib/Utils/stanza-ack.d.ts.map +1 -0
- package/lib/Utils/stanza-ack.js +38 -0
- package/lib/Utils/stanza-ack.js.map +1 -0
- package/lib/Utils/sync-action-utils.d.ts +19 -0
- package/lib/Utils/sync-action-utils.d.ts.map +1 -0
- package/lib/Utils/sync-action-utils.js +49 -0
- package/lib/Utils/sync-action-utils.js.map +1 -0
- package/lib/Utils/tc-token-utils.d.ts +37 -0
- package/lib/Utils/tc-token-utils.d.ts.map +1 -0
- package/lib/Utils/tc-token-utils.js +163 -0
- package/lib/Utils/tc-token-utils.js.map +1 -0
- package/lib/Utils/use-mongo-file-auth-state.d.ts +16 -0
- package/lib/Utils/use-mongo-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-mongo-file-auth-state.js +60 -0
- package/lib/Utils/use-mongo-file-auth-state.js.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.js +1 -1
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -1
- package/lib/Utils/use-single-file-auth-state.d.ts.map +1 -1
- package/lib/Utils/use-single-file-auth-state.js.map +1 -1
- package/lib/Utils/validate-connection.d.ts.map +1 -1
- package/lib/Utils/validate-connection.js +11 -1
- package/lib/Utils/validate-connection.js.map +1 -1
- package/lib/WABinary/decode.d.ts.map +1 -1
- package/lib/WABinary/decode.js +24 -0
- package/lib/WABinary/decode.js.map +1 -1
- package/lib/WABinary/encode.js +5 -1
- package/lib/WABinary/encode.js.map +1 -1
- package/lib/WABinary/generic-utils.d.ts +10 -1
- package/lib/WABinary/generic-utils.d.ts.map +1 -1
- package/lib/WABinary/generic-utils.js +42 -8
- package/lib/WABinary/generic-utils.js.map +1 -1
- package/lib/WABinary/jid-utils.js.map +1 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +26 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
- package/lib/WAUSync/Protocols/index.d.ts +1 -0
- package/lib/WAUSync/Protocols/index.d.ts.map +1 -1
- package/lib/WAUSync/Protocols/index.js +1 -0
- package/lib/WAUSync/Protocols/index.js.map +1 -1
- package/lib/WAUSync/USyncQuery.d.ts +1 -0
- package/lib/WAUSync/USyncQuery.d.ts.map +1 -1
- package/lib/WAUSync/USyncQuery.js +6 -2
- package/lib/WAUSync/USyncQuery.js.map +1 -1
- package/lib/WAUSync/USyncUser.d.ts +4 -0
- package/lib/WAUSync/USyncUser.d.ts.map +1 -1
- package/lib/WAUSync/USyncUser.js +8 -0
- package/lib/WAUSync/USyncUser.js.map +1 -1
- package/lib/addons/anti-delete.d.ts +72 -0
- package/lib/addons/anti-delete.d.ts.map +1 -0
- package/lib/addons/anti-delete.js +165 -0
- package/lib/addons/anti-delete.js.map +1 -0
- package/lib/addons/auto-reply.d.ts +67 -0
- package/lib/addons/auto-reply.d.ts.map +1 -0
- package/lib/addons/auto-reply.js +145 -0
- package/lib/addons/auto-reply.js.map +1 -0
- package/lib/addons/browser-presets.d.ts +16 -0
- package/lib/addons/browser-presets.d.ts.map +1 -0
- package/lib/addons/browser-presets.js +24 -0
- package/lib/addons/browser-presets.js.map +1 -0
- package/lib/addons/button-sender.d.ts +260 -0
- package/lib/addons/button-sender.d.ts.map +1 -0
- package/lib/addons/button-sender.js +771 -0
- package/lib/addons/button-sender.js.map +1 -0
- package/lib/addons/call-handler.d.ts +79 -0
- package/lib/addons/call-handler.d.ts.map +1 -0
- package/lib/addons/call-handler.js +342 -0
- package/lib/addons/call-handler.js.map +1 -0
- package/lib/addons/from-chats.d.ts +30 -0
- package/lib/addons/from-chats.d.ts.map +1 -0
- package/lib/addons/from-chats.js +38 -0
- package/lib/addons/from-chats.js.map +1 -0
- package/lib/addons/from-messages-recv.d.ts +59 -0
- package/lib/addons/from-messages-recv.d.ts.map +1 -0
- package/lib/addons/from-messages-recv.js +326 -0
- package/lib/addons/from-messages-recv.js.map +1 -0
- package/lib/addons/from-messages-send.d.ts +50 -0
- package/lib/addons/from-messages-send.d.ts.map +1 -0
- package/lib/addons/from-messages-send.js +148 -0
- package/lib/addons/from-messages-send.js.map +1 -0
- package/lib/addons/from-messages.d.ts +52 -0
- package/lib/addons/from-messages.d.ts.map +1 -0
- package/lib/addons/from-messages.js +304 -0
- package/lib/addons/from-messages.js.map +1 -0
- package/lib/addons/index.d.ts +67 -0
- package/lib/addons/index.d.ts.map +1 -0
- package/lib/addons/index.js +86 -0
- package/lib/addons/index.js.map +1 -0
- package/lib/addons/interactive-message.d.ts +201 -0
- package/lib/addons/interactive-message.d.ts.map +1 -0
- package/lib/addons/interactive-message.js +256 -0
- package/lib/addons/interactive-message.js.map +1 -0
- package/lib/addons/jid-plot.d.ts +49 -0
- package/lib/addons/jid-plot.d.ts.map +1 -0
- package/lib/addons/jid-plot.js +84 -0
- package/lib/addons/jid-plot.js.map +1 -0
- package/lib/addons/jid-plotting.d.ts +54 -0
- package/lib/addons/jid-plotting.d.ts.map +1 -0
- package/lib/addons/jid-plotting.js +150 -0
- package/lib/addons/jid-plotting.js.map +1 -0
- package/lib/addons/lid-support.d.ts +41 -0
- package/lib/addons/lid-support.d.ts.map +1 -0
- package/lib/addons/lid-support.js +42 -0
- package/lib/addons/lid-support.js.map +1 -0
- package/lib/addons/message-composer.d.ts +142 -0
- package/lib/addons/message-composer.d.ts.map +1 -0
- package/lib/addons/message-composer.js +377 -0
- package/lib/addons/message-composer.js.map +1 -0
- package/lib/addons/message-scheduler.d.ts +77 -0
- package/lib/addons/message-scheduler.d.ts.map +1 -0
- package/lib/addons/message-scheduler.js +108 -0
- package/lib/addons/message-scheduler.js.map +1 -0
- package/lib/addons/message-search.d.ts +51 -0
- package/lib/addons/message-search.d.ts.map +1 -0
- package/lib/addons/message-search.js +171 -0
- package/lib/addons/message-search.js.map +1 -0
- package/lib/addons/message-utils.d.ts +88 -0
- package/lib/addons/message-utils.d.ts.map +1 -0
- package/lib/addons/message-utils.js +292 -0
- package/lib/addons/message-utils.js.map +1 -0
- package/lib/addons/outgoing-calls.d.ts +64 -0
- package/lib/addons/outgoing-calls.d.ts.map +1 -0
- package/lib/addons/outgoing-calls.js +139 -0
- package/lib/addons/outgoing-calls.js.map +1 -0
- package/lib/addons/pairing-fix.d.ts +31 -0
- package/lib/addons/pairing-fix.d.ts.map +1 -0
- package/lib/addons/pairing-fix.js +74 -0
- package/lib/addons/pairing-fix.js.map +1 -0
- package/lib/addons/past-participants.d.ts +42 -0
- package/lib/addons/past-participants.d.ts.map +1 -0
- package/lib/addons/past-participants.js +41 -0
- package/lib/addons/past-participants.js.map +1 -0
- package/lib/addons/rich-response.d.ts +111 -0
- package/lib/addons/rich-response.d.ts.map +1 -0
- package/lib/addons/rich-response.js +152 -0
- package/lib/addons/rich-response.js.map +1 -0
- package/lib/addons/scheduling.d.ts +41 -0
- package/lib/addons/scheduling.d.ts.map +1 -0
- package/lib/addons/scheduling.js +110 -0
- package/lib/addons/scheduling.js.map +1 -0
- package/lib/addons/status-posting.d.ts +177 -0
- package/lib/addons/status-posting.d.ts.map +1 -0
- package/lib/addons/status-posting.js +240 -0
- package/lib/addons/status-posting.js.map +1 -0
- package/lib/addons/stickerpack.d.ts +37 -0
- package/lib/addons/stickerpack.d.ts.map +1 -0
- package/lib/addons/stickerpack.js +39 -0
- package/lib/addons/stickerpack.js.map +1 -0
- package/lib/addons/templates.d.ts +72 -0
- package/lib/addons/templates.d.ts.map +1 -0
- package/lib/addons/templates.js +145 -0
- package/lib/addons/templates.js.map +1 -0
- package/lib/addons/vcard.d.ts +59 -0
- package/lib/addons/vcard.d.ts.map +1 -0
- package/lib/addons/vcard.js +88 -0
- package/lib/addons/vcard.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +6 -3
package/lib/Socket/index.d.ts
CHANGED
|
@@ -63,13 +63,43 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
63
63
|
removeCoverPhoto: (id: string) => Promise<any>;
|
|
64
64
|
sendMessageAck: ({ tag, attrs, content }: import("../index.js").BinaryNode, errorCode?: number) => Promise<void>;
|
|
65
65
|
sendRetryRequest: (node: import("../index.js").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
66
|
+
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
67
|
+
id: string;
|
|
68
|
+
to: string;
|
|
69
|
+
}>;
|
|
70
|
+
initiateCall: (jid: string, options?: import("../index.js").WAInitiateCallOptions) => Promise<import("../index.js").WAInitiateCallResult>;
|
|
71
|
+
cancelCall: (callId: string, callTo: string) => Promise<void>;
|
|
66
72
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
73
|
+
acceptCall: (callId: string, callFrom: string, isVideo?: boolean) => Promise<void>;
|
|
74
|
+
preacceptCall: (callId: string, callCreator: string, isVideo?: boolean) => Promise<void>;
|
|
75
|
+
terminateCall: (callId: string, callTo: string, callCreator?: string, reason?: string, duration?: number) => Promise<void>;
|
|
76
|
+
sendRelayLatency: (callId: string, callCreator: string, relays: Array<{
|
|
77
|
+
relayName?: string;
|
|
78
|
+
latency: number;
|
|
79
|
+
relayId?: string;
|
|
80
|
+
dlBw?: number;
|
|
81
|
+
ulBw?: number;
|
|
82
|
+
}>, transactionId?: string) => Promise<void>;
|
|
83
|
+
sendTransport: (callId: string, callCreator: string, to: string, candidates: Array<{
|
|
84
|
+
priority: string;
|
|
85
|
+
data: Uint8Array;
|
|
86
|
+
}>, round?: number) => Promise<void>;
|
|
87
|
+
sendCallDuration: (callId: string, callCreator: string, peer: string, audioDuration: number, callType?: string) => Promise<void>;
|
|
88
|
+
muteCall: (callId: string, callCreator: string, to: string, muted: boolean) => Promise<void>;
|
|
89
|
+
sendHeartbeat: (callId: string, callCreator: string) => Promise<void>;
|
|
90
|
+
sendEncRekey: (callId: string, callCreator: string, to: string, transactionId: string) => Promise<void>;
|
|
91
|
+
sendVideoState: (callId: string, callCreator: string, to: string, enabled: boolean, orientation?: string) => Promise<void>;
|
|
92
|
+
queryCallLink: (token: string, media?: string) => Promise<any>;
|
|
93
|
+
joinCallLink: (token: string, media?: string) => Promise<any>;
|
|
67
94
|
fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
68
|
-
requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey) => Promise<string | undefined>;
|
|
95
|
+
requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey, msgData?: Partial<import("../index.js").WAMessage>) => Promise<string | undefined>;
|
|
69
96
|
messageRetryManager: import("../index.js").MessageRetryManager | null;
|
|
70
97
|
getPrivacyTokens: (jids: string[]) => Promise<any>;
|
|
98
|
+
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
71
99
|
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
72
|
-
relayMessage: (jid: string, message: import("../index.js").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../index.js").MessageRelayOptions
|
|
100
|
+
relayMessage: (jid: string, message: import("../index.js").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList, AI }: import("../index.js").MessageRelayOptions & {
|
|
101
|
+
AI?: boolean;
|
|
102
|
+
}) => Promise<string>;
|
|
73
103
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
74
104
|
sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
75
105
|
readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
|
|
@@ -86,8 +116,82 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
86
116
|
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../index.js").JidWithDevice & {
|
|
87
117
|
jid: string;
|
|
88
118
|
})[]>;
|
|
119
|
+
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
89
120
|
updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
|
|
90
121
|
sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: import("../index.js").MiscMessageGenerationOptions) => Promise<import("../index.js").WAMessage | undefined>;
|
|
122
|
+
sendStatusMentions: (content: import("../index.js").AnyMessageContent, jids?: string[]) => Promise<import("../index.js").WAMessage>;
|
|
123
|
+
sendTable: (jid: string, title: string, headers: string[], rows: string[][], quoted?: any, options?: {
|
|
124
|
+
headerText?: string;
|
|
125
|
+
footer?: string;
|
|
126
|
+
}) => Promise<{
|
|
127
|
+
message: import("../index.js").proto.IMessage;
|
|
128
|
+
messageId: string;
|
|
129
|
+
}>;
|
|
130
|
+
sendList: (jid: string, title: string, items: string[] | string[][], quoted?: any, options?: {
|
|
131
|
+
headerText?: string;
|
|
132
|
+
footer?: string;
|
|
133
|
+
}) => Promise<{
|
|
134
|
+
message: import("../index.js").proto.IMessage;
|
|
135
|
+
messageId: string;
|
|
136
|
+
}>;
|
|
137
|
+
sendCodeBlock: (jid: string, code: string, quoted?: any, options?: {
|
|
138
|
+
title?: string;
|
|
139
|
+
footer?: string;
|
|
140
|
+
language?: string;
|
|
141
|
+
}) => Promise<{
|
|
142
|
+
message: import("../index.js").proto.IMessage;
|
|
143
|
+
messageId: string;
|
|
144
|
+
}>;
|
|
145
|
+
sendLatex: (jid: string, quoted: any, options: {
|
|
146
|
+
text?: string;
|
|
147
|
+
expressions: import("../index.js").LatexExpression[];
|
|
148
|
+
headerText?: string;
|
|
149
|
+
footer?: string;
|
|
150
|
+
}) => Promise<{
|
|
151
|
+
message: import("../index.js").proto.IMessage;
|
|
152
|
+
messageId: string;
|
|
153
|
+
}>;
|
|
154
|
+
sendLatexImage: (jid: string, quoted: any, options: {
|
|
155
|
+
text?: string;
|
|
156
|
+
expressions: import("../index.js").LatexExpression[];
|
|
157
|
+
headerText?: string;
|
|
158
|
+
footer?: string;
|
|
159
|
+
}, renderLatexToPng: (latexExpr: string) => Promise<{
|
|
160
|
+
buffer: Buffer;
|
|
161
|
+
width: number;
|
|
162
|
+
height: number;
|
|
163
|
+
}>, uploadFn: (buffer: Buffer, type: string) => Promise<{
|
|
164
|
+
url?: string;
|
|
165
|
+
directPath?: string;
|
|
166
|
+
}>) => Promise<{
|
|
167
|
+
message: import("../index.js").proto.IMessage;
|
|
168
|
+
messageId: string;
|
|
169
|
+
}>;
|
|
170
|
+
sendLatexInlineImage: (jid: string, quoted: any, options: {
|
|
171
|
+
text?: string;
|
|
172
|
+
expressions: import("../index.js").LatexExpression[];
|
|
173
|
+
headerText?: string;
|
|
174
|
+
footer?: string;
|
|
175
|
+
}, renderLatexToPng: (latexExpr: string) => Promise<{
|
|
176
|
+
buffer: Buffer;
|
|
177
|
+
width: number;
|
|
178
|
+
height: number;
|
|
179
|
+
}>, uploadFn: (buffer: Buffer, type: string) => Promise<{
|
|
180
|
+
url?: string;
|
|
181
|
+
directPath?: string;
|
|
182
|
+
}>) => Promise<{
|
|
183
|
+
message: import("../index.js").proto.IMessage;
|
|
184
|
+
messageId: string;
|
|
185
|
+
}>;
|
|
186
|
+
sendRichMessage: (jid: string, submessages: import("../index.js").RichSubMessage[], quoted?: any) => Promise<{
|
|
187
|
+
message: import("../index.js").proto.IMessage;
|
|
188
|
+
messageId: string;
|
|
189
|
+
}>;
|
|
190
|
+
extractUnifiedResponse: (msg: import("../index.js").proto.IMessage | null | undefined) => import("../index.js").CapturedUnifiedResponse | null;
|
|
191
|
+
sendUnifiedResponse: (jid: string, quoted: any, captured: import("../index.js").CapturedUnifiedResponse) => Promise<{
|
|
192
|
+
message: import("../index.js").proto.IMessage;
|
|
193
|
+
messageId: string;
|
|
194
|
+
}>;
|
|
91
195
|
newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
92
196
|
newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<unknown>;
|
|
93
197
|
newsletterFetchAllParticipating: () => Promise<unknown>;
|
|
@@ -142,17 +246,31 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
142
246
|
groupFetchAllParticipating: () => Promise<{
|
|
143
247
|
[_: string]: import("../index.js").GroupMetadata;
|
|
144
248
|
}>;
|
|
249
|
+
serverProps: {
|
|
250
|
+
privacyTokenOn1to1: boolean;
|
|
251
|
+
profilePicPrivacyToken: boolean;
|
|
252
|
+
lidTrustedTokenIssueToLid: boolean;
|
|
253
|
+
};
|
|
145
254
|
createCallLink: (type: "audio" | "video", event?: {
|
|
146
255
|
startTime: number;
|
|
147
256
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
148
257
|
getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
|
|
149
|
-
|
|
258
|
+
messageMutex: {
|
|
259
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
260
|
+
};
|
|
261
|
+
receiptMutex: {
|
|
262
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
263
|
+
};
|
|
264
|
+
appStatePatchMutex: {
|
|
265
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
266
|
+
};
|
|
267
|
+
notificationMutex: {
|
|
150
268
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
151
269
|
};
|
|
152
270
|
upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
153
271
|
appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
|
|
154
272
|
sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
155
|
-
presenceSubscribe: (toJid: string
|
|
273
|
+
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
156
274
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
157
275
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
158
276
|
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
@@ -214,13 +332,15 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
214
332
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
215
333
|
sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
|
|
216
334
|
logout: (msg?: string) => Promise<void>;
|
|
217
|
-
end: (error: Error | undefined) => void
|
|
335
|
+
end: (error: Error | undefined) => Promise<void>;
|
|
218
336
|
onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
|
|
219
337
|
uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
|
|
220
338
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
221
339
|
digestKeyBundle: () => Promise<void>;
|
|
222
340
|
rotateSignedPreKey: () => Promise<void>;
|
|
223
341
|
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
342
|
+
updateServerTimeOffset: ({ attrs }: import("../index.js").BinaryNode) => void;
|
|
343
|
+
sendUnifiedSession: () => Promise<void>;
|
|
224
344
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
225
345
|
waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
226
346
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Socket/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAItD,QAAA,MAAM,YAAY,GAAI,QAAQ,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Socket/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAItD,QAAA,MAAM,YAAY,GAAI,QAAQ,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUkpoB,CAAC;;eAAkC,CAAC;YAAc,CAAC;YAAc,CAAC;;;;;;;;;;;;;;;;;;;;UAA1tG,CAAC;;;;;;;;;;;;;;;;;;;;;;;kBAAuz3B,CAAC;cAAgB,CAAC;;;;;;kBAA0Y,CAAC;cAAgB,CAAC;;;;;;aAA6V,CAAC;cAAgB,CAAC;gBAAkB,CAAC;;;;;;YAAmV,CAAC;;kBAAoD,CAAC;cAAgB,CAAC;;;;;;YAAiU,CAAC;;kBAAoD,CAAC;cAAgB,CAAC;;;;;;WAAgL,CAAC;kBAAoB,CAAC;;;;;;YAA4X,CAAC;;kBAAoD,CAAC;cAAgB,CAAC;;;;;;WAAgL,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAllnB,CAAC;;;;;;;;;0DAA1+0B,GAAG,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAH3uC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/lib/Socket/index.js
CHANGED
|
@@ -6,12 +6,6 @@ const makeWASocket = (config) => {
|
|
|
6
6
|
...DEFAULT_CONNECTION_CONFIG,
|
|
7
7
|
...config
|
|
8
8
|
};
|
|
9
|
-
// If the user hasn't provided their own history sync function,
|
|
10
|
-
// let's create a default one that respects the syncFullHistory flag.
|
|
11
|
-
// TODO: Change
|
|
12
|
-
if (config.shouldSyncHistoryMessage === undefined) {
|
|
13
|
-
newConfig.shouldSyncHistoryMessage = () => !!newConfig.syncFullHistory;
|
|
14
|
-
}
|
|
15
9
|
return makeCommunitiesSocket(newConfig);
|
|
16
10
|
};
|
|
17
11
|
export default makeWASocket;
|
package/lib/Socket/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Socket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErD,+BAA+B;AAC/B,MAAM,YAAY,GAAG,CAAC,MAA8B,EAAE,EAAE;IACvD,MAAM,SAAS,GAAG;QACjB,GAAG,yBAAyB;QAC5B,GAAG,MAAM;KACT,CAAA;IAED
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Socket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErD,+BAA+B;AAC/B,MAAM,YAAY,GAAG,CAAC,MAA8B,EAAE,EAAE;IACvD,MAAM,SAAS,GAAG;QACjB,GAAG,yBAAyB;QAC5B,GAAG,MAAM;KACT,CAAA;IAED,OAAO,qBAAqB,CAAC,SAAS,CAAC,CAAA;AACxC,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,18 +1,48 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
2
|
import Long from 'long';
|
|
3
3
|
import { proto } from '../../WAProto/index.js';
|
|
4
|
-
import type { MessageReceiptType, MessageRelayOptions, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
|
|
4
|
+
import type { MessageReceiptType, MessageRelayOptions, SocketConfig, WAInitiateCallOptions, WAInitiateCallResult, WAMessage, WAMessageKey } from '../Types/index.js';
|
|
5
5
|
import { type BinaryNode } from '../WABinary/index.js';
|
|
6
6
|
export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
7
7
|
sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number) => Promise<void>;
|
|
8
8
|
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
9
|
+
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
to: string;
|
|
12
|
+
}>;
|
|
13
|
+
initiateCall: (jid: string, options?: WAInitiateCallOptions) => Promise<WAInitiateCallResult>;
|
|
14
|
+
cancelCall: (callId: string, callTo: string) => Promise<void>;
|
|
9
15
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
16
|
+
acceptCall: (callId: string, callFrom: string, isVideo?: boolean) => Promise<void>;
|
|
17
|
+
preacceptCall: (callId: string, callCreator: string, isVideo?: boolean) => Promise<void>;
|
|
18
|
+
terminateCall: (callId: string, callTo: string, callCreator?: string, reason?: string, duration?: number) => Promise<void>;
|
|
19
|
+
sendRelayLatency: (callId: string, callCreator: string, relays: Array<{
|
|
20
|
+
relayName?: string;
|
|
21
|
+
latency: number;
|
|
22
|
+
relayId?: string;
|
|
23
|
+
dlBw?: number;
|
|
24
|
+
ulBw?: number;
|
|
25
|
+
}>, transactionId?: string) => Promise<void>;
|
|
26
|
+
sendTransport: (callId: string, callCreator: string, to: string, candidates: Array<{
|
|
27
|
+
priority: string;
|
|
28
|
+
data: Uint8Array;
|
|
29
|
+
}>, round?: number) => Promise<void>;
|
|
30
|
+
sendCallDuration: (callId: string, callCreator: string, peer: string, audioDuration: number, callType?: string) => Promise<void>;
|
|
31
|
+
muteCall: (callId: string, callCreator: string, to: string, muted: boolean) => Promise<void>;
|
|
32
|
+
sendHeartbeat: (callId: string, callCreator: string) => Promise<void>;
|
|
33
|
+
sendEncRekey: (callId: string, callCreator: string, to: string, transactionId: string) => Promise<void>;
|
|
34
|
+
sendVideoState: (callId: string, callCreator: string, to: string, enabled: boolean, orientation?: string) => Promise<void>;
|
|
35
|
+
queryCallLink: (token: string, media?: string) => Promise<any>;
|
|
36
|
+
joinCallLink: (token: string, media?: string) => Promise<any>;
|
|
10
37
|
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
|
|
11
|
-
requestPlaceholderResend: (messageKey: WAMessageKey) => Promise<string | undefined>;
|
|
38
|
+
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<WAMessage>) => Promise<string | undefined>;
|
|
12
39
|
messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
|
|
13
40
|
getPrivacyTokens: (jids: string[]) => Promise<any>;
|
|
41
|
+
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
14
42
|
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
15
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions
|
|
43
|
+
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList, AI }: MessageRelayOptions & {
|
|
44
|
+
AI?: boolean;
|
|
45
|
+
}) => Promise<string>;
|
|
16
46
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
|
|
17
47
|
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
18
48
|
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
@@ -29,8 +59,82 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
29
59
|
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary/index.js").JidWithDevice & {
|
|
30
60
|
jid: string;
|
|
31
61
|
})[]>;
|
|
62
|
+
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
32
63
|
updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
|
|
33
64
|
sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
|
|
65
|
+
sendStatusMentions: (content: import("../Types/index.js").AnyMessageContent, jids?: string[]) => Promise<WAMessage>;
|
|
66
|
+
sendTable: (jid: string, title: string, headers: string[], rows: string[][], quoted?: any, options?: {
|
|
67
|
+
headerText?: string;
|
|
68
|
+
footer?: string;
|
|
69
|
+
}) => Promise<{
|
|
70
|
+
message: proto.IMessage;
|
|
71
|
+
messageId: string;
|
|
72
|
+
}>;
|
|
73
|
+
sendList: (jid: string, title: string, items: string[] | string[][], quoted?: any, options?: {
|
|
74
|
+
headerText?: string;
|
|
75
|
+
footer?: string;
|
|
76
|
+
}) => Promise<{
|
|
77
|
+
message: proto.IMessage;
|
|
78
|
+
messageId: string;
|
|
79
|
+
}>;
|
|
80
|
+
sendCodeBlock: (jid: string, code: string, quoted?: any, options?: {
|
|
81
|
+
title?: string;
|
|
82
|
+
footer?: string;
|
|
83
|
+
language?: string;
|
|
84
|
+
}) => Promise<{
|
|
85
|
+
message: proto.IMessage;
|
|
86
|
+
messageId: string;
|
|
87
|
+
}>;
|
|
88
|
+
sendLatex: (jid: string, quoted: any, options: {
|
|
89
|
+
text?: string;
|
|
90
|
+
expressions: import("../Utils/index.js").LatexExpression[];
|
|
91
|
+
headerText?: string;
|
|
92
|
+
footer?: string;
|
|
93
|
+
}) => Promise<{
|
|
94
|
+
message: proto.IMessage;
|
|
95
|
+
messageId: string;
|
|
96
|
+
}>;
|
|
97
|
+
sendLatexImage: (jid: string, quoted: any, options: {
|
|
98
|
+
text?: string;
|
|
99
|
+
expressions: import("../Utils/index.js").LatexExpression[];
|
|
100
|
+
headerText?: string;
|
|
101
|
+
footer?: string;
|
|
102
|
+
}, renderLatexToPng: (latexExpr: string) => Promise<{
|
|
103
|
+
buffer: Buffer;
|
|
104
|
+
width: number;
|
|
105
|
+
height: number;
|
|
106
|
+
}>, uploadFn: (buffer: Buffer, type: string) => Promise<{
|
|
107
|
+
url?: string;
|
|
108
|
+
directPath?: string;
|
|
109
|
+
}>) => Promise<{
|
|
110
|
+
message: proto.IMessage;
|
|
111
|
+
messageId: string;
|
|
112
|
+
}>;
|
|
113
|
+
sendLatexInlineImage: (jid: string, quoted: any, options: {
|
|
114
|
+
text?: string;
|
|
115
|
+
expressions: import("../Utils/index.js").LatexExpression[];
|
|
116
|
+
headerText?: string;
|
|
117
|
+
footer?: string;
|
|
118
|
+
}, renderLatexToPng: (latexExpr: string) => Promise<{
|
|
119
|
+
buffer: Buffer;
|
|
120
|
+
width: number;
|
|
121
|
+
height: number;
|
|
122
|
+
}>, uploadFn: (buffer: Buffer, type: string) => Promise<{
|
|
123
|
+
url?: string;
|
|
124
|
+
directPath?: string;
|
|
125
|
+
}>) => Promise<{
|
|
126
|
+
message: proto.IMessage;
|
|
127
|
+
messageId: string;
|
|
128
|
+
}>;
|
|
129
|
+
sendRichMessage: (jid: string, submessages: import("../Utils/index.js").RichSubMessage[], quoted?: any) => Promise<{
|
|
130
|
+
message: proto.IMessage;
|
|
131
|
+
messageId: string;
|
|
132
|
+
}>;
|
|
133
|
+
extractUnifiedResponse: (msg: proto.IMessage | null | undefined) => import("../Utils/index.js").CapturedUnifiedResponse | null;
|
|
134
|
+
sendUnifiedResponse: (jid: string, quoted: any, captured: import("../Utils/index.js").CapturedUnifiedResponse) => Promise<{
|
|
135
|
+
message: proto.IMessage;
|
|
136
|
+
messageId: string;
|
|
137
|
+
}>;
|
|
34
138
|
newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
|
|
35
139
|
newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
|
|
36
140
|
newsletterFetchAllParticipating: () => Promise<unknown>;
|
|
@@ -85,17 +189,31 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
85
189
|
groupFetchAllParticipating: () => Promise<{
|
|
86
190
|
[_: string]: import("../Types/index.js").GroupMetadata;
|
|
87
191
|
}>;
|
|
192
|
+
serverProps: {
|
|
193
|
+
privacyTokenOn1to1: boolean;
|
|
194
|
+
profilePicPrivacyToken: boolean;
|
|
195
|
+
lidTrustedTokenIssueToLid: boolean;
|
|
196
|
+
};
|
|
88
197
|
createCallLink: (type: "audio" | "video", event?: {
|
|
89
198
|
startTime: number;
|
|
90
199
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
91
200
|
getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
|
|
92
|
-
|
|
201
|
+
messageMutex: {
|
|
202
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
203
|
+
};
|
|
204
|
+
receiptMutex: {
|
|
205
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
206
|
+
};
|
|
207
|
+
appStatePatchMutex: {
|
|
208
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
209
|
+
};
|
|
210
|
+
notificationMutex: {
|
|
93
211
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
94
212
|
};
|
|
95
213
|
upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
|
|
96
214
|
appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
|
|
97
215
|
sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
98
|
-
presenceSubscribe: (toJid: string
|
|
216
|
+
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
99
217
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
100
218
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
101
219
|
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
@@ -157,13 +275,15 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
157
275
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
158
276
|
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
159
277
|
logout: (msg?: string) => Promise<void>;
|
|
160
|
-
end: (error: Error | undefined) => void
|
|
278
|
+
end: (error: Error | undefined) => Promise<void>;
|
|
161
279
|
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
162
280
|
uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
|
|
163
281
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
164
282
|
digestKeyBundle: () => Promise<void>;
|
|
165
283
|
rotateSignedPreKey: () => Promise<void>;
|
|
166
284
|
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
285
|
+
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
286
|
+
sendUnifiedSession: () => Promise<void>;
|
|
167
287
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
168
288
|
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
169
289
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages-recv.d.ts","sourceRoot":"","sources":["../../src/Socket/messages-recv.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"messages-recv.d.ts","sourceRoot":"","sources":["../../src/Socket/messages-recv.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAQ9C,OAAO,KAAK,EAEX,kBAAkB,EAClB,mBAAmB,EAGnB,YAAY,EAEZ,qBAAqB,EACrB,oBAAoB,EACpB,SAAS,EACT,YAAY,EAEZ,MAAM,UAAU,CAAA;AAwCjB,OAAO,EAEN,KAAK,UAAU,EAgBf,MAAM,aAAa,CAAA;AAIpB,eAAO,MAAM,sBAAsB,GAAI,QAAQ,YAAY;8CAkcH,UAAU,cAAc,MAAM;6BAwW/C,UAAU;uBAvThB,MAAM;;;;wBAqDL,MAAM,YAAW,qBAAqB,KAAQ,OAAO,CAAC,oBAAoB,CAAC;yBA6C1E,MAAM,UAAU,MAAM;yBA5GtB,MAAM,YAAY,MAAM;yBA8GxB,MAAM,YAAY,MAAM,YAAY,OAAO;4BAgBxC,MAAM,eAAe,MAAM,YAAY,OAAO;4BAzC1E,MAAM,UACN,MAAM,gBACA,MAAM,WACX,MAAM,aACJ,MAAM;+BA2DT,MAAM,eACD,MAAM,UACX,KAAK,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,kBACtF,MAAM;4BA0Bd,MAAM,eACD,MAAM,MACf,MAAM,cACE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,UACjD,MAAM;+BAsBN,MAAM,eACD,MAAM,QACb,MAAM,iBACG,MAAM;uBAsBU,MAAM,eAAe,MAAM,MAAM,MAAM,SAAS,OAAO;4BAclD,MAAM,eAAe,MAAM;2BAQ5B,MAAM,eAAe,MAAM,MAAM,MAAM,iBAAiB,MAAM;6BAkBzF,MAAM,eACD,MAAM,MACf,MAAM,WACD,OAAO;2BAqBmB,MAAM;0BAQP,MAAM;iCAztBjC,MAAM,gBACC,YAAY,sBACN,MAAM,GAAG,IAAI,KAC/B,OAAO,CAAC,MAAM,CAAC;2CAoBL,YAAY,YACd,OAAO,CAAC,SAAS,CAAC,KAC1B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;;UA6cP,CAAC;;;;;;;;;;;;;;;;;;;;;;;kBA43BW,CAAC;cAAgB,CAAC;;;;;;kBAW1B,CAAA;cAAgB,CAAC;;;;;;aAU1C,CAAA;cAEU,CAAC;gBAAkB,CAAC;;;;;;YAa/B,CAAC;;kBAKD,CAFA;cAAgB,CAAC;;;;;;YAQyD,CAAA;;kBAEnC,CAAC;cAAgB,CAAC;;;;;;WAGqB,CAAC;kBACzE,CAAC;;;;;;YAQ8D,CAAC;;kBAIvD,CAAC;cAAgB,CAAC;;;;;;WAMmB,CAAC;kBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA7mBjE,CAAC;;;;;;;;;0DAt4BA,GAAG,0BAEd,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAytEH,CAAA"}
|