sanka-baileyss 2.3.2 → 2.3.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 (159) hide show
  1. package/WAProto/BotMetadata/BotMetadata.d.ts +594 -1
  2. package/WAProto/BotMetadata/BotMetadata.js +1910 -148
  3. package/WAProto/BotMetadata/BotMetadata.proto +36 -0
  4. package/WAProto/E2E/E2E.d.ts +570 -6
  5. package/WAProto/E2E/E2E.js +1591 -26
  6. package/WAProto/E2E/E2E.proto +10 -1
  7. package/WAProto/HistorySync/HistorySync.d.ts +806 -6
  8. package/WAProto/HistorySync/HistorySync.js +2193 -29
  9. package/WAProto/HistorySync/HistorySync.proto +2 -1
  10. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +570 -6
  11. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +1591 -26
  12. package/WAProto/StatusAttributions/StatusAttributions.d.ts +2 -1
  13. package/WAProto/StatusAttributions/StatusAttributions.js +7 -0
  14. package/WAProto/StatusAttributions/StatusAttributions.proto +1 -0
  15. package/WAProto/SyncAction/SyncAction.d.ts +230 -0
  16. package/WAProto/SyncAction/SyncAction.js +578 -2
  17. package/WAProto/SyncAction/SyncAction.proto +13 -1
  18. package/WAProto/Web/Web.d.ts +570 -6
  19. package/WAProto/Web/Web.js +1591 -26
  20. package/lib/Defaults/baileys-version.json +2 -2
  21. package/lib/Defaults/index.d.ts +42 -25
  22. package/lib/Defaults/index.js +6 -2
  23. package/lib/Signal/Group/sender-key-record.js +23 -28
  24. package/lib/Signal/libsignal.d.ts +1 -0
  25. package/lib/Socket/Client/index.js +13 -9
  26. package/lib/Socket/Client/types.d.ts +11 -10
  27. package/lib/Socket/Client/types.js +11 -7
  28. package/lib/Socket/Client/websocket.d.ts +9 -8
  29. package/lib/Socket/Client/websocket.js +52 -47
  30. package/lib/Socket/business.d.ts +185 -182
  31. package/lib/Socket/business.js +258 -249
  32. package/lib/Socket/chats.d.ts +90 -87
  33. package/lib/Socket/chats.js +1095 -888
  34. package/lib/Socket/community.d.ts +131 -0
  35. package/lib/Socket/community.js +369 -0
  36. package/lib/Socket/groups.d.ts +50 -41
  37. package/lib/Socket/groups.js +10 -3
  38. package/lib/Socket/index.d.ts +5 -1
  39. package/lib/Socket/index.js +19 -5
  40. package/lib/Socket/messages-recv.d.ts +6 -2
  41. package/lib/Socket/messages-recv.js +31 -8
  42. package/lib/Socket/messages-send.d.ts +5 -1
  43. package/lib/Socket/messages-send.js +1293 -1351
  44. package/lib/Socket/newsletter.d.ts +142 -135
  45. package/lib/Socket/newsletter.js +274 -230
  46. package/lib/Socket/socket.d.ts +37 -35
  47. package/lib/Socket/usync.d.ts +31 -30
  48. package/lib/Socket/usync.js +74 -62
  49. package/lib/Types/Auth.d.ts +89 -72
  50. package/lib/Types/Auth.js +1 -0
  51. package/lib/Types/Call.d.ts +11 -10
  52. package/lib/Types/Call.js +1 -0
  53. package/lib/Types/Chat.d.ts +85 -62
  54. package/lib/Types/Chat.js +4 -1
  55. package/lib/Types/Contact.js +1 -0
  56. package/lib/Types/Events.d.ts +209 -191
  57. package/lib/Types/Events.js +1 -0
  58. package/lib/Types/GroupMetadata.d.ts +12 -27
  59. package/lib/Types/GroupMetadata.js +1 -0
  60. package/lib/Types/Label.d.ts +41 -39
  61. package/lib/Types/Label.js +24 -21
  62. package/lib/Types/LabelAssociation.d.ts +18 -12
  63. package/lib/Types/LabelAssociation.js +6 -3
  64. package/lib/Types/Message.d.ts +3 -2
  65. package/lib/Types/Message.js +7 -3
  66. package/lib/Types/MexUpdates.d.ts +9 -0
  67. package/lib/Types/MexUpdates.js +18 -0
  68. package/lib/Types/Newsletter.d.ts +84 -67
  69. package/lib/Types/Newsletter.js +30 -23
  70. package/lib/Types/Product.d.ts +70 -56
  71. package/lib/Types/Product.js +1 -0
  72. package/lib/Types/Signal.d.ts +46 -35
  73. package/lib/Types/Signal.js +1 -0
  74. package/lib/Types/Socket.d.ts +105 -101
  75. package/lib/Types/Socket.js +1 -0
  76. package/lib/Types/State.d.ts +37 -23
  77. package/lib/Types/State.js +13 -1
  78. package/lib/Types/USync.d.ts +21 -20
  79. package/lib/Types/USync.js +1 -0
  80. package/lib/Types/index.d.ts +51 -42
  81. package/lib/Types/index.js +25 -19
  82. package/lib/Utils/auth-utils.d.ts +14 -11
  83. package/lib/Utils/auth-utils.js +189 -182
  84. package/lib/Utils/baileys-event-stream.d.ts +12 -10
  85. package/lib/Utils/baileys-event-stream.js +52 -46
  86. package/lib/Utils/business.d.ts +15 -8
  87. package/lib/Utils/business.js +229 -217
  88. package/lib/Utils/chat-utils.d.ts +22 -12
  89. package/lib/Utils/chat-utils.js +57 -27
  90. package/lib/Utils/crypto.d.ts +31 -15
  91. package/lib/Utils/crypto.js +136 -107
  92. package/lib/Utils/decode-wa-message.d.ts +34 -245
  93. package/lib/Utils/decode-wa-message.js +205 -217
  94. package/lib/Utils/event-buffer.d.ts +30 -26
  95. package/lib/Utils/event-buffer.js +519 -515
  96. package/lib/Utils/history.d.ts +2 -8
  97. package/lib/Utils/index.js +13 -9
  98. package/lib/Utils/link-preview.d.ts +16 -14
  99. package/lib/Utils/link-preview.js +100 -92
  100. package/lib/Utils/logger.d.ts +9 -7
  101. package/lib/Utils/logger.js +1 -1
  102. package/lib/Utils/lt-hash.d.ts +10 -8
  103. package/lib/Utils/lt-hash.js +49 -44
  104. package/lib/Utils/make-mutex.d.ts +4 -2
  105. package/lib/Utils/make-mutex.js +43 -39
  106. package/lib/Utils/messages-media.d.ts +75 -50
  107. package/lib/Utils/messages.d.ts +60 -35
  108. package/lib/Utils/messages.js +87 -8
  109. package/lib/Utils/noise-handler.d.ts +13 -12
  110. package/lib/Utils/noise-handler.js +143 -138
  111. package/lib/Utils/process-message.d.ts +32 -24
  112. package/lib/Utils/process-message.js +387 -367
  113. package/lib/Utils/signal.d.ts +24 -15
  114. package/lib/Utils/signal.js +143 -131
  115. package/lib/Utils/use-mongo-file-auth-state.d.ts +3 -2
  116. package/lib/Utils/use-mongo-file-auth-state.js +72 -63
  117. package/lib/Utils/use-multi-file-auth-state.d.ts +9 -8
  118. package/lib/Utils/use-multi-file-auth-state.js +110 -102
  119. package/lib/Utils/use-single-file-auth-state.d.ts +8 -7
  120. package/lib/Utils/use-single-file-auth-state.js +66 -61
  121. package/lib/Utils/validate-connection.d.ts +5 -2
  122. package/lib/Utils/validate-connection.js +7 -6
  123. package/lib/WABinary/constants.d.ts +24 -21
  124. package/lib/WABinary/constants.js +1302 -31
  125. package/lib/WABinary/decode.d.ts +4 -1
  126. package/lib/WABinary/decode.js +267 -234
  127. package/lib/WABinary/encode.d.ts +1 -0
  128. package/lib/WABinary/encode.js +248 -226
  129. package/lib/WABinary/generic-utils.d.ts +13 -1
  130. package/lib/WABinary/generic-utils.js +113 -96
  131. package/lib/WABinary/index.js +13 -9
  132. package/lib/WABinary/jid-utils.d.ts +23 -4
  133. package/lib/WABinary/jid-utils.js +58 -39
  134. package/lib/WABinary/types.d.ts +15 -11
  135. package/lib/WABinary/types.js +1 -0
  136. package/lib/WAM/BinaryInfo.d.ts +14 -14
  137. package/lib/WAM/BinaryInfo.js +11 -8
  138. package/lib/WAM/constants.d.ts +34 -26
  139. package/lib/WAM/constants.js +15358 -15349
  140. package/lib/WAM/encode.d.ts +1 -0
  141. package/lib/WAM/encode.js +153 -144
  142. package/lib/WAM/index.js +13 -9
  143. package/lib/index.js +11 -11
  144. package/package.json +1 -66
  145. package/WASignalGroup/GroupProtocol.js +0 -1771
  146. package/WASignalGroup/ciphertext_message.js +0 -10
  147. package/WASignalGroup/group_cipher.js +0 -103
  148. package/WASignalGroup/group_session_builder.js +0 -39
  149. package/WASignalGroup/index.js +0 -5
  150. package/WASignalGroup/keyhelper.js +0 -17
  151. package/WASignalGroup/protobufs.js +0 -2
  152. package/WASignalGroup/queue_job.js +0 -64
  153. package/WASignalGroup/sender_chain_key.js +0 -38
  154. package/WASignalGroup/sender_key_distribution_message.js +0 -68
  155. package/WASignalGroup/sender_key_message.js +0 -79
  156. package/WASignalGroup/sender_key_name.js +0 -59
  157. package/WASignalGroup/sender_key_record.js +0 -47
  158. package/WASignalGroup/sender_key_state.js +0 -110
  159. package/WASignalGroup/sender_message_key.js +0 -30
