@kelvdra/baileys 1.0.3 → 1.0.4

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.
Files changed (109) hide show
  1. package/README.md +75 -1499
  2. package/lib/Defaults/index.d.ts +62 -0
  3. package/lib/Defaults/index.js +2 -2
  4. package/lib/Defaults/phonenumber-mcc.json +223 -0
  5. package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
  6. package/lib/Signal/Group/group-session-builder.d.ts +15 -0
  7. package/lib/Signal/Group/group_cipher.d.ts +17 -0
  8. package/lib/Signal/Group/index.d.ts +12 -0
  9. package/lib/Signal/Group/keyhelper.d.ts +11 -0
  10. package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
  11. package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
  12. package/lib/Signal/Group/sender-key-message.d.ts +19 -0
  13. package/lib/Signal/Group/sender-key-name.d.ts +18 -0
  14. package/lib/Signal/Group/sender-key-record.d.ts +31 -0
  15. package/lib/Signal/Group/sender-key-state.d.ts +39 -0
  16. package/lib/Signal/Group/sender-message-key.d.ts +12 -0
  17. package/lib/Signal/libsignal.d.ts +5 -0
  18. package/lib/Signal/lid-mapping.d.ts +23 -0
  19. package/lib/Socket/Client/index.d.ts +3 -0
  20. package/lib/Socket/Client/types.d.ts +16 -0
  21. package/lib/Socket/Client/websocket.d.ts +13 -0
  22. package/lib/Socket/business.d.ts +190 -0
  23. package/lib/Socket/chats.d.ts +100 -0
  24. package/lib/Socket/chats.js +14 -13
  25. package/lib/Socket/communities.d.ts +246 -0
  26. package/lib/Socket/groups.d.ts +139 -0
  27. package/lib/Socket/groups.js +2 -3
  28. package/lib/Socket/hydra.js +1 -2
  29. package/lib/Socket/index.d.ts +233 -0
  30. package/lib/Socket/messages-recv.d.ts +175 -0
  31. package/lib/Socket/messages-recv.js +325 -515
  32. package/lib/Socket/messages-send.d.ts +171 -0
  33. package/lib/Socket/messages-send.js +104 -467
  34. package/lib/Socket/mex.d.ts +3 -0
  35. package/lib/Socket/newsletter.d.ts +149 -0
  36. package/lib/Socket/socket.d.ts +53 -0
  37. package/lib/Socket/socket.js +52 -51
  38. package/lib/Store/index.d.ts +4 -0
  39. package/lib/Store/make-cache-manager-store.d.ts +14 -0
  40. package/lib/Store/make-in-memory-store.d.ts +123 -0
  41. package/lib/Store/make-ordered-dictionary.d.ts +12 -0
  42. package/lib/Store/object-repository.d.ts +10 -0
  43. package/lib/Types/Auth.d.ts +115 -0
  44. package/lib/Types/Bussines.d.ts +25 -0
  45. package/lib/Types/Call.d.ts +14 -0
  46. package/lib/Types/Chat.d.ts +123 -0
  47. package/lib/Types/Contact.d.ts +24 -0
  48. package/lib/Types/Events.d.ts +202 -0
  49. package/lib/Types/GroupMetadata.d.ts +67 -0
  50. package/lib/Types/Label.d.ts +47 -0
  51. package/lib/Types/LabelAssociation.d.ts +30 -0
  52. package/lib/Types/Message.d.ts +382 -0
  53. package/lib/Types/Newsletter.d.ts +135 -0
  54. package/lib/Types/Product.d.ts +79 -0
  55. package/lib/Types/Signal.d.ts +76 -0
  56. package/lib/Types/Socket.d.ts +133 -0
  57. package/lib/Types/State.d.ts +39 -0
  58. package/lib/Types/USync.d.ts +26 -0
  59. package/lib/Types/index.d.ts +65 -0
  60. package/lib/Utils/auth-utils.d.ts +19 -0
  61. package/lib/Utils/browser-utils.d.ts +4 -0
  62. package/lib/Utils/business.d.ts +23 -0
  63. package/lib/Utils/chat-utils.d.ts +70 -0
  64. package/lib/Utils/crypto.d.ts +41 -0
  65. package/lib/Utils/decode-wa-message.d.ts +48 -0
  66. package/lib/Utils/decode-wa-message.js +5 -7
  67. package/lib/Utils/event-buffer.d.ts +34 -0
  68. package/lib/Utils/generics.d.ts +90 -0
  69. package/lib/Utils/history.d.ts +19 -0
  70. package/lib/Utils/index.d.ts +19 -0
  71. package/lib/Utils/link-preview.d.ts +21 -0
  72. package/lib/Utils/logger.d.ts +12 -0
  73. package/lib/Utils/lt-hash.d.ts +13 -0
  74. package/lib/Utils/make-mutex.d.ts +8 -0
  75. package/lib/Utils/message-retry-manager.d.ts +82 -0
  76. package/lib/Utils/messages-media.d.ts +114 -0
  77. package/lib/Utils/messages-media.js +69 -33
  78. package/lib/Utils/messages.d.ts +89 -0
  79. package/lib/Utils/messages.js +42 -12
  80. package/lib/Utils/noise-handler.d.ts +20 -0
  81. package/lib/Utils/pre-key-manager.d.ts +28 -0
  82. package/lib/Utils/process-message.d.ts +60 -0
  83. package/lib/Utils/signal.d.ts +34 -0
  84. package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
  85. package/lib/Utils/validate-connection.d.ts +11 -0
  86. package/lib/WABinary/constants.d.ts +28 -0
  87. package/lib/WABinary/decode.d.ts +7 -0
  88. package/lib/WABinary/encode.d.ts +3 -0
  89. package/lib/WABinary/generic-utils.d.ts +15 -0
  90. package/lib/WABinary/generic-utils.js +7 -0
  91. package/lib/WABinary/index.d.ts +6 -0
  92. package/lib/WABinary/jid-utils.d.ts +48 -0
  93. package/lib/WABinary/types.d.ts +19 -0
  94. package/lib/WAM/BinaryInfo.d.ts +9 -0
  95. package/lib/WAM/constants.d.ts +40 -0
  96. package/lib/WAM/encode.d.ts +3 -0
  97. package/lib/WAM/index.d.ts +4 -0
  98. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
  99. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
  100. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
  101. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
  102. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
  103. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
  104. package/lib/WAUSync/Protocols/index.d.ts +5 -0
  105. package/lib/WAUSync/USyncQuery.d.ts +29 -0
  106. package/lib/WAUSync/USyncUser.d.ts +13 -0
  107. package/lib/WAUSync/index.d.ts +4 -0
  108. package/lib/index.d.ts +13 -0
  109. package/package.json +3 -34
