@oxidezap/baileyrs 0.3.7 → 0.3.8
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 +48 -8
- package/lib/Bridge/history-sync-wire.d.ts +2 -2
- package/lib/Bridge/history-sync-wire.js +4 -4
- package/lib/Bridge/schema.js +7 -1
- package/lib/Bridge/types.d.ts +7 -1
- package/lib/Compatibility/auth-state.d.ts +30 -0
- package/lib/Compatibility/auth-state.js +96 -0
- package/lib/Compatibility/encode-proto-core.d.ts +31 -0
- package/lib/Compatibility/encode-proto-core.js +51 -0
- package/lib/Compatibility/encode-proto.d.ts +0 -29
- package/lib/Compatibility/encode-proto.js +3 -50
- package/lib/Compatibility/host-auth-state.d.ts +6 -0
- package/lib/Compatibility/host-auth-state.js +162 -0
- package/lib/Compatibility/internal/auth-state.d.ts +3 -7
- package/lib/Compatibility/internal/auth-state.js +34 -1
- package/lib/Compatibility/internal/host-auth-state.d.ts +4 -0
- package/lib/Compatibility/internal/host-auth-state.js +14 -0
- package/lib/Compatibility/legacy-store/device.js +5 -5
- package/lib/Compatibility/message-ids.d.ts +17 -0
- package/lib/Compatibility/message-ids.js +47 -0
- package/lib/Compatibility/message-relay.d.ts +2 -2
- package/lib/Compatibility/message-relay.js +4 -4
- package/lib/Compatibility/proto-runtime.js +33 -11
- package/lib/Compatibility/socket-results.d.ts +1 -1
- package/lib/Compatibility/tagged-message-waiter.d.ts +5 -2
- package/lib/Compatibility/tagged-message-waiter.js +5 -5
- package/lib/Compatibility/usync/adapter.d.ts +1 -1
- package/lib/Compatibility/websocket-client.d.ts +11 -3
- package/lib/Compatibility/websocket-client.js +84 -11
- package/lib/Defaults/index.d.ts +8 -8
- package/lib/Defaults/index.js +8 -8
- package/lib/Media/content.d.ts +28 -0
- package/lib/Media/content.js +129 -0
- package/lib/Media/core.d.ts +34 -0
- package/lib/Media/core.js +120 -0
- package/lib/Media/mutations.d.ts +24 -0
- package/lib/Media/mutations.js +38 -0
- package/lib/Runtime/aes-gcm.d.ts +4 -0
- package/lib/Runtime/aes-gcm.js +11 -0
- package/lib/Runtime/bridge.d.ts +44 -0
- package/lib/Runtime/bridge.js +76 -0
- package/lib/Runtime/buffer.d.ts +9 -0
- package/lib/Runtime/buffer.js +22 -0
- package/lib/Runtime/bytes.d.ts +61 -0
- package/lib/Runtime/bytes.js +270 -0
- package/lib/Runtime/host.d.ts +22 -0
- package/lib/Runtime/host.js +43 -0
- package/lib/Runtime/long.d.ts +33 -0
- package/lib/Runtime/long.js +64 -0
- package/lib/Runtime/node-media-processors.d.ts +4 -0
- package/lib/Runtime/node-media-processors.js +29 -0
- package/lib/Runtime/node-media.d.ts +28 -0
- package/lib/Runtime/node-media.js +115 -0
- package/lib/Runtime/node.d.ts +14 -0
- package/lib/Runtime/node.js +81 -0
- package/lib/Runtime/paths.d.ts +4 -0
- package/lib/Runtime/paths.js +7 -0
- package/lib/Runtime/stream.d.ts +11 -0
- package/lib/Runtime/stream.js +25 -0
- package/lib/Runtime/types.d.ts +98 -0
- package/lib/Runtime/types.js +13 -0
- package/lib/Socket/core.d.ts +312 -0
- package/lib/Socket/core.js +1122 -0
- package/lib/Socket/events-core.d.ts +75 -0
- package/lib/Socket/events-core.js +1058 -0
- package/lib/Socket/events.d.ts +1 -63
- package/lib/Socket/events.js +4 -1047
- package/lib/Socket/groups.js +4 -3
- package/lib/Socket/index.d.ts +521 -103
- package/lib/Socket/index.js +10 -1007
- package/lib/Socket/messages-core.d.ts +41 -0
- package/lib/Socket/messages-core.js +270 -0
- package/lib/Socket/messages.d.ts +9 -36
- package/lib/Socket/messages.js +3 -260
- package/lib/Socket/newsletter.js +3 -3
- package/lib/Socket/profile.js +1 -1
- package/lib/Socket/terminal-close-reporter.d.ts +2 -0
- package/lib/Socket/terminal-close-reporter.js +3 -3
- package/lib/Socket/transport.d.ts +2 -0
- package/lib/Socket/transport.js +16 -1
- package/lib/Socket/types.d.ts +2 -0
- package/lib/Types/Auth.d.ts +11 -0
- package/lib/Types/Message.d.ts +1 -1
- package/lib/Types/Socket.d.ts +2 -2
- package/lib/Types/index.d.ts +6 -1
- package/lib/Utils/browser-utils.d.ts +4 -0
- package/lib/Utils/browser-utils.js +53 -2
- package/lib/Utils/crypto.d.ts +1 -0
- package/lib/Utils/crypto.js +1 -0
- package/lib/Utils/event-buffer.d.ts +6 -1
- package/lib/Utils/event-buffer.js +28 -27
- package/lib/Utils/link-preview.d.ts +4 -3
- package/lib/Utils/logger.d.ts +3 -0
- package/lib/Utils/logger.js +35 -6
- package/lib/Utils/messages-core.d.ts +174 -0
- package/lib/Utils/messages-core.js +1042 -0
- package/lib/Utils/messages-media-core.d.ts +73 -0
- package/lib/Utils/messages-media-core.js +319 -0
- package/lib/Utils/messages-media.d.ts +1 -72
- package/lib/Utils/messages-media.js +9 -358
- package/lib/Utils/messages.d.ts +1 -166
- package/lib/Utils/messages.js +7 -1040
- package/lib/Utils/optional-peer.js +14 -5
- package/lib/Utils/process-history-message-core.d.ts +36 -0
- package/lib/Utils/process-history-message-core.js +187 -0
- package/lib/Utils/process-history-message.d.ts +5 -43
- package/lib/Utils/process-history-message.js +11 -197
- package/lib/Utils/process-message-core.d.ts +29 -0
- package/lib/Utils/process-message-core.js +112 -0
- package/lib/Utils/process-message.d.ts +4 -24
- package/lib/Utils/process-message.js +6 -111
- package/lib/WABinary/generic-utils.js +7 -5
- package/lib/host-shared.d.ts +74 -0
- package/lib/host-shared.js +15 -0
- package/lib/host-socket-operations.d.ts +3 -0
- package/lib/host-socket-operations.js +2 -0
- package/lib/host-surface.d.ts +21 -0
- package/lib/host-surface.js +35 -0
- package/lib/host-types.d.ts +356 -0
- package/lib/host-types.js +2 -0
- package/lib/host.d.ts +33 -0
- package/lib/host.js +31 -0
- package/lib/node-surface.d.ts +9 -0
- package/lib/node-surface.js +15 -0
- package/lib/surface.d.ts +5 -0
- package/lib/surface.js +6 -0
- package/lib/wasm.d.ts +27 -0
- package/lib/wasm.js +27 -0
- package/package.json +18 -6
package/lib/Socket/index.d.ts
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
12
|
-
sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
|
|
13
|
-
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
1
|
+
import { createWASocketFactory } from './core.js';
|
|
2
|
+
import type { BaileysRuntime } from '../Runtime/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Node entrypoint: the factory every consumer has always called, bound to
|
|
5
|
+
* the Node runtime (bare bridge entrypoint, node:crypto randomness,
|
|
6
|
+
* portable emitter, OpenSSL native crypto, stdout logger sink).
|
|
7
|
+
*/
|
|
8
|
+
export declare const makeNodeWASocket: (config: import("../index.js").UserFacingSocketConfig | import("../index.js").HostSocketConfig) => ReturnType<(runtime: BaileysRuntime, config: import("../index.js").UserFacingSocketConfig | import("../index.js").HostSocketConfig, claimEngineInitialization: () => boolean, resetEngineInitialization: () => void, runtimeLogger: ReturnType<typeof import("../Utils/logger.js").createRuntimeLogger>) => {
|
|
9
|
+
sendMessageAck: (node: import("../index.js").BinaryNode, errorCode?: number) => Promise<void>;
|
|
10
|
+
sendRetryRequest: (node: import("../index.js").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
14
11
|
updateBlockStatus: (jid: string, action: import("./blocking.js").BlockAction) => Promise<void>;
|
|
15
12
|
fetchBlocklist: () => Promise<Array<string | undefined>>;
|
|
16
13
|
getCatalog: ({ jid, limit, cursor }: import("../index.js").GetCatalogOptions) => Promise<import("../index.js").CatalogPage>;
|
|
@@ -27,7 +24,7 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
27
24
|
archiveChat: (jid: string, archive: boolean) => Promise<void>;
|
|
28
25
|
starMessage: (jid: string, messageId: string, star: boolean) => Promise<void>;
|
|
29
26
|
chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
|
|
30
|
-
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
27
|
+
addOrEditContact: (jid: string, contact: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
31
28
|
removeContact: (jid: string) => Promise<void>;
|
|
32
29
|
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
33
30
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
@@ -55,7 +52,7 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
55
52
|
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
56
53
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
57
54
|
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
58
|
-
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
55
|
+
groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
59
56
|
groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
60
57
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
61
58
|
groupSettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
@@ -89,7 +86,7 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
89
86
|
communityRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
90
87
|
communityAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
91
88
|
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
|
|
92
|
-
communityAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
89
|
+
communityAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
93
90
|
communityGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
94
91
|
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
95
92
|
communitySettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
@@ -97,20 +94,20 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
97
94
|
communityJoinApprovalMode: (jid: string, mode: import("./groups.js").JoinApprovalMode) => Promise<void>;
|
|
98
95
|
communityFetchAllParticipating: () => Promise<Record<string, import("../index.js").GroupMetadata>>;
|
|
99
96
|
waitForSocketOpen: () => Promise<void>;
|
|
100
|
-
upsertMessage: (msg: WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
97
|
+
upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
101
98
|
onUnexpectedError: (err: Error, msg: string) => void;
|
|
102
99
|
resyncAppState: (collections?: readonly ('critical_block' | 'critical_unblock_low' | 'regular_high' | 'regular_low' | 'regular')[], isInitialSync?: boolean) => Promise<void>;
|
|
103
|
-
updateServerTimeOffset: (node: BinaryNode) => never;
|
|
100
|
+
updateServerTimeOffset: (node: import("../index.js").BinaryNode) => never;
|
|
104
101
|
sendUnifiedSession: () => Promise<never>;
|
|
105
102
|
appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<never>;
|
|
106
103
|
messageRetryManager: null;
|
|
107
|
-
sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: Omit<import("../index.js").MessageGenerationOptions, 'waClient' | 'logger' | 'userJid' | 'mediaInNote'>) => Promise<WAMessage>;
|
|
108
|
-
updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
|
|
109
|
-
relayMessage: (jid: string, message: proto.IMessage, options: import("../index.js").MessageRelayOptions) => Promise<string>;
|
|
110
|
-
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
104
|
+
sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: Omit<import("../index.js").MessageGenerationOptions, 'waClient' | 'logger' | 'userJid' | 'mediaInNote'>) => Promise<import("../index.js").WAMessage>;
|
|
105
|
+
updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
|
|
106
|
+
relayMessage: (jid: string, message: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage, options: import("../index.js").MessageRelayOptions) => Promise<string>;
|
|
107
|
+
readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
|
|
111
108
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
112
|
-
sendReceipts: (keys: WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
113
|
-
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<WAMessage>) => Promise<string | undefined>;
|
|
109
|
+
sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
110
|
+
requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey, msgData?: Partial<import("../index.js").WAMessage>) => Promise<string | undefined>;
|
|
114
111
|
newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
115
112
|
newsletterMetadata: (type: import("./newsletter.js").NewsletterKeyType, key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
|
|
116
113
|
newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<import("../index.js").NewsletterMetadata>;
|
|
@@ -190,42 +187,17 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
190
187
|
isBuffering(): boolean;
|
|
191
188
|
destroy(): void;
|
|
192
189
|
};
|
|
193
|
-
logger: import("../Utils/logger.js").ILogger;
|
|
194
|
-
ws: WebSocketClient;
|
|
190
|
+
logger: import("../Utils/logger.js").ILogger | import("../Utils/logger.js").Logger;
|
|
191
|
+
ws: import("../Compatibility/websocket-client.js").WebSocketClient;
|
|
195
192
|
type: 'md';
|
|
196
|
-
/**
|
|
197
|
-
* `await using sock = makeWASocket(config)` — frees the wasm client on
|
|
198
|
-
* scope exit. Nothing else can: the bridge holds the JS event callbacks
|
|
199
|
-
* as wasm-bindgen externrefs and those callbacks reach back to this
|
|
200
|
-
* closure, so the reference cycle crosses the JS/wasm boundary and no
|
|
201
|
-
* `FinalizationRegistry` will ever fire for the client.
|
|
202
|
-
*
|
|
203
|
-
* Delegates to `end()`, so it flushes the auth store and is idempotent.
|
|
204
|
-
*
|
|
205
|
-
* Then awaits `initPromise`, because `end()` alone does not satisfy the
|
|
206
|
-
* async-disposal contract: called before `createWhatsAppClient()`
|
|
207
|
-
* settles, it sees `client === undefined`, frees nothing, and resolves
|
|
208
|
-
* while initialization is still running. What actually disposes that
|
|
209
|
-
* client is the `ended` guard inside `init()` — so code after the
|
|
210
|
-
* `await using` scope would otherwise overlap with bridge construction,
|
|
211
|
-
* event callbacks, and store access. `end()` runs first because it sets
|
|
212
|
-
* `ended` synchronously, which is what makes `init()` bail out early.
|
|
213
|
-
*
|
|
214
|
-
* The `finally` is load-bearing: `end()` rethrows the first auth-store
|
|
215
|
-
* flush failure, and letting that propagate directly would skip the wait
|
|
216
|
-
* and resolve the disposer with `init()` still in flight — losing the
|
|
217
|
-
* one guarantee it exists to provide, in exactly the situation where
|
|
218
|
-
* cleanup already went wrong. `initPromise` swallows its own failures,
|
|
219
|
-
* so awaiting it here cannot mask the flush error.
|
|
220
|
-
*/
|
|
221
193
|
[Symbol.asyncDispose](): Promise<void>;
|
|
222
|
-
user: Contact | undefined;
|
|
223
|
-
waClient: WasmWhatsAppClient | undefined;
|
|
194
|
+
user: import("../index.js").Contact | undefined;
|
|
195
|
+
waClient: import("@oxidezap/whatsapp-rust-bridge").WasmWhatsAppClient | undefined;
|
|
224
196
|
isConnected: boolean;
|
|
225
197
|
isLoggedIn: boolean;
|
|
226
198
|
authState: {
|
|
227
|
-
creds: AuthenticationCreds;
|
|
228
|
-
keys: SignalKeyStoreWithTransaction;
|
|
199
|
+
creds: import("../index.js").AuthenticationCreds;
|
|
200
|
+
keys: import("../index.js").SignalKeyStoreWithTransaction;
|
|
229
201
|
};
|
|
230
202
|
devicesMutex: {
|
|
231
203
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
@@ -243,68 +215,514 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
243
215
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
244
216
|
};
|
|
245
217
|
generateMessageTag: () => string;
|
|
246
|
-
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
218
|
+
sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
|
|
247
219
|
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
248
220
|
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<any>;
|
|
249
221
|
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
250
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<BinaryNode>;
|
|
222
|
+
query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<import("../index.js").BinaryNode>;
|
|
251
223
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
* refused rather than ignored. Upstream uses it to encrypt a different
|
|
255
|
-
* plaintext for the caller's own other devices; the engine encrypts one
|
|
256
|
-
* payload for every recipient, so honouring it is not possible here and
|
|
257
|
-
* dropping it would send those devices the wrong message.
|
|
258
|
-
*/
|
|
259
|
-
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs'], dsmMessage?: proto.IMessage) => Promise<{
|
|
260
|
-
nodes: BinaryNode[];
|
|
224
|
+
createParticipantNodes: (jids: string[], message: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage, extraAttrs?: import("../index.js").BinaryNode['attrs'], dsmMessage?: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage) => Promise<{
|
|
225
|
+
nodes: import("../index.js").BinaryNode[];
|
|
261
226
|
shouldIncludeDeviceIdentity: boolean;
|
|
262
227
|
}>;
|
|
263
228
|
signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
|
|
264
229
|
end: (error: Error | undefined) => Promise<void>;
|
|
265
230
|
logout: (msg?: string) => Promise<void>;
|
|
266
231
|
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
267
|
-
waitForConnectionUpdate: (check: (u: Partial<ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
232
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
268
233
|
setAutoReconnect: (enabled: boolean) => void;
|
|
269
|
-
|
|
270
|
-
* Update presence either globally (`available`/`unavailable`) or per-chat
|
|
271
|
-
* (`composing`/`recording`/`paused`), matching upstream Baileys' overload.
|
|
272
|
-
* Chat-state updates require `toJid`; omitting it raises `Boom(400)` so the
|
|
273
|
-
* caller hears about the protocol mistake instead of the bridge silently
|
|
274
|
-
* sending nothing.
|
|
275
|
-
*/
|
|
276
|
-
sendPresenceUpdate: (type: WAPresence, toJid?: string) => Promise<void>;
|
|
277
|
-
/**
|
|
278
|
-
* Plaintext media upload helper, source-compatible with the upstream
|
|
279
|
-
* Baileys `sock.waUploadToServer(buf, { mediaType })` shape so existing
|
|
280
|
-
* callers (or `prepareWAMessageMedia(msg, { upload: sock.waUploadToServer })`)
|
|
281
|
-
* keep working. Delegates to the bridge's encrypt + CDN-failover upload.
|
|
282
|
-
*/
|
|
234
|
+
sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
283
235
|
waUploadToServer: (data: Uint8Array | Buffer, opts: {
|
|
284
|
-
mediaType: MediaType;
|
|
285
|
-
}) => Promise<UploadMediaResult>;
|
|
236
|
+
mediaType: import("../index.js").MediaType;
|
|
237
|
+
}) => Promise<import("@oxidezap/whatsapp-rust-bridge").UploadMediaResult>;
|
|
286
238
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
287
239
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
* `NotificationUserReachoutTimelockUpdate` MEX notification, which is
|
|
293
|
-
* surfaced on `connection.update.reachoutTimeLock` automatically. Use
|
|
294
|
-
* this method to query on demand (e.g. on app start, or after a 463
|
|
295
|
-
* nack hints that the timelock just kicked in).
|
|
296
|
-
*
|
|
297
|
-
* Emits the result on `connection.update.reachoutTimeLock` as a side
|
|
298
|
-
* effect for parity with the push path. Returns the same state for
|
|
299
|
-
* callers that prefer awaiting.
|
|
300
|
-
*/
|
|
301
|
-
fetchReachoutTimelock: () => Promise<ReachoutTimelockState>;
|
|
302
|
-
/** Upstream Baileys-compatible name. */
|
|
303
|
-
fetchAccountReachoutTimelock: () => Promise<ReachoutTimelockState>;
|
|
304
|
-
getBusinessProfile: (jid: string) => Promise<WABusinessProfile | void>;
|
|
305
|
-
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
|
|
240
|
+
fetchReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
241
|
+
fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
242
|
+
getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
|
|
243
|
+
fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
306
244
|
sendStatusMessage: (message: Record<string, unknown>, recipients: string[]) => Promise<string>;
|
|
307
|
-
downloadMedia: <T extends MediaDownloadType>(message: WAMessage, type: T, options?: MediaDownloadOptions) => Promise<T extends "buffer" ? Buffer<ArrayBufferLike> : import("node:stream").Readable>;
|
|
308
|
-
}
|
|
245
|
+
downloadMedia: <T extends import("../index.js").MediaDownloadType>(message: import("../index.js").WAMessage, type: T, options?: import("../index.js").MediaDownloadOptions) => Promise<T extends "buffer" ? Buffer<ArrayBufferLike> : import("node:stream").Readable>;
|
|
246
|
+
}>;
|
|
247
|
+
/** Bind the socket core to a custom runtime (host entrypoints use this). */
|
|
248
|
+
export declare const createWASocketFactoryFor: (runtime: BaileysRuntime) => (config: import("../index.js").UserFacingSocketConfig | import("../index.js").HostSocketConfig) => ReturnType<(runtime: BaileysRuntime, config: import("../index.js").UserFacingSocketConfig | import("../index.js").HostSocketConfig, claimEngineInitialization: () => boolean, resetEngineInitialization: () => void, runtimeLogger: ReturnType<typeof import("../Utils/logger.js").createRuntimeLogger>) => {
|
|
249
|
+
sendMessageAck: (node: import("../index.js").BinaryNode, errorCode?: number) => Promise<void>;
|
|
250
|
+
sendRetryRequest: (node: import("../index.js").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
251
|
+
updateBlockStatus: (jid: string, action: import("./blocking.js").BlockAction) => Promise<void>;
|
|
252
|
+
fetchBlocklist: () => Promise<Array<string | undefined>>;
|
|
253
|
+
getCatalog: ({ jid, limit, cursor }: import("../index.js").GetCatalogOptions) => Promise<import("../index.js").CatalogPage>;
|
|
254
|
+
getCollections: (jid?: string, limit?: number) => Promise<import("../index.js").CollectionsPage>;
|
|
255
|
+
getOrderDetails: (orderId: string, tokenBase64: string, sellerJid?: string) => Promise<import("@oxidezap/whatsapp-rust-bridge").OrderResult>;
|
|
256
|
+
updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<void>;
|
|
257
|
+
updateCoverPhoto: (photo: import("../index.js").WAMediaUpload) => Promise<never>;
|
|
258
|
+
removeCoverPhoto: (id: string) => Promise<void>;
|
|
259
|
+
productCreate: (create: import("../index.js").ProductCreate) => Promise<never>;
|
|
260
|
+
productUpdate: (productId: string, update: import("../index.js").ProductUpdate) => Promise<never>;
|
|
261
|
+
productDelete: (productIds: string[]) => Promise<never>;
|
|
262
|
+
pinChat: (jid: string, pin: boolean) => Promise<void>;
|
|
263
|
+
muteChat: (jid: string, muteUntil?: number | null) => Promise<void>;
|
|
264
|
+
archiveChat: (jid: string, archive: boolean) => Promise<void>;
|
|
265
|
+
starMessage: (jid: string, messageId: string, star: boolean) => Promise<void>;
|
|
266
|
+
chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
|
|
267
|
+
addOrEditContact: (jid: string, contact: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
268
|
+
removeContact: (jid: string) => Promise<void>;
|
|
269
|
+
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
270
|
+
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
271
|
+
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
272
|
+
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
273
|
+
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
274
|
+
star: (jid: string, messages: {
|
|
275
|
+
id: string;
|
|
276
|
+
fromMe?: boolean;
|
|
277
|
+
}[], star: boolean) => Promise<void>;
|
|
278
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
279
|
+
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
280
|
+
onWhatsApp: (...phoneNumber: string[]) => Promise<import("./contacts.js").OnWhatsAppResult[] | undefined>;
|
|
281
|
+
profilePictureUrl: (jid: string, type?: import("./contacts.js").ProfilePictureType, timeoutMs?: number) => Promise<string | undefined>;
|
|
282
|
+
fetchUserInfo: (...jids: string[]) => Promise<Record<string, import("@oxidezap/whatsapp-rust-bridge").UserInfoResult>>;
|
|
283
|
+
groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
284
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
|
|
285
|
+
groupLeave: (id: string) => Promise<void>;
|
|
286
|
+
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
287
|
+
groupRequestParticipantsList: (jid: string) => Promise<Array<Record<string, string>>>;
|
|
288
|
+
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: import("./groups.js").GroupRequestAction) => Promise<import("../Compatibility/socket-results.js").MembershipRequestUpdateResult[]>;
|
|
289
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<import("../Compatibility/socket-results.js").ParticipantUpdateResult[]>;
|
|
290
|
+
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
291
|
+
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
292
|
+
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
293
|
+
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
294
|
+
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
295
|
+
groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
296
|
+
groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
297
|
+
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
298
|
+
groupSettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
299
|
+
groupMemberAddMode: (jid: string, mode: import("./groups.js").MemberAddMode) => Promise<void>;
|
|
300
|
+
groupJoinApprovalMode: (jid: string, mode: import("./groups.js").JoinApprovalMode) => Promise<void>;
|
|
301
|
+
groupFetchAllParticipating: () => Promise<Record<string, import("../index.js").GroupMetadata>>;
|
|
302
|
+
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
303
|
+
communityMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
304
|
+
communityCreate: (subject: string, body: string) => Promise<import("../index.js").GroupMetadata | null>;
|
|
305
|
+
communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<import("../index.js").GroupMetadata | null>;
|
|
306
|
+
communityLeave: (id: string) => Promise<void>;
|
|
307
|
+
communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
308
|
+
communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
309
|
+
communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
310
|
+
communityFetchLinkedGroups: (jid: string) => Promise<{
|
|
311
|
+
communityJid: string;
|
|
312
|
+
isCommunity: boolean;
|
|
313
|
+
linkedGroups: {
|
|
314
|
+
id: string | undefined;
|
|
315
|
+
subject: string;
|
|
316
|
+
creation: number | undefined;
|
|
317
|
+
owner: string | undefined;
|
|
318
|
+
size: number | undefined;
|
|
319
|
+
}[];
|
|
320
|
+
}>;
|
|
321
|
+
communityRequestParticipantsList: (jid: string) => Promise<Array<Record<string, string>>>;
|
|
322
|
+
communityRequestParticipantsUpdate: (jid: string, participants: string[], action: import("./groups.js").GroupRequestAction) => Promise<import("../Compatibility/socket-results.js").MembershipRequestUpdateResult[]>;
|
|
323
|
+
communityParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<import("../Compatibility/socket-results.js").ParticipantUpdateResult[]>;
|
|
324
|
+
communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
325
|
+
communityInviteCode: (jid: string) => Promise<string | undefined>;
|
|
326
|
+
communityRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
327
|
+
communityAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
328
|
+
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
|
|
329
|
+
communityAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
330
|
+
communityGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
331
|
+
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
332
|
+
communitySettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
333
|
+
communityMemberAddMode: (jid: string, mode: import("./groups.js").MemberAddMode) => Promise<void>;
|
|
334
|
+
communityJoinApprovalMode: (jid: string, mode: import("./groups.js").JoinApprovalMode) => Promise<void>;
|
|
335
|
+
communityFetchAllParticipating: () => Promise<Record<string, import("../index.js").GroupMetadata>>;
|
|
336
|
+
waitForSocketOpen: () => Promise<void>;
|
|
337
|
+
upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
338
|
+
onUnexpectedError: (err: Error, msg: string) => void;
|
|
339
|
+
resyncAppState: (collections?: readonly ('critical_block' | 'critical_unblock_low' | 'regular_high' | 'regular_low' | 'regular')[], isInitialSync?: boolean) => Promise<void>;
|
|
340
|
+
updateServerTimeOffset: (node: import("../index.js").BinaryNode) => never;
|
|
341
|
+
sendUnifiedSession: () => Promise<never>;
|
|
342
|
+
appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<never>;
|
|
343
|
+
messageRetryManager: null;
|
|
344
|
+
sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: Omit<import("../index.js").MessageGenerationOptions, 'waClient' | 'logger' | 'userJid' | 'mediaInNote'>) => Promise<import("../index.js").WAMessage>;
|
|
345
|
+
updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
|
|
346
|
+
relayMessage: (jid: string, message: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage, options: import("../index.js").MessageRelayOptions) => Promise<string>;
|
|
347
|
+
readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
|
|
348
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
349
|
+
sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
350
|
+
requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey, msgData?: Partial<import("../index.js").WAMessage>) => Promise<string | undefined>;
|
|
351
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
352
|
+
newsletterMetadata: (type: import("./newsletter.js").NewsletterKeyType, key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
|
|
353
|
+
newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<import("../index.js").NewsletterMetadata>;
|
|
354
|
+
newsletterUpdateName: (jid: string, name: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
355
|
+
newsletterUpdateDescription: (jid: string, description: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
356
|
+
newsletterUpdatePicture: (jid: string, content: import("../index.js").WAMediaUpload) => Promise<import("../index.js").NewsletterMetadata>;
|
|
357
|
+
newsletterRemovePicture: (jid: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
358
|
+
newsletterFollow: (jid: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
359
|
+
newsletterUnfollow: (jid: string) => Promise<void>;
|
|
360
|
+
newsletterSubscribe: (jid: string) => Promise<import("@oxidezap/whatsapp-rust-bridge").NewsletterMetadataResult>;
|
|
361
|
+
newsletterUnsubscribe: (jid: string) => Promise<void>;
|
|
362
|
+
newsletterMute: (jid: string) => Promise<void>;
|
|
363
|
+
newsletterUnmute: (jid: string) => Promise<void>;
|
|
364
|
+
newsletterSubscribers: (jid: string) => Promise<{
|
|
365
|
+
subscribers: number;
|
|
366
|
+
}>;
|
|
367
|
+
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
368
|
+
newsletterFetchMessages: (jid: string, count: number, since?: number, after?: number) => Promise<import("@oxidezap/whatsapp-rust-bridge").NewsletterMessageResult[]>;
|
|
369
|
+
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
370
|
+
duration: string;
|
|
371
|
+
}>;
|
|
372
|
+
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
373
|
+
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
374
|
+
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
375
|
+
newsletterDelete: (jid: string) => Promise<void>;
|
|
376
|
+
uploadPreKeys: (count?: number) => Promise<void>;
|
|
377
|
+
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
378
|
+
digestKeyBundle: () => Promise<void>;
|
|
379
|
+
rotateSignedPreKey: () => Promise<void>;
|
|
380
|
+
sendPresence: (status: import("../index.js").WAPresenceStatus) => Promise<void>;
|
|
381
|
+
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
382
|
+
sendChatState: (jid: string, state: import("../index.js").WAChatState) => Promise<void>;
|
|
383
|
+
fetchPrivacySettings: (force?: boolean) => Promise<any>;
|
|
384
|
+
updatePrivacySetting: (category: string, value: string) => Promise<void>;
|
|
385
|
+
updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
386
|
+
updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
387
|
+
updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
388
|
+
updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
389
|
+
updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
|
|
390
|
+
updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
391
|
+
updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
|
|
392
|
+
updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
393
|
+
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<void>;
|
|
394
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<Omit<import("../index.js").MediaConnInfo, 'hosts'> & {
|
|
395
|
+
hosts: {
|
|
396
|
+
hostname: string;
|
|
397
|
+
}[];
|
|
398
|
+
}>;
|
|
399
|
+
getMediaHost: () => string;
|
|
400
|
+
getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
|
|
401
|
+
fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo & {
|
|
402
|
+
remaining_quota?: number;
|
|
403
|
+
}>;
|
|
404
|
+
cleanDirtyBits: (type: import("./server-queries.js").DirtyBitType, fromTimestamp?: number | string) => Promise<void>;
|
|
405
|
+
sendPeerDataOperationMessage: (_pdoMessage: unknown) => Promise<never>;
|
|
406
|
+
createCallLink: (_type: 'audio' | 'video', _event?: unknown, _timeoutMs?: number) => Promise<never>;
|
|
407
|
+
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
408
|
+
setPushName: (name: string) => Promise<void>;
|
|
409
|
+
updateProfileName: (name: string) => Promise<void>;
|
|
410
|
+
getPushName: () => Promise<string>;
|
|
411
|
+
getJid: () => Promise<string | undefined>;
|
|
412
|
+
getLid: () => Promise<string | undefined>;
|
|
413
|
+
updateProfilePicture: (jid: string, content: import("../index.js").WAMediaUpload, dimensions?: {
|
|
414
|
+
width: number;
|
|
415
|
+
height: number;
|
|
416
|
+
}) => Promise<void>;
|
|
417
|
+
removeProfilePicture: (jid: string) => Promise<void>;
|
|
418
|
+
updateProfileStatus: (status: string) => Promise<void>;
|
|
419
|
+
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
420
|
+
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
421
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
422
|
+
ev: import("../index.js").BaileysEventEmitter & {
|
|
423
|
+
process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
424
|
+
buffer(): void;
|
|
425
|
+
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
426
|
+
flush(): boolean;
|
|
427
|
+
isBuffering(): boolean;
|
|
428
|
+
destroy(): void;
|
|
429
|
+
};
|
|
430
|
+
logger: import("../Utils/logger.js").ILogger | import("../Utils/logger.js").Logger;
|
|
431
|
+
ws: import("../Compatibility/websocket-client.js").WebSocketClient;
|
|
432
|
+
type: 'md';
|
|
433
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
434
|
+
user: import("../index.js").Contact | undefined;
|
|
435
|
+
waClient: import("@oxidezap/whatsapp-rust-bridge").WasmWhatsAppClient | undefined;
|
|
436
|
+
isConnected: boolean;
|
|
437
|
+
isLoggedIn: boolean;
|
|
438
|
+
authState: {
|
|
439
|
+
creds: import("../index.js").AuthenticationCreds;
|
|
440
|
+
keys: import("../index.js").SignalKeyStoreWithTransaction;
|
|
441
|
+
};
|
|
442
|
+
devicesMutex: {
|
|
443
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
444
|
+
};
|
|
445
|
+
messageMutex: {
|
|
446
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
447
|
+
};
|
|
448
|
+
receiptMutex: {
|
|
449
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
450
|
+
};
|
|
451
|
+
appStatePatchMutex: {
|
|
452
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
453
|
+
};
|
|
454
|
+
notificationMutex: {
|
|
455
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
456
|
+
};
|
|
457
|
+
generateMessageTag: () => string;
|
|
458
|
+
sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
|
|
459
|
+
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
460
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<any>;
|
|
461
|
+
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
462
|
+
query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<import("../index.js").BinaryNode>;
|
|
463
|
+
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
464
|
+
createParticipantNodes: (jids: string[], message: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage, extraAttrs?: import("../index.js").BinaryNode['attrs'], dsmMessage?: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage) => Promise<{
|
|
465
|
+
nodes: import("../index.js").BinaryNode[];
|
|
466
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
467
|
+
}>;
|
|
468
|
+
signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
|
|
469
|
+
end: (error: Error | undefined) => Promise<void>;
|
|
470
|
+
logout: (msg?: string) => Promise<void>;
|
|
471
|
+
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
472
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
473
|
+
setAutoReconnect: (enabled: boolean) => void;
|
|
474
|
+
sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
475
|
+
waUploadToServer: (data: Uint8Array | Buffer, opts: {
|
|
476
|
+
mediaType: import("../index.js").MediaType;
|
|
477
|
+
}) => Promise<import("@oxidezap/whatsapp-rust-bridge").UploadMediaResult>;
|
|
478
|
+
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
479
|
+
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
480
|
+
fetchReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
481
|
+
fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
482
|
+
getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
|
|
483
|
+
fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
484
|
+
sendStatusMessage: (message: Record<string, unknown>, recipients: string[]) => Promise<string>;
|
|
485
|
+
downloadMedia: <T extends import("../index.js").MediaDownloadType>(message: import("../index.js").WAMessage, type: T, options?: import("../index.js").MediaDownloadOptions) => Promise<T extends "buffer" ? Buffer<ArrayBufferLike> : import("node:stream").Readable>;
|
|
486
|
+
}>;
|
|
487
|
+
declare const makeWASocket: (config: import("../index.js").UserFacingSocketConfig | import("../index.js").HostSocketConfig) => ReturnType<(runtime: BaileysRuntime, config: import("../index.js").UserFacingSocketConfig | import("../index.js").HostSocketConfig, claimEngineInitialization: () => boolean, resetEngineInitialization: () => void, runtimeLogger: ReturnType<typeof import("../Utils/logger.js").createRuntimeLogger>) => {
|
|
488
|
+
sendMessageAck: (node: import("../index.js").BinaryNode, errorCode?: number) => Promise<void>;
|
|
489
|
+
sendRetryRequest: (node: import("../index.js").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
490
|
+
updateBlockStatus: (jid: string, action: import("./blocking.js").BlockAction) => Promise<void>;
|
|
491
|
+
fetchBlocklist: () => Promise<Array<string | undefined>>;
|
|
492
|
+
getCatalog: ({ jid, limit, cursor }: import("../index.js").GetCatalogOptions) => Promise<import("../index.js").CatalogPage>;
|
|
493
|
+
getCollections: (jid?: string, limit?: number) => Promise<import("../index.js").CollectionsPage>;
|
|
494
|
+
getOrderDetails: (orderId: string, tokenBase64: string, sellerJid?: string) => Promise<import("@oxidezap/whatsapp-rust-bridge").OrderResult>;
|
|
495
|
+
updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<void>;
|
|
496
|
+
updateCoverPhoto: (photo: import("../index.js").WAMediaUpload) => Promise<never>;
|
|
497
|
+
removeCoverPhoto: (id: string) => Promise<void>;
|
|
498
|
+
productCreate: (create: import("../index.js").ProductCreate) => Promise<never>;
|
|
499
|
+
productUpdate: (productId: string, update: import("../index.js").ProductUpdate) => Promise<never>;
|
|
500
|
+
productDelete: (productIds: string[]) => Promise<never>;
|
|
501
|
+
pinChat: (jid: string, pin: boolean) => Promise<void>;
|
|
502
|
+
muteChat: (jid: string, muteUntil?: number | null) => Promise<void>;
|
|
503
|
+
archiveChat: (jid: string, archive: boolean) => Promise<void>;
|
|
504
|
+
starMessage: (jid: string, messageId: string, star: boolean) => Promise<void>;
|
|
505
|
+
chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
|
|
506
|
+
addOrEditContact: (jid: string, contact: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
507
|
+
removeContact: (jid: string) => Promise<void>;
|
|
508
|
+
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
509
|
+
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
510
|
+
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
511
|
+
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
512
|
+
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
513
|
+
star: (jid: string, messages: {
|
|
514
|
+
id: string;
|
|
515
|
+
fromMe?: boolean;
|
|
516
|
+
}[], star: boolean) => Promise<void>;
|
|
517
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
518
|
+
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
519
|
+
onWhatsApp: (...phoneNumber: string[]) => Promise<import("./contacts.js").OnWhatsAppResult[] | undefined>;
|
|
520
|
+
profilePictureUrl: (jid: string, type?: import("./contacts.js").ProfilePictureType, timeoutMs?: number) => Promise<string | undefined>;
|
|
521
|
+
fetchUserInfo: (...jids: string[]) => Promise<Record<string, import("@oxidezap/whatsapp-rust-bridge").UserInfoResult>>;
|
|
522
|
+
groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
523
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
|
|
524
|
+
groupLeave: (id: string) => Promise<void>;
|
|
525
|
+
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
526
|
+
groupRequestParticipantsList: (jid: string) => Promise<Array<Record<string, string>>>;
|
|
527
|
+
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: import("./groups.js").GroupRequestAction) => Promise<import("../Compatibility/socket-results.js").MembershipRequestUpdateResult[]>;
|
|
528
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<import("../Compatibility/socket-results.js").ParticipantUpdateResult[]>;
|
|
529
|
+
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
530
|
+
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
531
|
+
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
532
|
+
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
533
|
+
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
534
|
+
groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
535
|
+
groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
536
|
+
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
537
|
+
groupSettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
538
|
+
groupMemberAddMode: (jid: string, mode: import("./groups.js").MemberAddMode) => Promise<void>;
|
|
539
|
+
groupJoinApprovalMode: (jid: string, mode: import("./groups.js").JoinApprovalMode) => Promise<void>;
|
|
540
|
+
groupFetchAllParticipating: () => Promise<Record<string, import("../index.js").GroupMetadata>>;
|
|
541
|
+
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
542
|
+
communityMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
543
|
+
communityCreate: (subject: string, body: string) => Promise<import("../index.js").GroupMetadata | null>;
|
|
544
|
+
communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<import("../index.js").GroupMetadata | null>;
|
|
545
|
+
communityLeave: (id: string) => Promise<void>;
|
|
546
|
+
communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
547
|
+
communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
548
|
+
communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
549
|
+
communityFetchLinkedGroups: (jid: string) => Promise<{
|
|
550
|
+
communityJid: string;
|
|
551
|
+
isCommunity: boolean;
|
|
552
|
+
linkedGroups: {
|
|
553
|
+
id: string | undefined;
|
|
554
|
+
subject: string;
|
|
555
|
+
creation: number | undefined;
|
|
556
|
+
owner: string | undefined;
|
|
557
|
+
size: number | undefined;
|
|
558
|
+
}[];
|
|
559
|
+
}>;
|
|
560
|
+
communityRequestParticipantsList: (jid: string) => Promise<Array<Record<string, string>>>;
|
|
561
|
+
communityRequestParticipantsUpdate: (jid: string, participants: string[], action: import("./groups.js").GroupRequestAction) => Promise<import("../Compatibility/socket-results.js").MembershipRequestUpdateResult[]>;
|
|
562
|
+
communityParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<import("../Compatibility/socket-results.js").ParticipantUpdateResult[]>;
|
|
563
|
+
communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
564
|
+
communityInviteCode: (jid: string) => Promise<string | undefined>;
|
|
565
|
+
communityRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
566
|
+
communityAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
567
|
+
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
|
|
568
|
+
communityAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
569
|
+
communityGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
570
|
+
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
571
|
+
communitySettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
572
|
+
communityMemberAddMode: (jid: string, mode: import("./groups.js").MemberAddMode) => Promise<void>;
|
|
573
|
+
communityJoinApprovalMode: (jid: string, mode: import("./groups.js").JoinApprovalMode) => Promise<void>;
|
|
574
|
+
communityFetchAllParticipating: () => Promise<Record<string, import("../index.js").GroupMetadata>>;
|
|
575
|
+
waitForSocketOpen: () => Promise<void>;
|
|
576
|
+
upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
577
|
+
onUnexpectedError: (err: Error, msg: string) => void;
|
|
578
|
+
resyncAppState: (collections?: readonly ('critical_block' | 'critical_unblock_low' | 'regular_high' | 'regular_low' | 'regular')[], isInitialSync?: boolean) => Promise<void>;
|
|
579
|
+
updateServerTimeOffset: (node: import("../index.js").BinaryNode) => never;
|
|
580
|
+
sendUnifiedSession: () => Promise<never>;
|
|
581
|
+
appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<never>;
|
|
582
|
+
messageRetryManager: null;
|
|
583
|
+
sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: Omit<import("../index.js").MessageGenerationOptions, 'waClient' | 'logger' | 'userJid' | 'mediaInNote'>) => Promise<import("../index.js").WAMessage>;
|
|
584
|
+
updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
|
|
585
|
+
relayMessage: (jid: string, message: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage, options: import("../index.js").MessageRelayOptions) => Promise<string>;
|
|
586
|
+
readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
|
|
587
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
588
|
+
sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
589
|
+
requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey, msgData?: Partial<import("../index.js").WAMessage>) => Promise<string | undefined>;
|
|
590
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
591
|
+
newsletterMetadata: (type: import("./newsletter.js").NewsletterKeyType, key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
|
|
592
|
+
newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<import("../index.js").NewsletterMetadata>;
|
|
593
|
+
newsletterUpdateName: (jid: string, name: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
594
|
+
newsletterUpdateDescription: (jid: string, description: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
595
|
+
newsletterUpdatePicture: (jid: string, content: import("../index.js").WAMediaUpload) => Promise<import("../index.js").NewsletterMetadata>;
|
|
596
|
+
newsletterRemovePicture: (jid: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
597
|
+
newsletterFollow: (jid: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
598
|
+
newsletterUnfollow: (jid: string) => Promise<void>;
|
|
599
|
+
newsletterSubscribe: (jid: string) => Promise<import("@oxidezap/whatsapp-rust-bridge").NewsletterMetadataResult>;
|
|
600
|
+
newsletterUnsubscribe: (jid: string) => Promise<void>;
|
|
601
|
+
newsletterMute: (jid: string) => Promise<void>;
|
|
602
|
+
newsletterUnmute: (jid: string) => Promise<void>;
|
|
603
|
+
newsletterSubscribers: (jid: string) => Promise<{
|
|
604
|
+
subscribers: number;
|
|
605
|
+
}>;
|
|
606
|
+
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
607
|
+
newsletterFetchMessages: (jid: string, count: number, since?: number, after?: number) => Promise<import("@oxidezap/whatsapp-rust-bridge").NewsletterMessageResult[]>;
|
|
608
|
+
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
609
|
+
duration: string;
|
|
610
|
+
}>;
|
|
611
|
+
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
612
|
+
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
613
|
+
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
614
|
+
newsletterDelete: (jid: string) => Promise<void>;
|
|
615
|
+
uploadPreKeys: (count?: number) => Promise<void>;
|
|
616
|
+
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
617
|
+
digestKeyBundle: () => Promise<void>;
|
|
618
|
+
rotateSignedPreKey: () => Promise<void>;
|
|
619
|
+
sendPresence: (status: import("../index.js").WAPresenceStatus) => Promise<void>;
|
|
620
|
+
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
621
|
+
sendChatState: (jid: string, state: import("../index.js").WAChatState) => Promise<void>;
|
|
622
|
+
fetchPrivacySettings: (force?: boolean) => Promise<any>;
|
|
623
|
+
updatePrivacySetting: (category: string, value: string) => Promise<void>;
|
|
624
|
+
updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
625
|
+
updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
626
|
+
updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
627
|
+
updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
628
|
+
updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
|
|
629
|
+
updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
630
|
+
updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
|
|
631
|
+
updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
632
|
+
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<void>;
|
|
633
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<Omit<import("../index.js").MediaConnInfo, 'hosts'> & {
|
|
634
|
+
hosts: {
|
|
635
|
+
hostname: string;
|
|
636
|
+
}[];
|
|
637
|
+
}>;
|
|
638
|
+
getMediaHost: () => string;
|
|
639
|
+
getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
|
|
640
|
+
fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo & {
|
|
641
|
+
remaining_quota?: number;
|
|
642
|
+
}>;
|
|
643
|
+
cleanDirtyBits: (type: import("./server-queries.js").DirtyBitType, fromTimestamp?: number | string) => Promise<void>;
|
|
644
|
+
sendPeerDataOperationMessage: (_pdoMessage: unknown) => Promise<never>;
|
|
645
|
+
createCallLink: (_type: 'audio' | 'video', _event?: unknown, _timeoutMs?: number) => Promise<never>;
|
|
646
|
+
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
647
|
+
setPushName: (name: string) => Promise<void>;
|
|
648
|
+
updateProfileName: (name: string) => Promise<void>;
|
|
649
|
+
getPushName: () => Promise<string>;
|
|
650
|
+
getJid: () => Promise<string | undefined>;
|
|
651
|
+
getLid: () => Promise<string | undefined>;
|
|
652
|
+
updateProfilePicture: (jid: string, content: import("../index.js").WAMediaUpload, dimensions?: {
|
|
653
|
+
width: number;
|
|
654
|
+
height: number;
|
|
655
|
+
}) => Promise<void>;
|
|
656
|
+
removeProfilePicture: (jid: string) => Promise<void>;
|
|
657
|
+
updateProfileStatus: (status: string) => Promise<void>;
|
|
658
|
+
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
659
|
+
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
660
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
661
|
+
ev: import("../index.js").BaileysEventEmitter & {
|
|
662
|
+
process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
663
|
+
buffer(): void;
|
|
664
|
+
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
665
|
+
flush(): boolean;
|
|
666
|
+
isBuffering(): boolean;
|
|
667
|
+
destroy(): void;
|
|
668
|
+
};
|
|
669
|
+
logger: import("../Utils/logger.js").ILogger | import("../Utils/logger.js").Logger;
|
|
670
|
+
ws: import("../Compatibility/websocket-client.js").WebSocketClient;
|
|
671
|
+
type: 'md';
|
|
672
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
673
|
+
user: import("../index.js").Contact | undefined;
|
|
674
|
+
waClient: import("@oxidezap/whatsapp-rust-bridge").WasmWhatsAppClient | undefined;
|
|
675
|
+
isConnected: boolean;
|
|
676
|
+
isLoggedIn: boolean;
|
|
677
|
+
authState: {
|
|
678
|
+
creds: import("../index.js").AuthenticationCreds;
|
|
679
|
+
keys: import("../index.js").SignalKeyStoreWithTransaction;
|
|
680
|
+
};
|
|
681
|
+
devicesMutex: {
|
|
682
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
683
|
+
};
|
|
684
|
+
messageMutex: {
|
|
685
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
686
|
+
};
|
|
687
|
+
receiptMutex: {
|
|
688
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
689
|
+
};
|
|
690
|
+
appStatePatchMutex: {
|
|
691
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
692
|
+
};
|
|
693
|
+
notificationMutex: {
|
|
694
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
695
|
+
};
|
|
696
|
+
generateMessageTag: () => string;
|
|
697
|
+
sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
|
|
698
|
+
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
699
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<any>;
|
|
700
|
+
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
701
|
+
query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<import("../index.js").BinaryNode>;
|
|
702
|
+
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
703
|
+
createParticipantNodes: (jids: string[], message: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage, extraAttrs?: import("../index.js").BinaryNode['attrs'], dsmMessage?: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.IMessage) => Promise<{
|
|
704
|
+
nodes: import("../index.js").BinaryNode[];
|
|
705
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
706
|
+
}>;
|
|
707
|
+
signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
|
|
708
|
+
end: (error: Error | undefined) => Promise<void>;
|
|
709
|
+
logout: (msg?: string) => Promise<void>;
|
|
710
|
+
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
711
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
712
|
+
setAutoReconnect: (enabled: boolean) => void;
|
|
713
|
+
sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
714
|
+
waUploadToServer: (data: Uint8Array | Buffer, opts: {
|
|
715
|
+
mediaType: import("../index.js").MediaType;
|
|
716
|
+
}) => Promise<import("@oxidezap/whatsapp-rust-bridge").UploadMediaResult>;
|
|
717
|
+
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
718
|
+
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
719
|
+
fetchReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
720
|
+
fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
721
|
+
getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
|
|
722
|
+
fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
723
|
+
sendStatusMessage: (message: Record<string, unknown>, recipients: string[]) => Promise<string>;
|
|
724
|
+
downloadMedia: <T extends import("../index.js").MediaDownloadType>(message: import("../index.js").WAMessage, type: T, options?: import("../index.js").MediaDownloadOptions) => Promise<T extends "buffer" ? Buffer<ArrayBufferLike> : import("node:stream").Readable>;
|
|
725
|
+
}>;
|
|
309
726
|
export default makeWASocket;
|
|
727
|
+
export { createWASocketFactory };
|
|
310
728
|
//# sourceMappingURL=index.d.ts.map
|