@oxidezap/baileyrs 0.3.10 → 0.3.12
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/lib/Bridge/schema.js +42 -16
- package/lib/Bridge/types.d.ts +13 -2
- package/lib/Compatibility/auth-state.js +2 -11
- package/lib/Compatibility/host-auth-state.js +2 -0
- package/lib/Compatibility/internal/auth-state.js +6 -0
- package/lib/Compatibility/internal/host-auth-state.js +3 -0
- package/lib/Compatibility/legacy-store/adapter.js +137 -3
- package/lib/Compatibility/legacy-store/codecs/basic.js +5 -8
- package/lib/Compatibility/legacy-store/multi-file.d.ts +12 -1
- package/lib/Compatibility/legacy-store/multi-file.js +37 -25
- package/lib/Compatibility/legacy-store/record-files.d.ts +3 -0
- package/lib/Compatibility/legacy-store/record-files.js +5 -0
- package/lib/Compatibility/legacy-store/rollback.d.ts +8 -0
- package/lib/Compatibility/legacy-store/rollback.js +16 -0
- package/lib/Compatibility/legacy-store/snapshot.d.ts +7 -0
- package/lib/Compatibility/legacy-store/snapshot.js +53 -0
- package/lib/Compatibility/legacy-store/types.d.ts +4 -1
- package/lib/Socket/chat-actions.js +1 -1
- package/lib/Socket/events-core.js +9 -1
- package/lib/Socket/index.d.ts +3 -717
- package/lib/Types/Auth.d.ts +5 -0
- package/lib/Types/Events.d.ts +6 -1
- package/lib/Utils/atomic-store.d.ts +20 -0
- package/lib/Utils/atomic-store.js +116 -0
- package/lib/Utils/durable-directory.d.ts +3 -0
- package/lib/Utils/durable-directory.js +35 -0
- package/lib/Utils/flush-deadline.d.ts +19 -0
- package/lib/Utils/flush-deadline.js +97 -0
- package/lib/Utils/index.d.ts +1 -0
- package/lib/Utils/index.js +1 -0
- package/lib/Utils/native-auth-rollback.d.ts +14 -0
- package/lib/Utils/native-auth-rollback.js +17 -0
- package/lib/Utils/process-file-lock.d.ts +6 -0
- package/lib/Utils/process-file-lock.js +38 -0
- package/lib/Utils/snapshot-rollback-proof.d.ts +9 -0
- package/lib/Utils/snapshot-rollback-proof.js +43 -0
- package/lib/Utils/snapshot-rollback.d.ts +5 -0
- package/lib/Utils/snapshot-rollback.js +69 -0
- package/lib/Utils/snapshot-transactions.d.ts +10 -0
- package/lib/Utils/snapshot-transactions.js +108 -0
- package/lib/Utils/store-migration.d.ts +10 -0
- package/lib/Utils/store-migration.js +16 -0
- package/lib/Utils/transactional-file-store.d.ts +7 -0
- package/lib/Utils/transactional-file-store.js +157 -0
- package/lib/Utils/use-bridge-store.d.ts +3 -49
- package/lib/Utils/use-bridge-store.js +121 -109
- package/lib/Utils/use-memory-store.js +17 -4
- package/lib/Utils/use-multi-file-auth-state.d.ts +2 -1
- package/lib/Utils/use-multi-file-auth-state.js +2 -2
- package/lib/Utils/wrap-legacy-store.d.ts +1 -0
- package/lib/Utils/wrap-legacy-store.js +1 -0
- package/lib/host-types.d.ts +1 -15
- package/lib/node-surface.d.ts +2 -1
- package/lib/node-surface.js +2 -1
- package/package.json +12 -10
package/lib/Socket/index.d.ts
CHANGED
|
@@ -5,724 +5,10 @@ import type { BaileysRuntime } from '../Runtime/types.js';
|
|
|
5
5
|
* the Node runtime (bare bridge entrypoint, node:crypto randomness,
|
|
6
6
|
* portable emitter, OpenSSL native crypto, stdout logger sink).
|
|
7
7
|
*/
|
|
8
|
-
export declare const makeNodeWASocket:
|
|
9
|
-
sendMessageAck: (node: import("../index.js").BinaryNode, errorCode?: number) => Promise<void>;
|
|
10
|
-
sendRetryRequest: (node: import("../index.js").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
11
|
-
updateBlockStatus: (jid: string, action: import("./blocking.js").BlockAction) => Promise<void>;
|
|
12
|
-
fetchBlocklist: () => Promise<Array<string | undefined>>;
|
|
13
|
-
getCatalog: ({ jid, limit, cursor }: import("../index.js").GetCatalogOptions) => Promise<import("../index.js").CatalogPage>;
|
|
14
|
-
getCollections: (jid?: string, limit?: number) => Promise<import("../index.js").CollectionsPage>;
|
|
15
|
-
getOrderDetails: (orderId: string, tokenBase64: string, sellerJid?: string) => Promise<import("@oxidezap/whatsapp-rust-bridge").OrderResult>;
|
|
16
|
-
updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<void>;
|
|
17
|
-
updateCoverPhoto: (photo: import("../index.js").WAMediaUpload) => Promise<never>;
|
|
18
|
-
removeCoverPhoto: (id: string) => Promise<void>;
|
|
19
|
-
productCreate: (create: import("../index.js").ProductCreate) => Promise<never>;
|
|
20
|
-
productUpdate: (productId: string, update: import("../index.js").ProductUpdate) => Promise<never>;
|
|
21
|
-
productDelete: (productIds: string[]) => Promise<never>;
|
|
22
|
-
pinChat: (jid: string, pin: boolean) => Promise<void>;
|
|
23
|
-
muteChat: (jid: string, muteUntil?: number | null) => Promise<void>;
|
|
24
|
-
archiveChat: (jid: string, archive: boolean) => Promise<void>;
|
|
25
|
-
starMessage: (jid: string, messageId: string, star: boolean) => Promise<void>;
|
|
26
|
-
chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
|
|
27
|
-
addOrEditContact: (jid: string, contact: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
28
|
-
removeContact: (jid: string) => Promise<void>;
|
|
29
|
-
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
30
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
31
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
32
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
33
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
34
|
-
star: (jid: string, messages: {
|
|
35
|
-
id: string;
|
|
36
|
-
fromMe?: boolean;
|
|
37
|
-
}[], star: boolean) => Promise<void>;
|
|
38
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
39
|
-
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
40
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<import("./contacts.js").OnWhatsAppResult[] | undefined>;
|
|
41
|
-
profilePictureUrl: (jid: string, type?: import("./contacts.js").ProfilePictureType, timeoutMs?: number) => Promise<string | undefined>;
|
|
42
|
-
fetchUserInfo: (...jids: string[]) => Promise<Record<string, import("@oxidezap/whatsapp-rust-bridge").UserInfoResult>>;
|
|
43
|
-
groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
44
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
|
|
45
|
-
groupLeave: (id: string) => Promise<void>;
|
|
46
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
47
|
-
groupRequestParticipantsList: (jid: string) => Promise<Array<Record<string, string>>>;
|
|
48
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: import("./groups.js").GroupRequestAction) => Promise<import("../Compatibility/socket-results.js").MembershipRequestUpdateResult[]>;
|
|
49
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<import("../Compatibility/socket-results.js").ParticipantUpdateResult[]>;
|
|
50
|
-
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
51
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
52
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
53
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
54
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
55
|
-
groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
56
|
-
groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
57
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
58
|
-
groupSettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
59
|
-
groupMemberAddMode: (jid: string, mode: import("./groups.js").MemberAddMode) => Promise<void>;
|
|
60
|
-
groupJoinApprovalMode: (jid: string, mode: import("./groups.js").JoinApprovalMode) => Promise<void>;
|
|
61
|
-
groupFetchAllParticipating: () => Promise<Record<string, import("../index.js").GroupMetadata>>;
|
|
62
|
-
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
63
|
-
communityMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
64
|
-
communityCreate: (subject: string, body: string) => Promise<import("../index.js").GroupMetadata | null>;
|
|
65
|
-
communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<import("../index.js").GroupMetadata | null>;
|
|
66
|
-
communityLeave: (id: string) => Promise<void>;
|
|
67
|
-
communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
68
|
-
communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
69
|
-
communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
|
|
70
|
-
communityFetchLinkedGroups: (jid: string) => Promise<{
|
|
71
|
-
communityJid: string;
|
|
72
|
-
isCommunity: boolean;
|
|
73
|
-
linkedGroups: {
|
|
74
|
-
id: string | undefined;
|
|
75
|
-
subject: string;
|
|
76
|
-
creation: number | undefined;
|
|
77
|
-
owner: string | undefined;
|
|
78
|
-
size: number | undefined;
|
|
79
|
-
}[];
|
|
80
|
-
}>;
|
|
81
|
-
communityRequestParticipantsList: (jid: string) => Promise<Array<Record<string, string>>>;
|
|
82
|
-
communityRequestParticipantsUpdate: (jid: string, participants: string[], action: import("./groups.js").GroupRequestAction) => Promise<import("../Compatibility/socket-results.js").MembershipRequestUpdateResult[]>;
|
|
83
|
-
communityParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<import("../Compatibility/socket-results.js").ParticipantUpdateResult[]>;
|
|
84
|
-
communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
85
|
-
communityInviteCode: (jid: string) => Promise<string | undefined>;
|
|
86
|
-
communityRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
87
|
-
communityAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
88
|
-
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
|
|
89
|
-
communityAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("@oxidezap/whatsapp-rust-bridge/proto-types").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
90
|
-
communityGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
91
|
-
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
92
|
-
communitySettingUpdate: (jid: string, setting: import("./groups.js").GroupSetting) => Promise<void>;
|
|
93
|
-
communityMemberAddMode: (jid: string, mode: import("./groups.js").MemberAddMode) => Promise<void>;
|
|
94
|
-
communityJoinApprovalMode: (jid: string, mode: import("./groups.js").JoinApprovalMode) => Promise<void>;
|
|
95
|
-
communityFetchAllParticipating: () => Promise<Record<string, import("../index.js").GroupMetadata>>;
|
|
96
|
-
waitForSocketOpen: () => Promise<void>;
|
|
97
|
-
upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
98
|
-
onUnexpectedError: (err: Error, msg: string) => void;
|
|
99
|
-
resyncAppState: (collections?: readonly ('critical_block' | 'critical_unblock_low' | 'regular_high' | 'regular_low' | 'regular')[], isInitialSync?: boolean) => Promise<void>;
|
|
100
|
-
updateServerTimeOffset: (node: import("../index.js").BinaryNode) => never;
|
|
101
|
-
sendUnifiedSession: () => Promise<never>;
|
|
102
|
-
appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<never>;
|
|
103
|
-
messageRetryManager: null;
|
|
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>;
|
|
108
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
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>;
|
|
111
|
-
newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
112
|
-
newsletterMetadata: (type: import("./newsletter.js").NewsletterKeyType, key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
|
|
113
|
-
newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<import("../index.js").NewsletterMetadata>;
|
|
114
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
115
|
-
newsletterUpdateDescription: (jid: string, description: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
116
|
-
newsletterUpdatePicture: (jid: string, content: import("../index.js").WAMediaUpload) => Promise<import("../index.js").NewsletterMetadata>;
|
|
117
|
-
newsletterRemovePicture: (jid: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
118
|
-
newsletterFollow: (jid: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
119
|
-
newsletterUnfollow: (jid: string) => Promise<void>;
|
|
120
|
-
newsletterSubscribe: (jid: string) => Promise<import("@oxidezap/whatsapp-rust-bridge").NewsletterMetadataResult>;
|
|
121
|
-
newsletterUnsubscribe: (jid: string) => Promise<void>;
|
|
122
|
-
newsletterMute: (jid: string) => Promise<void>;
|
|
123
|
-
newsletterUnmute: (jid: string) => Promise<void>;
|
|
124
|
-
newsletterSubscribers: (jid: string) => Promise<{
|
|
125
|
-
subscribers: number;
|
|
126
|
-
}>;
|
|
127
|
-
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
128
|
-
newsletterFetchMessages: (jid: string, count: number, since?: number, after?: number) => Promise<import("@oxidezap/whatsapp-rust-bridge").NewsletterMessageResult[]>;
|
|
129
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
130
|
-
duration: string;
|
|
131
|
-
}>;
|
|
132
|
-
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
133
|
-
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
134
|
-
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
135
|
-
newsletterDelete: (jid: string) => Promise<void>;
|
|
136
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
|
137
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
138
|
-
digestKeyBundle: () => Promise<void>;
|
|
139
|
-
rotateSignedPreKey: () => Promise<void>;
|
|
140
|
-
sendPresence: (status: import("../index.js").WAPresenceStatus) => Promise<void>;
|
|
141
|
-
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
142
|
-
sendChatState: (jid: string, state: import("../index.js").WAChatState) => Promise<void>;
|
|
143
|
-
fetchPrivacySettings: (force?: boolean) => Promise<any>;
|
|
144
|
-
updatePrivacySetting: (category: string, value: string) => Promise<void>;
|
|
145
|
-
updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
146
|
-
updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
147
|
-
updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
148
|
-
updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
149
|
-
updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
|
|
150
|
-
updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
151
|
-
updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
|
|
152
|
-
updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
153
|
-
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<void>;
|
|
154
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<Omit<import("../index.js").MediaConnInfo, 'hosts'> & {
|
|
155
|
-
hosts: {
|
|
156
|
-
hostname: string;
|
|
157
|
-
}[];
|
|
158
|
-
}>;
|
|
159
|
-
getMediaHost: () => string;
|
|
160
|
-
getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
|
|
161
|
-
fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo & {
|
|
162
|
-
remaining_quota?: number;
|
|
163
|
-
}>;
|
|
164
|
-
cleanDirtyBits: (type: import("./server-queries.js").DirtyBitType, fromTimestamp?: number | string) => Promise<void>;
|
|
165
|
-
sendPeerDataOperationMessage: (_pdoMessage: unknown) => Promise<never>;
|
|
166
|
-
createCallLink: (_type: 'audio' | 'video', _event?: unknown, _timeoutMs?: number) => Promise<never>;
|
|
167
|
-
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
168
|
-
setPushName: (name: string) => Promise<void>;
|
|
169
|
-
updateProfileName: (name: string) => Promise<void>;
|
|
170
|
-
getPushName: () => Promise<string>;
|
|
171
|
-
getJid: () => Promise<string | undefined>;
|
|
172
|
-
getLid: () => Promise<string | undefined>;
|
|
173
|
-
updateProfilePicture: (jid: string, content: import("../index.js").WAMediaUpload, dimensions?: {
|
|
174
|
-
width: number;
|
|
175
|
-
height: number;
|
|
176
|
-
}) => Promise<void>;
|
|
177
|
-
removeProfilePicture: (jid: string) => Promise<void>;
|
|
178
|
-
updateProfileStatus: (status: string) => Promise<void>;
|
|
179
|
-
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
180
|
-
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
181
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
182
|
-
ev: import("../index.js").BaileysEventEmitter & {
|
|
183
|
-
process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
184
|
-
buffer(): void;
|
|
185
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
186
|
-
flush(): boolean;
|
|
187
|
-
isBuffering(): boolean;
|
|
188
|
-
destroy(): void;
|
|
189
|
-
};
|
|
190
|
-
logger: import("../Utils/logger.js").ILogger | import("../Utils/logger.js").Logger;
|
|
191
|
-
ws: import("../Compatibility/websocket-client.js").WebSocketClient;
|
|
192
|
-
type: 'md';
|
|
193
|
-
[Symbol.asyncDispose](): Promise<void>;
|
|
194
|
-
user: import("../index.js").Contact | undefined;
|
|
195
|
-
waClient: import("@oxidezap/whatsapp-rust-bridge").WasmWhatsAppClient | undefined;
|
|
196
|
-
isConnected: boolean;
|
|
197
|
-
isLoggedIn: boolean;
|
|
198
|
-
authState: {
|
|
199
|
-
creds: import("../index.js").AuthenticationCreds;
|
|
200
|
-
keys: import("../index.js").SignalKeyStoreWithTransaction;
|
|
201
|
-
};
|
|
202
|
-
devicesMutex: {
|
|
203
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
204
|
-
};
|
|
205
|
-
messageMutex: {
|
|
206
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
207
|
-
};
|
|
208
|
-
receiptMutex: {
|
|
209
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
210
|
-
};
|
|
211
|
-
appStatePatchMutex: {
|
|
212
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
213
|
-
};
|
|
214
|
-
notificationMutex: {
|
|
215
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
216
|
-
};
|
|
217
|
-
generateMessageTag: () => string;
|
|
218
|
-
sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
|
|
219
|
-
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
220
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<any>;
|
|
221
|
-
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
222
|
-
query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<import("../index.js").BinaryNode>;
|
|
223
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
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[];
|
|
226
|
-
shouldIncludeDeviceIdentity: boolean;
|
|
227
|
-
}>;
|
|
228
|
-
signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
|
|
229
|
-
end: (error: Error | undefined) => Promise<void>;
|
|
230
|
-
logout: (msg?: string) => Promise<void>;
|
|
231
|
-
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
232
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
233
|
-
setAutoReconnect: (enabled: boolean) => void;
|
|
234
|
-
sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
235
|
-
waUploadToServer: (data: Uint8Array | Buffer, opts: {
|
|
236
|
-
mediaType: import("../index.js").MediaType;
|
|
237
|
-
}) => Promise<import("@oxidezap/whatsapp-rust-bridge").UploadMediaResult>;
|
|
238
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
239
|
-
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
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>;
|
|
244
|
-
sendStatusMessage: (message: Record<string, unknown>, recipients: string[]) => Promise<string>;
|
|
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
|
-
}>;
|
|
8
|
+
export declare const makeNodeWASocket: ReturnType<typeof createWASocketFactory>;
|
|
247
9
|
/** Bind the socket core to a custom runtime (host entrypoints use this). */
|
|
248
|
-
export declare const createWASocketFactoryFor: (runtime: BaileysRuntime) =>
|
|
249
|
-
|
|
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
|
-
}>;
|
|
10
|
+
export declare const createWASocketFactoryFor: (runtime: BaileysRuntime) => ReturnType<typeof createWASocketFactory>;
|
|
11
|
+
declare const makeWASocket: typeof makeNodeWASocket;
|
|
726
12
|
export default makeWASocket;
|
|
727
13
|
export { createWASocketFactory };
|
|
728
14
|
//# sourceMappingURL=index.d.ts.map
|