@@ -0,0 +1,139 @@
1
+ import { proto } from '../../WAProto/index.js';
2
+ import type { GroupMetadata, ParticipantAction, SocketConfig, WAMessageKey } from '../Types/index.js';
3
+ import { type BinaryNode } from '../WABinary/index.js';
4
+ export declare const makeGroupsSocket: (config: SocketConfig) => {
5
+ groupMetadata: (jid: string) => Promise<GroupMetadata>;
6
+ groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
7
+ groupLeave: (id: string) => Promise<void>;
8
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
9
+ groupRequestParticipantsList: (jid: string) => Promise<{
10
+ [key: string]: string;
11
+ }[]>;
12
+ groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
13
+ status: string;
14
+ jid: string | undefined;
15
+ }[]>;
16
+ groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
17
+ status: string;
18
+ jid: string | undefined;
19
+ content: BinaryNode;
20
+ }[]>;
21
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
22
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
23
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
24
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
25
+ /**
26
+ * revoke a v4 invite for someone
27
+ * @param groupJid group jid
28
+ * @param invitedJid jid of person you invited
29
+ * @returns true if successful
30
+ */
31
+ groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
32
+ /**
33
+ * accept a GroupInviteMessage
34
+ * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
35
+ * @param inviteMessage the message to accept
36
+ */
37
+ groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
38
+ groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
39
+ groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
40
+ groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
41
+ groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
42
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
43
+ groupFetchAllParticipating: () => Promise<{
44
+ [_: string]: GroupMetadata;
45
+ }>;
46
+ createCallLink: (type: "audio" | "video", event?: {
47
+ startTime: number;
48
+ }, timeoutMs?: number) => Promise<string | undefined>;
49
+ getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
50
+ processingMutex: {
51
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
52
+ };
53
+ fetchPrivacySettings: (force?: boolean) => Promise<{
54
+ [_: string]: string;
55
+ }>;
56
+ upsertMessage: (msg: import("../Types/index.js").WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
57
+ appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
58
+ sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
59
+ presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
60
+ profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
61
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
62
+ fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
63
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
64
+ updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
65
+ width: number;
66
+ height: number;
67
+ }) => Promise<void>;
68
+ removeProfilePicture: (jid: string) => Promise<void>;
69
+ updateProfileStatus: (status: string) => Promise<void>;
70
+ updateProfileName: (name: string) => Promise<void>;
71
+ updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
72
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
73
+ updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
74
+ updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
75
+ updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
76
+ updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
77
+ updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
78
+ updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
79
+ updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
80
+ updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
81
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
82
+ getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
83
+ resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
84
+ chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
85
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
86
+ addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
87
+ removeContact: (jid: string) => Promise<void>;
88
+ addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
89
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
90
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
91
+ addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
92
+ removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
93
+ star: (jid: string, messages: {
94
+ id: string;
95
+ fromMe?: boolean;
96
+ }[], star: boolean) => Promise<void>;
97
+ addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
98
+ removeQuickReply: (timestamp: string) => Promise<void>;
99
+ type: "md";
100
+ ws: import("./Client/websocket.js").WebSocketClient;
101
+ ev: import("../Types/index.js").BaileysEventEmitter & {
102
+ process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
103
+ buffer(): void;
104
+ createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
105
+ flush(): boolean;
106
+ isBuffering(): boolean;
107
+ };
108
+ authState: {
109
+ creds: import("../Types/index.js").AuthenticationCreds;
110
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
111
+ };
112
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
113
+ user: import("../Types/index.js").Contact | undefined;
114
+ generateMessageTag: () => string;
115
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
116
+ waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
117
+ waitForSocketOpen: () => Promise<void>;
118
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
119
+ sendNode: (frame: BinaryNode) => Promise<void>;
120
+ logout: (msg?: string) => Promise<void>;
121
+ end: (error: Error | undefined) => void;
122
+ onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
123
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
124
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
125
+ digestKeyBundle: () => Promise<void>;
126
+ rotateSignedPreKey: () => Promise<void>;
127
+ requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
128
+ wamBuffer: import("../index.js").BinaryInfo;
129
+ waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
130
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
131
+ executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
132
+ onWhatsApp: (...phoneNumber: string[]) => Promise<{
133
+ jid: string;
134
+ exists: boolean;
135
+ }[] | undefined>;
136
+ };
137
+ export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata;
138
+ export type GroupsSocket = ReturnType<typeof makeGroupsSocket>;
139
+ //# sourceMappingURL=groups.d.ts.map
@@ -51,7 +51,6 @@ export const makeGroupsSocket = (config) => {
51
51
  data[meta.id] = meta;
52
52
  }
