nrx-bails 0.0.1

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 (199) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1541 -0
  3. package/WAProto/GenerateStatics.sh +4 -0
  4. package/WAProto/WAProto.proto +4775 -0
  5. package/WAProto/index.d.ts +2 -0
  6. package/WAProto/index.js +169661 -0
  7. package/lib/Defaults/index.d.ts +113 -0
  8. package/lib/Defaults/index.js +156 -0
  9. package/lib/Defaults/phonenumber-mcc.json +223 -0
  10. package/lib/Defaults/ye-bail-version.json +3 -0
  11. package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
  12. package/lib/Signal/Group/ciphertext-message.js +41 -0
  13. package/lib/Signal/Group/group-session-builder.d.ts +8 -0
  14. package/lib/Signal/Group/group-session-builder.js +90 -0
  15. package/lib/Signal/Group/group_cipher.d.ts +12 -0
  16. package/lib/Signal/Group/group_cipher.js +122 -0
  17. package/lib/Signal/Group/index.d.ts +22 -0
  18. package/lib/Signal/Group/index.js +83 -0
  19. package/lib/Signal/Group/keyhelper.d.ts +7 -0
  20. package/lib/Signal/Group/keyhelper.js +81 -0
  21. package/lib/Signal/Group/queue-job.d.ts +3 -0
  22. package/lib/Signal/Group/queue-job.js +83 -0
  23. package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
  24. package/lib/Signal/Group/sender-chain-key.js +60 -0
  25. package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
  26. package/lib/Signal/Group/sender-key-distribution-message.js +92 -0
  27. package/lib/Signal/Group/sender-key-message.d.ts +19 -0
  28. package/lib/Signal/Group/sender-key-message.js +95 -0
  29. package/lib/Signal/Group/sender-key-name.d.ts +12 -0
  30. package/lib/Signal/Group/sender-key-name.js +77 -0
  31. package/lib/Signal/Group/sender-key-record.d.ts +13 -0
  32. package/lib/Signal/Group/sender-key-record.js +79 -0
  33. package/lib/Signal/Group/sender-key-state.d.ts +17 -0
  34. package/lib/Signal/Group/sender-key-state.js +125 -0
  35. package/lib/Signal/Group/sender-message-key.d.ts +12 -0
  36. package/lib/Signal/Group/sender-message-key.js +55 -0
  37. package/lib/Signal/libsignal.d.ts +37 -0
  38. package/lib/Signal/libsignal.js +200 -0
  39. package/lib/Socket/Client/index.d.ts +1 -0
  40. package/lib/Socket/Client/index.js +44 -0
  41. package/lib/Socket/Client/types.d.ts +7 -0
  42. package/lib/Socket/Client/types.js +39 -0
  43. package/lib/Socket/Client/websocket.d.ts +19 -0
  44. package/lib/Socket/Client/websocket.js +137 -0
  45. package/lib/Socket/business.d.ts +329 -0
  46. package/lib/Socket/business.js +286 -0
  47. package/lib/Socket/chats.d.ts +84 -0
  48. package/lib/Socket/chats.js +1022 -0
  49. package/lib/Socket/groups.d.ts +216 -0
  50. package/lib/Socket/groups.js +358 -0
  51. package/lib/Socket/index.d.ts +330 -0
  52. package/lib/Socket/index.js +36 -0
  53. package/lib/Socket/messages-recv.d.ts +271 -0
  54. package/lib/Socket/messages-recv.js +1079 -0
  55. package/lib/Socket/messages-send.d.ts +258 -0
  56. package/lib/Socket/messages-send.js +1190 -0
  57. package/lib/Socket/newsletter.d.ts +253 -0
  58. package/lib/Socket/newsletter.js +362 -0
  59. package/lib/Socket/registration.d.ts +361 -0
  60. package/lib/Socket/registration.js +179 -0
  61. package/lib/Socket/socket.d.ts +33 -0
  62. package/lib/Socket/socket.js +699 -0
  63. package/lib/Socket/usync.d.ts +27 -0
  64. package/lib/Socket/usync.js +96 -0
  65. package/lib/Store/index.d.ts +3 -0
  66. package/lib/Store/index.js +36 -0
  67. package/lib/Store/make-cache-manager-auth-state.d.ts +16 -0
  68. package/lib/Store/make-cache-manager-auth-state.js +118 -0
  69. package/lib/Store/make-in-memory-store.d.ts +64 -0
  70. package/lib/Store/make-in-memory-store.js +465 -0
  71. package/lib/Store/make-ordered-dictionary.d.ts +14 -0
  72. package/lib/Store/make-ordered-dictionary.js +107 -0
  73. package/lib/Store/object-repository.d.ts +11 -0
  74. package/lib/Store/object-repository.js +53 -0
  75. package/lib/Types/Auth.d.ts +1 -0
  76. package/lib/Types/Auth.js +28 -0
  77. package/lib/Types/Call.d.ts +1 -0
  78. package/lib/Types/Call.js +28 -0
  79. package/lib/Types/Chat.d.ts +2 -0
  80. package/lib/Types/Chat.js +30 -0
  81. package/lib/Types/Contact.d.ts +1 -0
  82. package/lib/Types/Contact.js +28 -0
  83. package/lib/Types/Events.d.ts +1 -0
  84. package/lib/Types/Events.js +28 -0
  85. package/lib/Types/GroupMetadata.d.ts +1 -0
  86. package/lib/Types/GroupMetadata.js +28 -0
  87. package/lib/Types/Label.d.ts +2 -0
  88. package/lib/Types/Label.js +53 -0
  89. package/lib/Types/LabelAssociation.d.ts +2 -0
  90. package/lib/Types/LabelAssociation.js +35 -0
  91. package/lib/Types/Message.d.ts +2 -0
  92. package/lib/Types/Message.js +33 -0
  93. package/lib/Types/Newsletter.d.ts +4 -0
  94. package/lib/Types/Newsletter.js +62 -0
  95. package/lib/Types/Product.d.ts +1 -0
  96. package/lib/Types/Product.js +28 -0
  97. package/lib/Types/Signal.d.ts +1 -0
  98. package/lib/Types/Signal.js +28 -0
  99. package/lib/Types/Socket.d.ts +1 -0
  100. package/lib/Types/Socket.js +28 -0
  101. package/lib/Types/State.d.ts +1 -0
  102. package/lib/Types/State.js +28 -0
  103. package/lib/Types/USync.d.ts +1 -0
  104. package/lib/Types/USync.js +28 -0
  105. package/lib/Types/index.d.ts +2 -0
  106. package/lib/Types/index.js +68 -0
  107. package/lib/Utils/auth-utils.d.ts +63 -0
  108. package/lib/Utils/auth-utils.js +248 -0
  109. package/lib/Utils/browser-utils.d.ts +3 -0
  110. package/lib/Utils/browser-utils.js +61 -0
  111. package/lib/Utils/business.d.ts +53 -0
  112. package/lib/Utils/business.js +260 -0
  113. package/lib/Utils/chat-utils.d.ts +253 -0
  114. package/lib/Utils/chat-utils.js +756 -0
  115. package/lib/Utils/crypto.d.ts +43 -0
  116. package/lib/Utils/crypto.js +219 -0
  117. package/lib/Utils/decode-wa-message.d.ts +61 -0
  118. package/lib/Utils/decode-wa-message.js +233 -0
  119. package/lib/Utils/event-buffer.d.ts +17 -0
  120. package/lib/Utils/event-buffer.js +544 -0
  121. package/lib/Utils/generics.d.ts +89 -0
  122. package/lib/Utils/generics.js +471 -0
  123. package/lib/Utils/history.d.ts +59 -0
  124. package/lib/Utils/history.js +120 -0
  125. package/lib/Utils/index.d.ts +1 -0
  126. package/lib/Utils/index.js +61 -0
  127. package/lib/Utils/link-preview.d.ts +19 -0
  128. package/lib/Utils/link-preview.js +152 -0
  129. package/lib/Utils/logger.d.ts +3 -0
  130. package/lib/Utils/logger.js +33 -0
  131. package/lib/Utils/lt-hash.d.ts +13 -0
  132. package/lib/Utils/lt-hash.js +77 -0
  133. package/lib/Utils/make-mutex.d.ts +7 -0
  134. package/lib/Utils/make-mutex.js +69 -0
  135. package/lib/Utils/message-retry-manager.d.ts +34 -0
  136. package/lib/Utils/message-retry-manager.js +154 -0
  137. package/lib/Utils/messages-media.d.ts +137 -0
  138. package/lib/Utils/messages-media.js +1024 -0
  139. package/lib/Utils/messages.d.ts +66 -0
  140. package/lib/Utils/messages.js +1407 -0
  141. package/lib/Utils/noise-handler.d.ts +21 -0
  142. package/lib/Utils/noise-handler.js +176 -0
  143. package/lib/Utils/pre-key-manager.d.ts +13 -0
  144. package/lib/Utils/pre-key-manager.js +93 -0
  145. package/lib/Utils/process-message.d.ts +40 -0
  146. package/lib/Utils/process-message.js +430 -0
  147. package/lib/Utils/signal.d.ts +72 -0
  148. package/lib/Utils/signal.js +179 -0
  149. package/lib/Utils/use-multi-file-auth-state.d.ts +18 -0
  150. package/lib/Utils/use-multi-file-auth-state.js +151 -0
  151. package/lib/Utils/validate-connection.d.ts +43 -0
  152. package/lib/Utils/validate-connection.js +255 -0
  153. package/lib/Utils/ye-bail-event-stream.d.ts +16 -0
  154. package/lib/Utils/ye-bail-event-stream.js +89 -0
  155. package/lib/WABinary/constants.d.ts +23 -0
  156. package/lib/WABinary/constants.js +1328 -0
  157. package/lib/WABinary/decode.d.ts +10 -0
  158. package/lib/WABinary/decode.js +291 -0
  159. package/lib/WABinary/encode.d.ts +2 -0
  160. package/lib/WABinary/encode.js +276 -0
  161. package/lib/WABinary/generic-utils.d.ts +16 -0
  162. package/lib/WABinary/generic-utils.js +155 -0
  163. package/lib/WABinary/index.d.ts +1 -0
  164. package/lib/WABinary/index.js +47 -0
  165. package/lib/WABinary/jid-utils.d.ts +34 -0
  166. package/lib/WABinary/jid-utils.js +111 -0
  167. package/lib/WABinary/types.d.ts +1 -0
  168. package/lib/WABinary/types.js +28 -0
  169. package/lib/WAM/BinaryInfo.d.ts +8 -0
  170. package/lib/WAM/BinaryInfo.js +39 -0
  171. package/lib/WAM/constants.d.ts +35374 -0
  172. package/lib/WAM/constants.js +15376 -0
  173. package/lib/WAM/encode.d.ts +2 -0
  174. package/lib/WAM/encode.js +181 -0
  175. package/lib/WAM/index.d.ts +1 -0
  176. package/lib/WAM/index.js +45 -0
  177. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +14 -0
  178. package/lib/WAUSync/Protocols/USyncContactProtocol.js +58 -0
  179. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
  180. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +83 -0
  181. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
  182. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +56 -0
  183. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
  184. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +68 -0
  185. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +39 -0
  186. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +79 -0
  187. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
  188. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +50 -0
  189. package/lib/WAUSync/Protocols/index.d.ts +1 -0
  190. package/lib/WAUSync/Protocols/index.js +46 -0
  191. package/lib/WAUSync/USyncQuery.d.ts +20 -0
  192. package/lib/WAUSync/USyncQuery.js +115 -0
  193. package/lib/WAUSync/USyncUser.d.ts +13 -0
  194. package/lib/WAUSync/USyncUser.js +52 -0
  195. package/lib/WAUSync/index.d.ts +1 -0
  196. package/lib/WAUSync/index.js +45 -0
  197. package/lib/index.js +81 -0
  198. package/package.json +113 -0
  199. package/requirements.js +32 -0
