@hbmodsofc/baileys 1.7.8 → 2.0.0

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 (155) hide show
  1. package/LICENSE +1 -1
  2. package/WAProto/index.js +157084 -24729
  3. package/lib/Defaults/baileys-version.json +3 -0
  4. package/lib/Defaults/index.d.ts +8 -12
  5. package/lib/Defaults/index.js +124 -90
  6. package/lib/Defaults/phonenumber-mcc.json +223 -0
  7. package/lib/Signal/Group/group_cipher.d.ts +1 -0
  8. package/lib/Signal/Group/group_cipher.js +39 -28
  9. package/lib/Signal/Group/queue-job.d.ts +1 -0
  10. package/lib/Signal/Group/queue-job.js +57 -0
  11. package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
  12. package/lib/Signal/Group/sender-chain-key.js +2 -9
  13. package/lib/Signal/Group/sender-key-distribution-message.js +3 -3
  14. package/lib/Signal/Group/sender-key-message.js +3 -3
  15. package/lib/Signal/Group/sender-key-state.d.ts +4 -4
  16. package/lib/Signal/Group/sender-key-state.js +16 -47
  17. package/lib/Signal/libsignal.d.ts +3 -7
  18. package/lib/Signal/libsignal.js +39 -224
  19. package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +3 -1
  20. package/lib/Socket/Client/index.d.ts +3 -2
  21. package/lib/Socket/Client/index.js +3 -2
  22. package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
  23. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  24. package/lib/Socket/Client/{websocket.d.ts → web-socket-client.d.ts} +1 -1
  25. package/lib/Socket/Client/{websocket.js → web-socket-client.js} +16 -10
  26. package/lib/Socket/business.d.ts +78 -94
  27. package/lib/Socket/business.js +11 -130
  28. package/lib/Socket/chats.d.ts +233 -63
  29. package/lib/Socket/chats.js +184 -234
  30. package/lib/Socket/groups.d.ts +41 -62
  31. package/lib/Socket/groups.js +64 -76
  32. package/lib/Socket/hbmods.d.ts +253 -0
  33. package/lib/Socket/hbmods.js +1 -0
  34. package/lib/Socket/index.d.ts +83 -129
  35. package/lib/Socket/index.js +6 -13
  36. package/lib/Socket/messages-recv.d.ts +48 -59
  37. package/lib/Socket/messages-recv.js +371 -516
  38. package/lib/Socket/messages-send.d.ts +67 -86
  39. package/lib/Socket/messages-send.js +1 -1091
  40. package/lib/Socket/newsletter.d.ts +64 -76
  41. package/lib/Socket/newsletter.js +1 -184
  42. package/lib/Socket/registration.d.ts +267 -0
  43. package/lib/Socket/registration.js +166 -0
  44. package/lib/Socket/socket.d.ts +13 -19
  45. package/lib/Socket/socket.js +1 -805
  46. package/lib/Socket/usync.d.ts +36 -0
  47. package/lib/Socket/usync.js +70 -0
  48. package/lib/Types/Auth.d.ts +10 -4
  49. package/lib/Types/Call.d.ts +1 -1
  50. package/lib/Types/Chat.d.ts +9 -29
  51. package/lib/Types/Chat.js +1 -7
  52. package/lib/Types/Contact.d.ts +1 -5
  53. package/lib/Types/Events.d.ts +14 -55
  54. package/lib/Types/GroupMetadata.d.ts +5 -15
  55. package/lib/Types/Label.d.ts +0 -11
  56. package/lib/Types/Label.js +1 -1
  57. package/lib/Types/LabelAssociation.js +1 -1
  58. package/lib/Types/Message.d.ts +49 -75
  59. package/lib/Types/Message.js +7 -10
  60. package/lib/Types/Newsletter.d.ts +98 -129
  61. package/lib/Types/Newsletter.js +38 -33
  62. package/lib/Types/Product.d.ts +1 -1
  63. package/lib/Types/Signal.d.ts +1 -29
  64. package/lib/Types/Socket.d.ts +22 -48
  65. package/lib/Types/State.d.ts +2 -13
  66. package/lib/Types/State.js +0 -12
  67. package/lib/Types/USync.d.ts +1 -1
  68. package/lib/Types/index.d.ts +3 -10
  69. package/lib/Types/index.js +2 -2
  70. package/lib/Utils/auth-utils.d.ts +3 -3
  71. package/lib/Utils/auth-utils.js +102 -378
  72. package/lib/Utils/baileys-event-stream.js +1 -1
  73. package/lib/Utils/business.d.ts +2 -2
  74. package/lib/Utils/business.js +13 -19
  75. package/lib/Utils/chat-utils.d.ts +22 -21
  76. package/lib/Utils/chat-utils.js +154 -201
  77. package/lib/Utils/crypto.d.ts +19 -18
  78. package/lib/Utils/crypto.js +37 -78
  79. package/lib/Utils/decode-wa-message.d.ts +7 -34
  80. package/lib/Utils/decode-wa-message.js +66 -138
  81. package/lib/Utils/event-buffer.d.ts +8 -6
  82. package/lib/Utils/event-buffer.js +43 -81
  83. package/lib/Utils/generics.d.ts +27 -27
  84. package/lib/Utils/generics.js +133 -128
  85. package/lib/Utils/history.d.ts +5 -9
  86. package/lib/Utils/history.js +23 -17
  87. package/lib/Utils/index.d.ts +0 -2
  88. package/lib/Utils/index.js +0 -2
  89. package/lib/Utils/link-preview.d.ts +4 -4
  90. package/lib/Utils/link-preview.js +12 -40
  91. package/lib/Utils/logger.d.ts +3 -11
  92. package/lib/Utils/lt-hash.d.ts +8 -8
  93. package/lib/Utils/lt-hash.js +24 -23
  94. package/lib/Utils/make-mutex.d.ts +2 -2
  95. package/lib/Utils/make-mutex.js +2 -3
  96. package/lib/Utils/messages-media.d.ts +41 -37
  97. package/lib/Utils/messages-media.js +368 -252
  98. package/lib/Utils/messages.d.ts +15 -13
  99. package/lib/Utils/messages.js +261 -274
  100. package/lib/Utils/noise-handler.d.ts +15 -13
  101. package/lib/Utils/noise-handler.js +26 -20
  102. package/lib/Utils/process-message.d.ts +8 -9
  103. package/lib/Utils/process-message.js +93 -157
  104. package/lib/Utils/signal.d.ts +5 -6
  105. package/lib/Utils/signal.js +29 -37
  106. package/lib/Utils/use-multi-file-auth-state.d.ts +2 -1
  107. package/lib/Utils/use-multi-file-auth-state.js +7 -12
  108. package/lib/Utils/validate-connection.d.ts +6 -5
  109. package/lib/Utils/validate-connection.js +97 -39
  110. package/lib/WABinary/constants.d.ts +27 -24
  111. package/lib/WABinary/constants.js +13 -1276
  112. package/lib/WABinary/decode.d.ts +4 -3
  113. package/lib/WABinary/decode.js +14 -28
  114. package/lib/WABinary/encode.d.ts +2 -1
  115. package/lib/WABinary/encode.js +147 -134
  116. package/lib/WABinary/generic-utils.d.ts +7 -4
  117. package/lib/WABinary/generic-utils.js +125 -40
  118. package/lib/WABinary/jid-utils.d.ts +8 -13
  119. package/lib/WABinary/jid-utils.js +16 -27
  120. package/lib/WAM/BinaryInfo.d.ts +11 -2
  121. package/lib/WAM/constants.d.ts +2 -3
  122. package/lib/WAM/constants.js +2359 -2252
  123. package/lib/WAM/encode.d.ts +2 -1
  124. package/lib/WAM/encode.js +11 -8
  125. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +2 -2
  126. package/lib/WAUSync/Protocols/USyncContactProtocol.js +4 -3
  127. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
  128. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +5 -5
  129. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
  130. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +5 -5
  131. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
  132. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +6 -5
  133. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +2 -2
  134. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +1 -1
  135. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -4
  136. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +3 -11
  137. package/lib/WAUSync/USyncQuery.d.ts +2 -2
  138. package/lib/WAUSync/USyncQuery.js +15 -19
  139. package/lib/WAUSync/USyncUser.d.ts +5 -5
  140. package/lib/WAUSync/index.d.ts +1 -1
  141. package/lib/WAUSync/index.js +1 -1
  142. package/package.json +102 -104
  143. package/lib/Signal/lid-mapping.d.ts +0 -26
  144. package/lib/Signal/lid-mapping.js +0 -146
  145. package/lib/Socket/communities.d.ts +0 -232
  146. package/lib/Socket/communities.js +0 -402
  147. package/lib/Socket/mex.d.ts +0 -2
  148. package/lib/Socket/mex.js +0 -45
  149. package/lib/Types/Bussines.d.ts +0 -24
  150. package/lib/Types/Bussines.js +0 -2
  151. package/lib/Utils/lidToJid-test.d.ts +0 -11
  152. package/lib/Utils/lidToJid-test.js +0 -27
  153. package/lib/Utils/message-retry-manager.d.ts +0 -81
  154. package/lib/Utils/message-retry-manager.js +0 -152
  155. /package/lib/Socket/Client/{types.js → abstract-socket-client.js} +0 -0