53
53
  }
54
- // TODO: properly parse LID / PN DATA
55
54
  sock.ev.emit('groups.update', Object.values(data));
56
55
  return data;
57
56
  };
@@ -238,7 +237,7 @@ export const makeGroupsSocket = (config) => {
238
237
  participant: key.remoteJid
239
238
  },
240
239
  messageStubType: WAMessageStubType.GROUP_PARTICIPANT_ADD,
241
- messageStubParameters: [JSON.stringify(authState.creds.me)],
240
+ messageStubParameters: [authState.creds.me.id],
242
241
  participant: key.remoteJid,
243
242
  messageTimestamp: unixTimestampSeconds()
244
243
  }, 'notify');
@@ -324,4 +323,4 @@ export const extractGroupMetadata = (result) => {
324
323
  };
325
324
  return metadata;
326
325
  };
327
- //# sourceMappingURL=groups.js.map
326
+ //# sourceMappingURL=groups.js.map
@@ -553,7 +553,6 @@ class hydra {
553
553
 
554
554
  async handleStMention(content, jid, quoted) {
555
555
  const data = content.statusMentionMessage;
556
- const media = null;
557
556
  const mediaType = null;
558
557
 
559
558
  if (data.image) {
@@ -712,4 +711,4 @@ class hydra {
712
711
  }
713
712
  }
714
713
 
715
- export default hydra
714
+ export default hydra
@@ -0,0 +1,233 @@
1
+ import type { UserFacingSocketConfig } from '../Types/index.js';
2
+ declare const makeWASocket: (config: UserFacingSocketConfig) => {
3
+ communityMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
4
+ communityCreate: (subject: string, body: string) => Promise<import("../index.js").GroupMetadata | null>;
5
+ communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<import("../index.js").GroupMetadata | null>;
6
+ communityLeave: (id: string) => Promise<void>;
7
+ communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
8
+ communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
9
+ communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
10
+ communityFetchLinkedGroups: (jid: string) => Promise<{
11
+ communityJid: string;
12
+ isCommunity: boolean;
13
+ linkedGroups: {
14
+ id: string | undefined;
15
+ subject: string;
16
+ creation: number | undefined;
17
+ owner: string | undefined;
18
+ size: number | undefined;
19
+ }[];
20
+ }>;
21
+ communityRequestParticipantsList: (jid: string) => Promise<{
22
+ [key: string]: string;
23
+ }[]>;
24
+ communityRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
25
+ status: string;
26
+ jid: string | undefined;
27
+ }[]>;
28
+ communityParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
29
+ status: string;
30
+ jid: string | undefined;
31
+ content: import("../index.js").BinaryNode;
32
+ }[]>;
33
+ communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
34
+ communityInviteCode: (jid: string) => Promise<string | undefined>;
35
+ communityRevokeInvite: (jid: string) => Promise<string | undefined>;
36
+ communityAcceptInvite: (code: string) => Promise<string | undefined>;
37
+ communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
38
+ communityAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
39
+ communityGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
40
+ communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
41
+ communitySettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
42
+ communityMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
43
+ communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
44
+ communityFetchAllParticipating: () => Promise<{
45
+ [_: string]: import("../index.js").GroupMetadata;
46
+ }>;
47
+ logger: import("../Utils/logger.js").ILogger;
48
+ getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../index.js").OrderDetails>;
49
+ getCatalog: ({ jid, limit, cursor }: import("../index.js").GetCatalogOptions) => Promise<{
50
+ products: import("../index.js").Product[];
51
+ nextPageCursor: string | undefined;
52
+ }>;
53
+ getCollections: (jid?: string, limit?: number) => Promise<{
54
+ collections: import("../index.js").CatalogCollection[];
55
+ }>;
56
+ productCreate: (create: import("../index.js").ProductCreate) => Promise<import("../index.js").Product>;
57
+ productDelete: (productIds: string[]) => Promise<{
58
+ deleted: number;
59
+ }>;
60
+ productUpdate: (productId: string, update: import("../index.js").ProductUpdate) => Promise<import("../index.js").Product>;
61
+ updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<any>;
62
+ updateCoverPhoto: (photo: import("../index.js").WAMediaUpload) => Promise<number>;
63
+ removeCoverPhoto: (id: string) => Promise<any>;
64
+ sendMessageAck: ({ tag, attrs, content }: import("../index.js").BinaryNode, errorCode?: number) => Promise<void>;
65
+ sendRetryRequest: (node: import("../index.js").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
66
+ rejectCall: (callId: string, callFrom: string) => Promise<void>;
67
+ fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
68
+ requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey) => Promise<string | undefined>;
69
+ messageRetryManager: import("../index.js").MessageRetryManager | null;
70
+ getPrivacyTokens: (jids: string[]) => Promise<any>;
71
+ assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
72
+ relayMessage: (jid: string, message: import("../index.js").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../index.js").MessageRelayOptions) => Promise<string>;
73
+ sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
74
+ sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
75
+ readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
76
+ refreshMediaConn: (forceGet?: boolean) => Promise<import("../index.js").MediaConnInfo>;
77
+ waUploadToServer: import("../index.js").WAMediaUploadFunction;
78
+ fetchPrivacySettings: (force?: boolean) => Promise<{
79
+ [_: string]: string;
80
+ }>;
81
+ sendPeerDataOperationMessage: (pdoMessage: import("../index.js").proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
82
+ createParticipantNodes: (recipientJids: string[], message: import("../index.js").proto.IMessage, extraAttrs?: import("../index.js").BinaryNode["attrs"], dsmMessage?: import("../index.js").proto.IMessage) => Promise<{
83
+ nodes: import("../index.js").BinaryNode[];
84
+ shouldIncludeDeviceIdentity: boolean;
85
+ }>;
86
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../index.js").JidWithDevice & {
87
+ jid: string;
88
+ })[]>;
89
+ updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
90
+ sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: import("../index.js").MiscMessageGenerationOptions) => Promise<import("../index.js").WAMessage | undefined>;
91
+ newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
92
+ newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<unknown>;
93
+ newsletterSubscribers: (jid: string) => Promise<{
94
+ subscribers: number;
95
+ }>;
96
+ newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
97
+ newsletterFollow: (jid: string) => Promise<unknown>;
98
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
99
+ newsletterMute: (jid: string) => Promise<unknown>;
100
+ newsletterUnmute: (jid: string) => Promise<unknown>;
101
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
102
+ newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
103
+ newsletterUpdatePicture: (jid: string, content: import("../index.js").WAMediaUpload) => Promise<unknown>;
104
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
105
+ newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
106
+ newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
107
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
108
+ duration: string;
109
+ } | null>;
110
+ newsletterAdminCount: (jid: string) => Promise<number>;
111
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
112
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
113
+ newsletterDelete: (jid: string) => Promise<void>;
114
+ groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
115
+ groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
116
+ groupLeave: (id: string) => Promise<void>;
117
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
118
+ groupRequestParticipantsList: (jid: string) => Promise<{
119
+ [key: string]: string;
120
+ }[]>;
121
+ groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
122
+ status: string;
123
+ jid: string | undefined;
124
+ }[]>;
125
+ groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
126
+ status: string;
127
+ jid: string | undefined;
128
+ content: import("../index.js").BinaryNode;
129
+ }[]>;
130
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
131
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
132
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
133
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
134
+ groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
135
+ groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
136
+ groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
137
+ groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
138
+ groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
139
+ groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
140
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
141
+ groupFetchAllParticipating: () => Promise<{
142
+ [_: string]: import("../index.js").GroupMetadata;
143
+ }>;
144
+ createCallLink: (type: "audio" | "video", event?: {
145
+ startTime: number;
146
+ }, timeoutMs?: number) => Promise<string | undefined>;
147
+ getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
148
+ processingMutex: {
149
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
150
+ };
151
+ upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
152
+ appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
153
+ sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
154
+ presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
155
+ profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
156
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
157
+ fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
158
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
159
+ updateProfilePicture: (jid: string, content: import("../index.js").WAMediaUpload, dimensions?: {
160
+ width: number;
161
+ height: number;
162
+ }) => Promise<void>;
163
+ removeProfilePicture: (jid: string) => Promise<void>;
164
+ updateProfileStatus: (status: string) => Promise<void>;
165
+ updateProfileName: (name: string) => Promise<void>;
166
+ updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
167
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
168
+ updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
169
+ updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
170
+ updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
171
+ updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
172
+ updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
173
+ updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
174
+ updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
175
+ updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
176
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
177
+ getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
178
+ resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
179
+ chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
180
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
181
+ addOrEditContact: (jid: string, contact: import("../index.js").proto.SyncActionValue.IContactAction) => Promise<void>;
182
+ removeContact: (jid: string) => Promise<void>;
183
+ addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
184
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
185
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
186
+ addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
187
+ removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
188
+ star: (jid: string, messages: {
189
+ id: string;
190
+ fromMe?: boolean;
191
+ }[], star: boolean) => Promise<void>;
192
+ addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
193
+ removeQuickReply: (timestamp: string) => Promise<void>;
194
+ type: "md";
195
+ ws: import("./Client/index.js").WebSocketClient;
196
+ ev: import("../index.js").BaileysEventEmitter & {
197
+ process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
198
+ buffer(): void;
199
+ createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
200
+ flush(): boolean;
201
+ isBuffering(): boolean;
202
+ };
203
+ authState: {
204
+ creds: import("../index.js").AuthenticationCreds;
205
+ keys: import("../index.js").SignalKeyStoreWithTransaction;
206
+ };
207
+ signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
208
+ user: import("../index.js").Contact | undefined;
209
+ generateMessageTag: () => string;
210
+ query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<any>;
211
+ waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
212
+ waitForSocketOpen: () => Promise<void>;
213
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
214
+ sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
215
+ logout: (msg?: string) => Promise<void>;
216
+ end: (error: Error | undefined) => void;
217
+ onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
218
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
219
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
220
+ digestKeyBundle: () => Promise<void>;
221
+ rotateSignedPreKey: () => Promise<void>;
222
+ requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
223
+ wamBuffer: import("../index.js").BinaryInfo;
224
+ waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
225
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
226
+ executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
227
+ onWhatsApp: (...phoneNumber: string[]) => Promise<{
228
+ jid: string;
229
+ exists: boolean;
230
+ }[] | undefined>;
231
+ };
232
+ export default makeWASocket;
233
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,175 @@
1
+ import { Boom } from '@hapi/boom';
2
+ import Long from 'long';
3
+ import { proto } from '../../WAProto/index.js';
4
+ import type { MessageReceiptType, MessageRelayOptions, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
5
+ import { type BinaryNode } from '../WABinary/index.js';
6
+ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
7
+ sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number) => Promise<void>;
8
+ sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
9
+ rejectCall: (callId: string, callFrom: string) => Promise<void>;
10
+ fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
11
+ requestPlaceholderResend: (messageKey: WAMessageKey) => Promise<string | undefined>;
12
+ messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
13
+ getPrivacyTokens: (jids: string[]) => Promise<any>;
14
+ assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
15
+ relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
16
+ sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
17
+ sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
18
+ readMessages: (keys: WAMessageKey[]) => Promise<void>;
19
+ refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
20
+ waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
21
+ fetchPrivacySettings: (force?: boolean) => Promise<{
22
+ [_: string]: string;
23
+ }>;
24
+ sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
25
+ createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
26
+ nodes: BinaryNode[];
27
+ shouldIncludeDeviceIdentity: boolean;
28
+ }>;
29
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary/index.js").JidWithDevice & {
30
+ jid: string;
31
+ })[]>;
32
+ updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
33
+ sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
34
+ newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
35
+ newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
36
+ newsletterSubscribers: (jid: string) => Promise<{
37
+ subscribers: number;
38
+ }>;
39
+ newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
40
+ newsletterFollow: (jid: string) => Promise<unknown>;
41
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
42
+ newsletterMute: (jid: string) => Promise<unknown>;
43
+ newsletterUnmute: (jid: string) => Promise<unknown>;
44
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
45
+ newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
46
+ newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
47
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
48
+ newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
49
+ newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
50
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
51
+ duration: string;
52
+ } | null>;
53
+ newsletterAdminCount: (jid: string) => Promise<number>;
54
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
55
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
56
+ newsletterDelete: (jid: string) => Promise<void>;
57
+ groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
58
+ groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
59
+ groupLeave: (id: string) => Promise<void>;
60
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
61
+ groupRequestParticipantsList: (jid: string) => Promise<{
62
+ [key: string]: string;
63
+ }[]>;
64
+ groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
65
+ status: string;
66
+ jid: string | undefined;
67
+ }[]>;
68
+ groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
69
+ status: string;
70
+ jid: string | undefined;
71
+ content: BinaryNode;
72
+ }[]>;
73
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
74
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
75
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
76
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
77
+ groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
78
+ groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
79
+ groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
80
+ groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
81
+ groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
82
+ groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
83
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
84
+ groupFetchAllParticipating: () => Promise<{
85
+ [_: string]: import("../Types/index.js").GroupMetadata;
86
+ }>;
87
+ createCallLink: (type: "audio" | "video", event?: {
88
+ startTime: number;
89
+ }, timeoutMs?: number) => Promise<string | undefined>;
90
+ getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
91
+ processingMutex: {
92
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
93
+ };
94
+ upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
95
+ appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
96
+ sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
97
+ presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
98
+ profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
99
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
100
+ fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
101
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
102
+ updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
103
+ width: number;
104
+ height: number;
105
+ }) => Promise<void>;
106
+ removeProfilePicture: (jid: string) => Promise<void>;
107
+ updateProfileStatus: (status: string) => Promise<void>;
108
+ updateProfileName: (name: string) => Promise<void>;
109
+ updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
110
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
111
+ updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
112
+ updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
113
+ updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
114
+ updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
115
+ updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
116
+ updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
117
+ updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
118
+ updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
119
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
120
+ getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
121
+ resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
122
+ chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
123
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
124
+ addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
125
+ removeContact: (jid: string) => Promise<void>;
126
+ addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
127
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
128
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
129
+ addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
130
+ removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
131
+ star: (jid: string, messages: {
132
+ id: string;
133
+ fromMe?: boolean;
134
+ }[], star: boolean) => Promise<void>;
135
+ addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
136
+ removeQuickReply: (timestamp: string) => Promise<void>;
137
+ type: "md";
138
+ ws: import("./Client/websocket.js").WebSocketClient;
139
+ ev: import("../Types/index.js").BaileysEventEmitter & {
140
+ process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
141
+ buffer(): void;
142
+ createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
143
+ flush(): boolean;
144
+ isBuffering(): boolean;
145
+ };
146
+ authState: {
147
+ creds: import("../Types/index.js").AuthenticationCreds;
148
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
149
+ };
150
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
151
+ user: import("../Types/index.js").Contact | undefined;
152
+ generateMessageTag: () => string;
153
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
154
+ waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
155
+ waitForSocketOpen: () => Promise<void>;
156
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
157
+ sendNode: (frame: BinaryNode) => Promise<void>;
158
+ logout: (msg?: string) => Promise<void>;
159
+ end: (error: Error | undefined) => void;
160
+ onUnexpectedError: (err: Error | Boom, msg: string) => void;
161
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
162
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
163
+ digestKeyBundle: () => Promise<void>;
164
+ rotateSignedPreKey: () => Promise<void>;
165
+ requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
166
+ wamBuffer: import("../index.js").BinaryInfo;
167
+ waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
168
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
169
+ executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
170
+ onWhatsApp: (...phoneNumber: string[]) => Promise<{
171
+ jid: string;
172
+ exists: boolean;
173
+ }[] | undefined>;
174
+ };
175
+ //# sourceMappingURL=messages-recv.d.ts.map