@@ -1,183 +1,186 @@
1
- import { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig } from '../Types'
2
- import { BinaryNode } from '../WABinary'
3
-
4
- export declare const makeBusinessSocket: (config: SocketConfig) => {
5
- logger: import("../Utils/logger").ILogger
6
- getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>
7
- getCatalog: ({ jid, limit, cursor }: GetCatalogOptions) => Promise<{
8
- products: import("../Types").Product[]
9
- nextPageCursor: string | undefined
10
- }>
11
- getCollections: (jid?: string, limit?: number) => Promise<{
12
- collections: import("../Types").CatalogCollection[]
13
- }>
14
- productCreate: (create: ProductCreate) => Promise<import("../Types").Product>
15
- productDelete: (productIds: string[]) => Promise<{
16
- deleted: number
17
- }>
18
- productUpdate: (productId: string, update: ProductUpdate) => Promise<import("../Types").Product>
19
- sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number | undefined) => Promise<void>
20
- sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>
21
- offerCall: (toJid: string, isVideo?: boolean) => Promise<{
22
- id: any
23
- to: string
24
- }>
25
- rejectCall: (callId: string, callFrom: string) => Promise<void>
26
- fetchMessageHistory: (count: number, oldestMsgKey: import("../Types").WAProto.IMessageKey, oldestMsgTimestamp: number | import("long").Long) => Promise<string>
27
- requestPlaceholderResend: (messageKey: import("../Types").WAProto.IMessageKey) => Promise<string | undefined>
28
- getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>
29
- assertSessions: (jids: string[], force: boolean) => Promise<boolean>
30
- relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>
31
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>
32
- sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>
33
- readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>
34
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>
35
- waUploadToServer: import("../Types").WAMediaUploadFunction
36
- fetchPrivacySettings: (force?: boolean) => Promise<{
37
- [_: string]: string
38
- }>
39
- sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>
40
- createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
41
- [key: string]: string
42
- } | undefined) => Promise<{
43
- nodes: BinaryNode[]
44
- shouldIncludeDeviceIdentity: boolean
45
- }>
46
- profilePictureUrl: (jid: string) => Promise<string>
47
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>
48
- getEphemeralGroup: (jid: string) => Promise<number>
49
- updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>
50
- sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
51
- sendAlbumMessage: (jid: string, medias: import("../Types").WAProto.IMessage, options?: import("../Types").MiscMessageGenerationOptions) => Promise<string>
52
- sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>
53
- groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
54
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
55
- groupLeave: (id: string) => Promise<void>
56
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>
57
- groupRequestParticipantsList: (jid: string) => Promise<{
58
- [key: string]: string
59
- }[]>
60
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
61
- status: string
62
- jid: string
63
- }[]>
64
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
65
- status: string
66
- jid: string
67
- content: BinaryNode
68
- }[]>
69
- subscribeNewsletterUpdates: (jid: string) => Promise<{
70
- duration: string
71
- }>
72
- newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>
73
- newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
74
- newsletterUpdateName: (jid: string, name: string) => Promise<void>
75
- newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
76
- newsletterRemovePicture: (jid: string) => Promise<void>
77
- newsletterUnfollow: (jid: string) => Promise<void>
78
- newsletterFollow: (jid: string) => Promise<void>
79
- newsletterUnmute: (jid: string) => Promise<void>
80
- newsletterMute: (jid: string) => Promise<void>
81
- newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>
82
- newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
83
- newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
84
- newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
85
- newsletterAdminCount: (jid: string) => Promise<number>
86
- newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
87
- newsletterDemote: (jid: string, userLid: string) => Promise<void>
88
- newsletterDelete: (jid: string) => Promise<void>
89
- newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>
90
- newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
91
- newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
92
- groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
93
- groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
94
- groupInviteCode: (jid: string) => Promise<string | undefined>
95
- groupRevokeInvite: (jid: string) => Promise<string | undefined>
96
- groupAcceptInvite: (code: string) => Promise<string | undefined>
97
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
98
- groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>
99
- groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
100
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
101
- groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
102
- groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
103
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
104
- groupFetchAllParticipating: () => Promise<{
105
- [_: string]: import("../Types").GroupMetadata
106
- }>
107
- processingMutex: {
108
- mutex<T>(code: () => T | Promise<T>): Promise<T>
109
- }
110
- upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
111
- appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
112
- sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
113
- presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
114
- getBotListV2: () => Promise<BotListInfo[]>
115
- getLidUser: (jid: string) => Promise<{
116
- lid: string
117
- id: string
118
- }[] | undefined>
119
- onWhatsApp: (...jids: string[]) => Promise<{
120
- jid: string
121
- exists: unknown
122
- }[] | undefined>
123
- fetchBlocklist: () => Promise<string[]>
124
- fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
125
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
126
- updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
127
- removeProfilePicture: (jid: string) => Promise<void>
128
- updateProfileStatus: (status: string) => Promise<void>
129
- updateProfileName: (name: string) => Promise<void>
130
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
131
- updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
132
- updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
133
- updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
134
- updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
135
- updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
136
- updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
137
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
138
- updateDefaultDisappearingMode: (duration: number) => Promise<void>
139
- getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
140
- resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
141
- chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
142
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
143
- addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
144
- addChatLabel: (jid: string, labelId: string) => Promise<void>
145
- removeChatLabel: (jid: string, labelId: string) => Promise<void>
146
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
147
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
148
- clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
149
- star: (jid: string, messages: {
150
- id: string
151
- fromMe?: boolean | undefined
152
- }[], star: boolean) => Promise<void>
153
- executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
154
- type: "md"
155
- ws: import("./Client").WebSocketClient
156
- ev: import("../Types").BaileysEventEmitter & {
157
- process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
158
- buffer(): void
159
- createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
160
- flush(force?: boolean | undefined): boolean
161
- isBuffering(): boolean
162
- }
163
- authState: {
164
- creds: import("../Types").AuthenticationCreds
165
- keys: import("../Types").SignalKeyStoreWithTransaction
166
- }
167
- signalRepository: import("../Types").SignalRepository
168
- user: import("../Types").Contact | undefined
169
- generateMessageTag: () => string
170
- query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
171
- waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
172
- waitForSocketOpen: () => Promise<void>
173
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
174
- sendNode: (frame: BinaryNode) => Promise<void>
175
- logout: (msg?: string | undefined) => Promise<void>
176
- end: (error: Error | undefined) => void
177
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
178
- uploadPreKeys: (count?: number) => Promise<void>
179
- uploadPreKeysToServerIfRequired: () => Promise<void>
180
- requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
181
- waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
182
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
1
+ import { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig } from '../Types'
2
+ import { BinaryNode } from '../WABinary'
3
+
4
+ export declare const makeBusinessSocket: (config: SocketConfig) => {
5
+ logger: import("../Utils/logger").ILogger
6
+ getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>
7
+ getCatalog: ({ jid, limit, cursor }: GetCatalogOptions) => Promise<{
8
+ products: import("../Types").Product[]
9
+ nextPageCursor: string | undefined
10
+ }>
11
+ getCollections: (jid?: string, limit?: number) => Promise<{
12
+ collections: import("../Types").CatalogCollection[]
13
+ }>
14
+ productCreate: (create: ProductCreate) => Promise<import("../Types").Product>
15
+ productDelete: (productIds: string[]) => Promise<{
16
+ deleted: number
17
+ }>
18
+ productUpdate: (productId: string, update: ProductUpdate) => Promise<import("../Types").Product>
19
+ sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number | undefined) => Promise<void>
20
+ sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>
21
+ offerCall: (toJid: string, isVideo?: boolean) => Promise<{
22
+ id: any
23
+ to: string
24
+ }>
25
+ rejectCall: (callId: string, callFrom: string) => Promise<void>
26
+ fetchMessageHistory: (count: number, oldestMsgKey: import("../Types").WAProto.IMessageKey, oldestMsgTimestamp: number | import("long").Long) => Promise<string>
27
+ requestPlaceholderResend: (messageKey: import("../Types").WAProto.IMessageKey) => Promise<string | undefined>
28
+ getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>
29
+ assertSessions: (jids: string[], force: boolean) => Promise<boolean>
30
+ relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>
31
+ sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>
32
+ sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>
33
+ readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>
34
+ refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>
35
+ waUploadToServer: import("../Types").WAMediaUploadFunction
36
+ fetchPrivacySettings: (force?: boolean) => Promise<{
37
+ [_: string]: string
38
+ }>
39
+ sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>
40
+ createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
41
+ [key: string]: string
42
+ } | undefined) => Promise<{
43
+ nodes: BinaryNode[]
44
+ shouldIncludeDeviceIdentity: boolean
45
+ }>
46
+ profilePictureUrl: (jid: string) => Promise<string>
47
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>
48
+ getEphemeralGroup: (jid: string) => Promise<number>
49
+ updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>
50
+ sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
51
+ sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>
52
+ groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
53
+ groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
54
+ groupLeave: (id: string) => Promise<void>
55
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>
56
+ groupRequestParticipantsList: (jid: string) => Promise<{
57
+ [key: string]: string
58
+ }[]>
59
+ groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
60
+ status: string
61
+ jid: string
62
+ }[]>
63
+ groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
64
+ status: string
65
+ jid: string
66
+ content: BinaryNode
67
+ }[]>
68
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
69
+ duration: string
70
+ }>
71
+ newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>
72
+ newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
73
+ newsletterUpdateName: (jid: string, name: string) => Promise<void>
74
+ newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
75
+ newsletterRemovePicture: (jid: string) => Promise<void>
76
+ newsletterUnfollow: (jid: string) => Promise<void>
77
+ newsletterFollow: (jid: string) => Promise<void>
78
+ newsletterUnmute: (jid: string) => Promise<void>
79
+ newsletterMute: (jid: string) => Promise<void>
80
+ newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>
81
+ newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
82
+ newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
83
+ newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
84
+ newsletterFetchAllParticipating: () => Promise<{
85
+ [_: string]: import("../Types").NewsletterMetadata
86
+ }>
87
+ newsletterAdminCount: (jid: string) => Promise<number>
88
+ newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
89
+ newsletterDemote: (jid: string, userLid: string) => Promise<void>
90
+ newsletterDelete: (jid: string) => Promise<void>
91
+ newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>
92
+ newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
93
+ newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
94
+ groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
95
+ groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
96
+ groupInviteCode: (jid: string) => Promise<string | undefined>
97
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>
98
+ groupAcceptInvite: (code: string) => Promise<string | undefined>
99
+ groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
100
+ groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>
101
+ groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
102
+ groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
103
+ groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
104
+ groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
105
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
106
+ groupFetchAllParticipating: () => Promise<{
107
+ [_: string]: import("../Types").GroupMetadata
108
+ }>
109
+ processingMutex: {
110
+ mutex<T>(code: () => T | Promise<T>): Promise<T>
111
+ }
112
+ upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
113
+ appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
114
+ sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
115
+ presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
116
+ getBotListV2: () => Promise<BotListInfo[]>
117
+ getLidUser: (jid: string) => Promise<{
118
+ lid: string
119
+ id: string
120
+ }[] | undefined>
121
+ onWhatsApp: (...jids: string[]) => Promise<{
122
+ jid: string
123
+ exists: unknown
124
+ }[] | undefined>
125
+ fetchBlocklist: () => Promise<string[]>
126
+ fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
127
+ fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
128
+ updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
129
+ removeProfilePicture: (jid: string) => Promise<void>
130
+ updateProfileStatus: (status: string) => Promise<void>
131
+ updateProfileName: (name: string) => Promise<void>
132
+ updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
133
+ updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
134
+ updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
135
+ updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
136
+ updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
137
+ updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
138
+ updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
139
+ updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
140
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>
141
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
142
+ getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
143
+ resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
144
+ chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
145
+ cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
146
+ addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
147
+ addChatLabel: (jid: string, labelId: string) => Promise<void>
148
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>
149
+ addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
150
+ removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
151
+ clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
152
+ star: (jid: string, messages: {
153
+ id: string
154
+ fromMe?: boolean | undefined
155
+ }[], star: boolean) => Promise<void>
156
+ executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
157
+ type: "md"
158
+ ws: import("./Client").WebSocketClient
159
+ ev: import("../Types").BaileysEventEmitter & {
160
+ process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
161
+ buffer(): void
162
+ createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
163
+ flush(force?: boolean | undefined): boolean
164
+ isBuffering(): boolean
165
+ }
166
+ authState: {
167
+ creds: import("../Types").AuthenticationCreds
168
+ keys: import("../Types").SignalKeyStoreWithTransaction
169
+ }
170
+ signalRepository: import("../Types").SignalRepository
171
+ user: import("../Types").Contact | undefined
172
+ generateMessageTag: () => string
173
+ query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
174
+ waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
175
+ waitForSocketOpen: () => Promise<void>
176
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
177
+ sendNode: (frame: BinaryNode) => Promise<void>
178
+ logout: (msg?: string | undefined) => Promise<void>
179
+ end: (error: Error | undefined) => void
180
+ onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
181
+ uploadPreKeys: (count?: number) => Promise<void>
182
+ uploadPreKeysToServerIfRequired: () => Promise<void>
183
+ requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
184
+ waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
185
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
183
186
  }