@@ -1,55 +1,51 @@
1
+ /// <reference types="node" />
1
2
  import { Boom } from '@hapi/boom';
2
- import { proto } from '../../WAProto/index.js';
3
- import type { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types';
4
- import { MessageRetryManager } from '../Utils';
5
- import { type BinaryNode, type JidWithDevice } from '../WABinary';
6
- import { USyncQuery } from '../WAUSync';
3
+ import { proto } from '../../WAProto';
4
+ import { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types';
5
+ import { BinaryNode, JidWithDevice } from '../WABinary';
7
6
  export declare const makeMessagesSocket: (config: SocketConfig) => {
8
- getPrivacyTokens: (jids: string[]) => Promise<any>;
7
+ getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
9
8
  assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
10
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
9
+ relayMessage: (jid: string, message: proto.IMessage, { messageId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<proto.WebMessageInfo>;
11
10
  sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
12
11
  sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
13
12
  readMessages: (keys: WAMessageKey[]) => Promise<void>;
14
13
  refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
14
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<JidWithDevice[]>;
15
+ createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs']) => Promise<{
16
+ nodes: BinaryNode[];
17
+ shouldIncludeDeviceIdentity: boolean;
18
+ }>;
15
19
  waUploadToServer: import("../Types").WAMediaUploadFunction;
16
20
  fetchPrivacySettings: (force?: boolean) => Promise<{
17
21
  [_: string]: string;
18
22
  }>;
19
23
  sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
20
- createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
21
- nodes: BinaryNode[];
22
- shouldIncludeDeviceIdentity: boolean;
23
- }>;
24
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(JidWithDevice & {
25
- wireJid: string;
26
- })[]>;
27
- messageRetryManager: MessageRetryManager | null;
24
+ rahmi: any;
28
25
  updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
29
26
  sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
30
- newsletterCreate: (name: string, description?: string) => Promise<import("../Types").NewsletterMetadata>;
31
- newsletterUpdate: (jid: string, updates: import("../Types").NewsletterUpdate) => Promise<unknown>;
32
- newsletterSubscribers: (jid: string) => Promise<{
33
- subscribers: number;
34
- }>;
35
- newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types").NewsletterMetadata | null>;
36
- newsletterFollow: (jid: string) => Promise<unknown>;
37
- newsletterUnfollow: (jid: string) => Promise<unknown>;
38
- newsletterMute: (jid: string) => Promise<unknown>;
39
- newsletterUnmute: (jid: string) => Promise<unknown>;
40
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
41
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
42
- newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<unknown>;
43
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
44
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
45
- newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
46
27
  subscribeNewsletterUpdates: (jid: string) => Promise<{
47
28
  duration: string;
48
- } | null>;
29
+ }>;
30
+ newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
31
+ newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
32
+ newsletterUpdateName: (jid: string, name: string) => Promise<void>;
33
+ newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
34
+ newsletterRemovePicture: (jid: string) => Promise<void>;
35
+ newsletterUnfollow: (jid: string) => Promise<void>;
36
+ newsletterFollow: (jid: string) => Promise<void>;
37
+ newsletterUnmute: (jid: string) => Promise<void>;
38
+ newsletterMute: (jid: string) => Promise<void>;
39
+ newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
40
+ newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
41
+ newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
49
42
  newsletterAdminCount: (jid: string) => Promise<number>;
50
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
51
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
43
+ newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
44
+ newsletterDemote: (jid: string, user: string) => Promise<void>;
52
45
  newsletterDelete: (jid: string) => Promise<void>;
46
+ newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
47
+ newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
48
+ newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
53
49
  groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
54
50
  groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
55
51
  groupLeave: (id: string) => Promise<void>;
@@ -57,7 +53,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
57
53
  groupRequestParticipantsList: (jid: string) => Promise<{
58
54
  [key: string]: string;
59
55
  }[]>;
60
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
56
+ groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
61
57
  status: string;
62
58
  jid: string;
63
59
  }[]>;
@@ -66,103 +62,88 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
66
62
  jid: string;
67
63
  content: BinaryNode;
68
64
  }[]>;