@@ -0,0 +1,330 @@
1
+ export const __esModule: boolean;
2
+ export default makeWASocket;
3
+ declare function makeWASocket(config: any): {
4
+ logger: any;
5
+ getOrderDetails: (orderId: any, tokenBase64: any) => Promise<{
6
+ price: {
7
+ total: number;
8
+ currency: any;
9
+ };
10
+ products: any;
11
+ }>;
12
+ getCatalog: ({ jid, limit, cursor }: {
13
+ jid: any;
14
+ limit: any;
15
+ cursor: any;
16
+ }) => Promise<{
17
+ products: any;
18
+ nextPageCursor: any;
19
+ }>;
20
+ getCollections: (jid: any, limit?: number) => Promise<{
21
+ collections: any;
22
+ }>;
23
+ productCreate: (create: any) => Promise<{
24
+ id: any;
25
+ imageUrls: {
26
+ requested: any;
27
+ original: any;
28
+ };
29
+ reviewStatus: {
30
+ whatsapp: any;
31
+ };
32
+ availability: string;
33
+ name: any;
34
+ retailerId: any;
35
+ url: any;
36
+ description: any;
37
+ price: number;
38
+ currency: any;
39
+ isHidden: boolean;
40
+ }>;
41
+ productDelete: (productIds: any) => Promise<{
42
+ deleted: number;
43
+ }>;
44
+ productUpdate: (productId: any, update: any) => Promise<{
45
+ id: any;
46
+ imageUrls: {
47
+ requested: any;
48
+ original: any;
49
+ };
50
+ reviewStatus: {
51
+ whatsapp: any;
52
+ };
53
+ availability: string;
54
+ name: any;
55
+ retailerId: any;
56
+ url: any;
57
+ description: any;
58
+ price: number;
59
+ currency: any;
60
+ isHidden: boolean;
61
+ }>;
62
+ sendMessageAck: ({ tag, attrs, content }: {
63
+ tag: any;
64
+ attrs: any;
65
+ content: any;
66
+ }, errorCode: any) => Promise<void>;
67
+ sendRetryRequest: (node: any, forceIncludeKeys?: boolean) => Promise<void>;
68
+ rejectCall: (callId: any, callFrom: any) => Promise<void>;
69
+ offerCall: (toJid: any, isVideo?: boolean) => Promise<{
70
+ callId: string;
71
+ toJid: any;
72
+ isVideo: boolean;
73
+ }>;
74
+ fetchMessageHistory: (count: any, oldestMsgKey: any, oldestMsgTimestamp: any) => Promise<any>;
75
+ requestPlaceholderResend: (messageKey: any) => Promise<any>;
76
+ getPrivacyTokens: (jids: any) => Promise<any>;
77
+ assertSessions: (jids: any, force: any) => Promise<boolean>;
78
+ relayMessage: (jid: any, message: any, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: {
79
+ messageId: any;
80
+ participant: any;
81
+ additionalAttributes: any;
82
+ additionalNodes: any;
83
+ useUserDevicesCache: any;
84
+ useCachedGroupMetadata: any;
85
+ statusJidList: any;
86
+ }) => Promise<any>;
87
+ sendReceipt: (jid: any, participant: any, messageIds: any, type: any) => Promise<void>;
88
+ sendReceipts: (keys: any, type: any) => Promise<void>;
89
+ readMessages: (keys: any) => Promise<void>;
90
+ refreshMediaConn: (forceGet?: boolean) => Promise<any>;
91
+ waUploadToServer: any;
92
+ fetchPrivacySettings: (force?: boolean) => Promise<any>;
93
+ getUSyncDevices: (jids: any, useCache: any, ignoreZeroDevices: any) => Promise<any[]>;
94
+ createParticipantNodes: (jids: any, message: any, extraAttrs: any) => Promise<{
95
+ nodes: any[];
96
+ shouldIncludeDeviceIdentity: boolean;
97
+ }>;
98
+ sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
99
+ updateMediaMessage: (message: any) => Promise<any>;
100
+ sendMessage: (jid: any, content: any, options?: {}) => Promise<any>;
101
+ newsletterFetchAllSubscribe: () => Promise<any>;
102
+ subscribeNewsletterUpdates: (jid: any) => Promise<any>;
103
+ newsletterReactionMode: (jid: any, mode: any) => Promise<void>;
104
+ newsletterUpdateDescription: (jid: any, description: any) => Promise<void>;
105
+ newsletterId: (url: any) => Promise<string>;
106
+ newsletterUpdateName: (jid: any, name: any) => Promise<void>;
107
+ newsletterUpdatePicture: (jid: any, content: any) => Promise<void>;
108
+ newsletterRemovePicture: (jid: any) => Promise<void>;
109
+ newsletterUnfollow: (jid: any) => Promise<void>;
110
+ newsletterFollow: (jid: any) => Promise<void>;
111
+ newsletterUnmute: (jid: any) => Promise<void>;
112
+ newsletterMute: (jid: any) => Promise<void>;
113
+ newsletterAction: (jid: any, type: any) => Promise<void>;
114
+ newsletterCreate: (name: any, description: any, reaction_codes: any) => Promise<{
115
+ id: any;
116
+ state: any;
117
+ creation_time: number;
118
+ name: any;
119
+ nameTime: number;
120
+ description: any;
121
+ descriptionTime: number;
122
+ invite: any;
123
+ picture: any;
124
+ preview: any;
125
+ reaction_codes: any;
126
+ subscribers: number;
127
+ verification: any;
128
+ viewer_metadata: any;
129
+ }>;
130
+ newsletterMetadata: (type: any, key: any, role: any) => Promise<{
131
+ id: any;
132
+ state: any;
133
+ creation_time: number;
134
+ name: any;
135
+ nameTime: number;
136
+ description: any;
137
+ descriptionTime: number;
138
+ invite: any;
139
+ picture: any;
140
+ preview: any;
141
+ reaction_codes: any;
142
+ subscribers: number;
143
+ verification: any;
144
+ viewer_metadata: any;
145
+ }>;
146
+ newsletterAdminCount: (jid: any) => Promise<any>;
147
+ newsletterChangeOwner: (jid: any, user: any) => Promise<void>;
148
+ newsletterPromote: (jid: any, user: any) => Promise<void>;
149
+ newsletterDemote: (jid: any, user: any) => Promise<void>;
150
+ newsletterDelete: (jid: any) => Promise<void>;
151
+ newsletterReactMessage: (jid: any, serverId: any, code: any) => Promise<void>;
152
+ newsletterFetchMessages: (type: any, key: any, count: any, after: any, since: any) => Promise<any>;
153
+ newsletterFetchUpdates: (jid: any, count: any, after: any, since: any) => Promise<any>;
154
+ newsletterSubscribers: (jid: any) => Promise<any>;
155
+ groupQuery: (jid: any, type: any, content: any) => Promise<any>;
156
+ groupMetadata: (jid: any) => Promise<{
157
+ desc: any;
158
+ descId: any;
159
+ descOwner: any;
160
+ descOwnerLid: any;
161
+ descTime: number;
162
+ linkedParent: any;
163
+ restrict: boolean;
164
+ announce: boolean;
165
+ isCommunity: boolean;
166
+ isCommunityAnnounce: boolean;
167
+ joinApprovalMode: boolean;
168
+ memberAddMode: boolean;
169
+ participants: any;
170
+ ephemeralDuration: number;
171
+ ownerLid?: any;
172
+ subjectTime: number;
173
+ size: any;
174
+ creation: number;
175
+ owner: any;
176
+ subjectOwnerLid?: any;
177
+ id: any;
178
+ addressingMode: any;
179
+ subject: any;
180
+ subjectOwner: any;
181
+ }>;
182
+ groupCreate: (subject: any, participants: any) => Promise<{
183
+ desc: any;
184
+ descId: any;
185
+ descOwner: any;
186
+ descOwnerLid: any;
187
+ descTime: number;
188
+ linkedParent: any;
189
+ restrict: boolean;
190
+ announce: boolean;
191
+ isCommunity: boolean;
192
+ isCommunityAnnounce: boolean;
193
+ joinApprovalMode: boolean;
194
+ memberAddMode: boolean;
195
+ participants: any;
196
+ ephemeralDuration: number;
197
+ ownerLid?: any;
198
+ subjectTime: number;
199
+ size: any;
200
+ creation: number;
201
+ owner: any;
202
+ subjectOwnerLid?: any;
203
+ id: any;
204
+ addressingMode: any;
205
+ subject: any;
206
+ subjectOwner: any;
207
+ }>;
208
+ groupLeave: (id: any) => Promise<void>;
209
+ groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
210
+ groupRequestParticipantsList: (jid: any) => Promise<any>;
211
+ groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
212
+ groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
213
+ groupUpdateDescription: (jid: any, description: any) => Promise<void>;
214
+ groupInviteCode: (jid: any) => Promise<any>;
215
+ groupRevokeInvite: (jid: any) => Promise<any>;
216
+ groupAcceptInvite: (code: any) => Promise<any>;
217
+ groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
218
+ groupAcceptInviteV4: any;
219
+ groupGetInviteInfo: (code: any) => Promise<{
220
+ desc: any;
221
+ descId: any;
222
+ descOwner: any;
223
+ descOwnerLid: any;
224
+ descTime: number;
225
+ linkedParent: any;
226
+ restrict: boolean;
227
+ announce: boolean;
228
+ isCommunity: boolean;
229
+ isCommunityAnnounce: boolean;
230
+ joinApprovalMode: boolean;
231
+ memberAddMode: boolean;
232
+ participants: any;
233
+ ephemeralDuration: number;
234
+ ownerLid?: any;
235
+ subjectTime: number;
236
+ size: any;
237
+ creation: number;
238
+ owner: any;
239
+ subjectOwnerLid?: any;
240
+ id: any;
241
+ addressingMode: any;
242
+ subject: any;
243
+ subjectOwner: any;
244
+ }>;
245
+ groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
246
+ groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
247
+ groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
248
+ groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
249
+ groupFetchAllParticipating: () => Promise<{}>;
250
+ createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
251
+ getBotListV2: () => Promise<{
252
+ jid: any;
253
+ personaId: any;
254
+ }[]>;
255
+ processingMutex: {
256
+ mutex(code: any): Promise<void>;
257
+ };
258
+ upsertMessage: any;
259
+ appPatch: (patchCreate: any) => Promise<void>;
260
+ sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
261
+ presenceSubscribe: (toJid: any, tcToken: any) => Promise<void>;
262
+ profilePictureUrl: (jid: any, type: string, timeoutMs: any) => Promise<any>;
263
+ onWhatsApp: (...jids: any[]) => Promise<any>;
264
+ fetchBlocklist: () => Promise<any>;
265
+ fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
266
+ fetchStatus: (...jids: any[]) => Promise<any>;
267
+ updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise<void>;
268
+ removeProfilePicture: (jid: any) => Promise<void>;
269
+ updateProfileStatus: (status: any) => Promise<void>;
270
+ updateProfileName: (name: any) => Promise<void>;
271
+ updateBlockStatus: (jid: any, action: any) => Promise<void>;
272
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise<void>;
273
+ updateCallPrivacy: (value: any) => Promise<void>;
274
+ updateMessagesPrivacy: (value: any) => Promise<void>;
275
+ updateLastSeenPrivacy: (value: any) => Promise<void>;
276
+ updateOnlinePrivacy: (value: any) => Promise<void>;
277
+ updateProfilePicturePrivacy: (value: any) => Promise<void>;
278
+ updateStatusPrivacy: (value: any) => Promise<void>;
279
+ updateReadReceiptsPrivacy: (value: any) => Promise<void>;
280
+ updateGroupsAddPrivacy: (value: any) => Promise<void>;
281
+ updateDefaultDisappearingMode: (duration: any) => Promise<void>;
282
+ getBusinessProfile: (jid: any) => Promise<{
283
+ wid: any;
284
+ address: any;
285
+ description: any;
286
+ website: any[];
287
+ email: any;
288
+ category: any;
289
+ business_hours: {
290
+ timezone: any;
291
+ business_config: any;
292
+ };
293
+ }>;
294
+ resyncAppState: any;
295
+ chatModify: (mod: any, jid: any) => Promise<void>;
296
+ cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
297
+ addOrEditContact: (jid: any, contact: any) => Promise<void>;
298
+ removeContact: (jid: any) => Promise<void>;
299
+ addLabel: (jid: any, labels: any) => Promise<void>;
300
+ addChatLabel: (jid: any, labelId: any) => Promise<void>;
301
+ removeChatLabel: (jid: any, labelId: any) => Promise<void>;
302
+ addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
303
+ removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
304
+ star: (jid: any, messages: any, star: any) => Promise<void>;
305
+ checkWhatsApp: (jid: any) => Promise<string>;
306
+ executeUSyncQuery: (usyncQuery: any) => Promise<any>;
307
+ type: string;
308
+ ws: any;
309
+ ev: any;
310
+ authState: {
311
+ creds: any;
312
+ keys: any;
313
+ };
314
+ signalRepository: any;
315
+ user: any;
316
+ generateMessageTag: () => string;
317
+ query: (node: any, timeoutMs: any) => Promise<any>;
318
+ waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
319
+ waitForSocketOpen: () => Promise<void>;
320
+ sendRawMessage: (data: any) => Promise<void>;
321
+ sendNode: (frame: any) => Promise<void>;
322
+ logout: (msg: any) => Promise<void>;
323
+ end: (error: any) => void;
324
+ onUnexpectedError: (err: any, msg: any) => void;
325
+ uploadPreKeys: (count?: 812) => Promise<void>;
326
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
327
+ requestPairingCode: (phoneNumber: any, pairCode?: string) => Promise<any>;
328
+ waitForConnectionUpdate: any;
329
+ sendWAMBuffer: (wamBuffer: any) => Promise<any>;
330
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * ╔═══════════════════════════════════════════════════════════╗
3
+ * ║ NEROX - WhatsApp API Library ║
4
+ * ║ Premium Edition ║
5
+ * ╚═══════════════════════════════════════════════════════════╝
6
+ *
7
+ * @package nerox-bails
8
+ * @version 0.1
9
+ * @author NEROX Development Team
10
+ * @copyright Copyright (c) 2025 NEROX. All rights reserved.
11
+ * @license MIT License
12
+ *
13
+ * Permission is hereby granted, free of charge, to any person obtaining
14
+ * a copy of this software and associated documentation files (the "Software"),
15
+ * to deal in the Software without restriction, including without limitation
16
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17
+ * and/or sell copies of the Software, and to permit persons to whom the
18
+ * Software is furnished to do so, subject to the following conditions:
19
+ *
20
+ * The above copyright notice and this permission notice shall be included
21
+ * in all copies or substantial portions of the Software.
22
+ *
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26
+ */
27
+ "use strict";
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const Defaults_1 = require("../Defaults");
30
+ const business_1 = require("./business");
31
+
32
+ const makeWASocket = (config) => ((0, business_1.makeBusinessSocket)({
33
+ ...Defaults_1.DEFAULT_CONNECTION_CONFIG,
34
+ ...config
35
+ }));
36
+ exports.default = makeWASocket;
@@ -0,0 +1,271 @@
1
+ export const __esModule: boolean;
2
+ export function makeMessagesRecvSocket(config: any): {
3
+ sendMessageAck: ({ tag, attrs, content }: {
4
+ tag: any;
5
+ attrs: any;
6
+ content: any;
7
+ }, errorCode: any) => Promise<void>;
8
+ sendRetryRequest: (node: any, forceIncludeKeys?: boolean) => Promise<void>;
9
+ rejectCall: (callId: any, callFrom: any) => Promise<void>;
10
+ offerCall: (toJid: any, isVideo?: boolean) => Promise<{
11
+ callId: string;
12
+ toJid: any;
13
+ isVideo: boolean;
14
+ }>;
15
+ fetchMessageHistory: (count: any, oldestMsgKey: any, oldestMsgTimestamp: any) => Promise<any>;
16
+ requestPlaceholderResend: (messageKey: any) => Promise<any>;
17
+ getPrivacyTokens: (jids: any) => Promise<any>;
18
+ assertSessions: (jids: any, force: any) => Promise<boolean>;
19
+ relayMessage: (jid: any, message: any, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: {
20
+ messageId: any;
21
+ participant: any;
22
+ additionalAttributes: any;
23
+ additionalNodes: any;
24
+ useUserDevicesCache: any;
25
+ useCachedGroupMetadata: any;
26
+ statusJidList: any;
27
+ }) => Promise<any>;
28
+ sendReceipt: (jid: any, participant: any, messageIds: any, type: any) => Promise<void>;
29
+ sendReceipts: (keys: any, type: any) => Promise<void>;
30
+ readMessages: (keys: any) => Promise<void>;
31
+ refreshMediaConn: (forceGet?: boolean) => Promise<any>;
32
+ waUploadToServer: any;
33
+ fetchPrivacySettings: (force?: boolean) => Promise<any>;
34
+ getUSyncDevices: (jids: any, useCache: any, ignoreZeroDevices: any) => Promise<any[]>;
35
+ createParticipantNodes: (jids: any, message: any, extraAttrs: any) => Promise<{
36
+ nodes: any[];
37
+ shouldIncludeDeviceIdentity: boolean;
38
+ }>;
39
+ sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
40
+ updateMediaMessage: (message: any) => Promise<any>;
41
+ sendMessage: (jid: any, content: any, options?: {}) => Promise<any>;
42
+ newsletterFetchAllSubscribe: () => Promise<any>;
43
+ subscribeNewsletterUpdates: (jid: any) => Promise<any>;
44
+ newsletterReactionMode: (jid: any, mode: any) => Promise<void>;
45
+ newsletterUpdateDescription: (jid: any, description: any) => Promise<void>;
46
+ newsletterId: (url: any) => Promise<string>;
47
+ newsletterUpdateName: (jid: any, name: any) => Promise<void>;
48
+ newsletterUpdatePicture: (jid: any, content: any) => Promise<void>;
49
+ newsletterRemovePicture: (jid: any) => Promise<void>;
50
+ newsletterUnfollow: (jid: any) => Promise<void>;
51
+ newsletterFollow: (jid: any) => Promise<void>;
52
+ newsletterUnmute: (jid: any) => Promise<void>;
53
+ newsletterMute: (jid: any) => Promise<void>;
54
+ newsletterAction: (jid: any, type: any) => Promise<void>;
55
+ newsletterCreate: (name: any, description: any, reaction_codes: any) => Promise<{
56
+ id: any;
57
+ state: any;
58
+ creation_time: number;
59
+ name: any;
60
+ nameTime: number;
61
+ description: any;
62
+ descriptionTime: number;
63
+ invite: any;
64
+ picture: any;
65
+ preview: any;
66
+ reaction_codes: any;
67
+ subscribers: number;
68
+ verification: any;
69
+ viewer_metadata: any;
70
+ }>;
71
+ newsletterMetadata: (type: any, key: any, role: any) => Promise<{
72
+ id: any;
73
+ state: any;
74
+ creation_time: number;
75
+ name: any;
76
+ nameTime: number;
77
+ description: any;
78
+ descriptionTime: number;
79
+ invite: any;
80
+ picture: any;
81
+ preview: any;
82
+ reaction_codes: any;
83
+ subscribers: number;
84
+ verification: any;
85
+ viewer_metadata: any;
86
+ }>;
87
+ newsletterAdminCount: (jid: any) => Promise<any>;
88
+ newsletterChangeOwner: (jid: any, user: any) => Promise<void>;
89
+ newsletterPromote: (jid: any, user: any) => Promise<void>;
90
+ newsletterDemote: (jid: any, user: any) => Promise<void>;
91
+ newsletterDelete: (jid: any) => Promise<void>;
92
+ newsletterReactMessage: (jid: any, serverId: any, code: any) => Promise<void>;
93
+ newsletterFetchMessages: (type: any, key: any, count: any, after: any, since: any) => Promise<any>;
94
+ newsletterFetchUpdates: (jid: any, count: any, after: any, since: any) => Promise<any>;
95
+ newsletterSubscribers: (jid: any) => Promise<any>;
96
+ groupQuery: (jid: any, type: any, content: any) => Promise<any>;
97
+ groupMetadata: (jid: any) => Promise<{
98
+ desc: any;
99
+ descId: any;
100
+ descOwner: any;
101
+ descOwnerLid: any;
102
+ descTime: number;
103
+ linkedParent: any;
104
+ restrict: boolean;
105
+ announce: boolean;
106
+ isCommunity: boolean;
107
+ isCommunityAnnounce: boolean;
108
+ joinApprovalMode: boolean;
109
+ memberAddMode: boolean;
110
+ participants: any;
111
+ ephemeralDuration: number;
112
+ ownerLid?: any;
113
+ subjectTime: number;
114
+ size: any;
115
+ creation: number;
116
+ owner: any;
117
+ subjectOwnerLid?: any;
118
+ id: any;
119
+ addressingMode: any;
120
+ subject: any;
121
+ subjectOwner: any;
122
+ }>;
123
+ groupCreate: (subject: any, participants: any) => Promise<{
124
+ desc: any;
125
+ descId: any;
126
+ descOwner: any;
127
+ descOwnerLid: any;
128
+ descTime: number;
129
+ linkedParent: any;
130
+ restrict: boolean;
131
+ announce: boolean;
132
+ isCommunity: boolean;
133
+ isCommunityAnnounce: boolean;
134
+ joinApprovalMode: boolean;
135
+ memberAddMode: boolean;
136
+ participants: any;
137
+ ephemeralDuration: number;
138
+ ownerLid?: any;
139
+ subjectTime: number;
140
+ size: any;
141
+ creation: number;
142
+ owner: any;
143
+ subjectOwnerLid?: any;
144
+ id: any;
145
+ addressingMode: any;
146
+ subject: any;
147
+ subjectOwner: any;
148
+ }>;
149
+ groupLeave: (id: any) => Promise<void>;
150
+ groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
151
+ groupRequestParticipantsList: (jid: any) => Promise<any>;
152
+ groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
153
+ groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
154
+ groupUpdateDescription: (jid: any, description: any) => Promise<void>;
155
+ groupInviteCode: (jid: any) => Promise<any>;
156
+ groupRevokeInvite: (jid: any) => Promise<any>;
157
+ groupAcceptInvite: (code: any) => Promise<any>;
158
+ groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
159
+ groupAcceptInviteV4: any;
160
+ groupGetInviteInfo: (code: any) => Promise<{
161
+ desc: any;
162
+ descId: any;
163
+ descOwner: any;
164
+ descOwnerLid: any;
165
+ descTime: number;
166
+ linkedParent: any;
167
+ restrict: boolean;
168
+ announce: boolean;
169
+ isCommunity: boolean;
170
+ isCommunityAnnounce: boolean;
171
+ joinApprovalMode: boolean;
172
+ memberAddMode: boolean;
173
+ participants: any;
174
+ ephemeralDuration: number;
175
+ ownerLid?: any;
176
+ subjectTime: number;
177
+ size: any;
178
+ creation: number;
179
+ owner: any;
180
+ subjectOwnerLid?: any;
181
+ id: any;
182
+ addressingMode: any;
183
+ subject: any;
184
+ subjectOwner: any;
185
+ }>;
186
+ groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
187
+ groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
188
+ groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
189
+ groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
190
+ groupFetchAllParticipating: () => Promise<{}>;
191
+ createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
192
+ getBotListV2: () => Promise<{
193
+ jid: any;
194
+ personaId: any;
195
+ }[]>;
196
+ processingMutex: {
197
+ mutex(code: any): Promise<void>;
198
+ };
199
+ upsertMessage: any;
200
+ appPatch: (patchCreate: any) => Promise<void>;
201
+ sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
202
+ presenceSubscribe: (toJid: any, tcToken: any) => Promise<void>;
203
+ profilePictureUrl: (jid: any, type: string, timeoutMs: any) => Promise<any>;
204
+ onWhatsApp: (...jids: any[]) => Promise<any>;
205
+ fetchBlocklist: () => Promise<any>;
206
+ fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
207
+ fetchStatus: (...jids: any[]) => Promise<any>;
208
+ updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise<void>;
209
+ removeProfilePicture: (jid: any) => Promise<void>;
210
+ updateProfileStatus: (status: any) => Promise<void>;
211
+ updateProfileName: (name: any) => Promise<void>;
212
+ updateBlockStatus: (jid: any, action: any) => Promise<void>;
213
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise<void>;
214
+ updateCallPrivacy: (value: any) => Promise<void>;
215
+ updateMessagesPrivacy: (value: any) => Promise<void>;
216
+ updateLastSeenPrivacy: (value: any) => Promise<void>;
217
+ updateOnlinePrivacy: (value: any) => Promise<void>;
218
+ updateProfilePicturePrivacy: (value: any) => Promise<void>;
219
+ updateStatusPrivacy: (value: any) => Promise<void>;
220
+ updateReadReceiptsPrivacy: (value: any) => Promise<void>;
221
+ updateGroupsAddPrivacy: (value: any) => Promise<void>;
222
+ updateDefaultDisappearingMode: (duration: any) => Promise<void>;
223
+ getBusinessProfile: (jid: any) => Promise<{
224
+ wid: any;
225
+ address: any;
226
+ description: any;
227
+ website: any[];
228
+ email: any;
229
+ category: any;
230
+ business_hours: {
231
+ timezone: any;
232
+ business_config: any;
233
+ };
234
+ }>;
235
+ resyncAppState: any;
236
+ chatModify: (mod: any, jid: any) => Promise<void>;
237
+ cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
238
+ addOrEditContact: (jid: any, contact: any) => Promise<void>;
239
+ removeContact: (jid: any) => Promise<void>;
240
+ addLabel: (jid: any, labels: any) => Promise<void>;
241
+ addChatLabel: (jid: any, labelId: any) => Promise<void>;
242
+ removeChatLabel: (jid: any, labelId: any) => Promise<void>;
243
+ addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
244
+ removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
245
+ star: (jid: any, messages: any, star: any) => Promise<void>;
246
+ checkWhatsApp: (jid: any) => Promise<string>;
247
+ executeUSyncQuery: (usyncQuery: any) => Promise<any>;
248
+ type: string;
249
+ ws: any;
250
+ ev: any;
251
+ authState: {
252
+ creds: any;
253
+ keys: any;
254
+ };
255
+ signalRepository: any;
256
+ user: any;
257
+ generateMessageTag: () => string;
258
+ query: (node: any, timeoutMs: any) => Promise<any>;
259
+ waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
260
+ waitForSocketOpen: () => Promise<void>;
261
+ sendRawMessage: (data: any) => Promise<void>;
262
+ sendNode: (frame: any) => Promise<void>;
263
+ logout: (msg: any) => Promise<void>;
264
+ end: (error: any) => void;
265
+ onUnexpectedError: (err: any, msg: any) => void;
266
+ uploadPreKeys: (count?: 812) => Promise<void>;
267
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
268
+ requestPairingCode: (phoneNumber: any, pairCode?: string) => Promise<any>;
269
+ waitForConnectionUpdate: any;
270
+ sendWAMBuffer: (wamBuffer: any) => Promise<any>;
271
+ };