69
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
65
+ groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
70
66
  groupInviteCode: (jid: string) => Promise<string | undefined>;
71
67
  groupRevokeInvite: (jid: string) => Promise<string | undefined>;
72
68
  groupAcceptInvite: (code: string) => Promise<string | undefined>;
73
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
74
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
69
+ groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
75
70
  groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
76
71
  groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
77
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
78
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
72
+ groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
73
+ groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>;
79
74
  groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
80
75
  groupFetchAllParticipating: () => Promise<{
81
76
  [_: string]: import("../Types").GroupMetadata;
82
77
  }>;
83
- createCallLink: (type: "audio" | "video", event?: {
84
- startTime: number;
85
- }, timeoutMs?: number) => Promise<string | undefined>;
86
- getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
87
78
  processingMutex: {
88
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
79
+ mutex<T>(code: () => T | Promise<T>): Promise<T>;
89
80
  };
90
- upsertMessage: (msg: import("../Types").WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
81
+ upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>;
91
82
  appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
92
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
93
- presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
94
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
83
+ sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>;
84
+ presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>;
85
+ profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
86
+ onWhatsApp: (...jids: string[]) => Promise<{
87
+ jid: string;
88
+ exists: unknown;
89
+ lid: unknown;
90
+ }[] | undefined>;
95
91
  fetchBlocklist: () => Promise<string[]>;
96
- fetchStatus: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
97
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
98
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload, dimensions?: {
99
- width: number;
100
- height: number;
101
- }) => Promise<void>;
92
+ fetchStatus: (jid: string) => Promise<{
93
+ status: string | undefined;
94
+ setAt: Date;
95
+ } | undefined>;
96
+ updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
102
97
  removeProfilePicture: (jid: string) => Promise<void>;
103
98
  updateProfileStatus: (status: string) => Promise<void>;
104
99
  updateProfileName: (name: string) => Promise<void>;
105
100
  updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
106
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
107
- updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
108
- updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => Promise<void>;
109
101
  updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
110
102
  updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
111
103
  updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
112
104
  updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
113
105
  updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
114
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
106
+ updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
115
107
  updateDefaultDisappearingMode: (duration: number) => Promise<void>;
116
- getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
117
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
108
+ getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
109
+ resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
118
110
  chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
119
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
120
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
121
- removeContact: (jid: string) => Promise<void>;
122
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
111
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
123
112
  addChatLabel: (jid: string, labelId: string) => Promise<void>;
124
113
  removeChatLabel: (jid: string, labelId: string) => Promise<void>;
125
114
  addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
126
115
  removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
127
116
  star: (jid: string, messages: {
128
117
  id: string;
129
- fromMe?: boolean;
118
+ fromMe?: boolean | undefined;
130
119
  }[], star: boolean) => Promise<void>;
131
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
132
- removeQuickReply: (timestamp: string) => Promise<void>;
133
120
  type: "md";
134
- ws: import("./Client/websocket.js").WebSocketClient;
121
+ ws: any;
135
122
  ev: import("../Types").BaileysEventEmitter & {
136
123
  process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
137
124
  buffer(): void;
138
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
139
- flush(): boolean;
125
+ createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
126
+ flush(force?: boolean | undefined): boolean;
140
127
  isBuffering(): boolean;
141
128
  };
142
129
  authState: {
143
130
  creds: import("../Types").AuthenticationCreds;
144
131
  keys: import("../Types").SignalKeyStoreWithTransaction;
145
132
  };
146
- signalRepository: import("../Types").SignalRepositoryWithLIDStore;
133
+ signalRepository: import("../Types").SignalRepository;
147
134
  user: import("../Types").Contact | undefined;
148
135
  generateMessageTag: () => string;
149
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
150
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
136
+ query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
137
+ waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
151
138
  waitForSocketOpen: () => Promise<void>;
152
139
  sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
153
140
  sendNode: (frame: BinaryNode) => Promise<void>;
154
- logout: (msg?: string) => Promise<void>;
141
+ logout: (msg?: string | undefined) => Promise<void>;
155
142
  end: (error: Error | undefined) => void;
156
- onUnexpectedError: (err: Error | Boom, msg: string) => void;
157
- uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
143
+ onUnexpectedError: (err: Error | Boom<any>, msg: string) => void;
144
+ uploadPreKeys: (count?: number) => Promise<void>;
158
145
  uploadPreKeysToServerIfRequired: () => Promise<void>;
159
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
160
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
161
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
162
- executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>;
163
- onWhatsApp: (...jids: string[]) => Promise<{
164
- jid: string;
165
- exists: boolean;
166
- lid: string;
167
- }[] | undefined>;
146
+ requestPairingCode: (phoneNumber: string) => Promise<string>;
147
+ waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
148
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>;
168
149
  };