@pontalabs/baileys 1.0.5 → 1.0.6

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 (447) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +267 -839
  3. package/WAProto/GenerateStatics.sh +3 -4
  4. package/WAProto/WAProto.proto +1215 -511
  5. package/WAProto/fix-imports.js +85 -0
  6. package/WAProto/index.d.ts +14017 -55
  7. package/WAProto/index.js +97689 -29
  8. package/engine-requirements.js +10 -0
  9. package/lib/Defaults/index.d.ts +72 -74
  10. package/lib/Defaults/index.d.ts.map +1 -0
  11. package/lib/Defaults/index.js +94 -108
  12. package/lib/Defaults/index.js.map +1 -0
  13. package/lib/Signal/Group/ciphertext-message.d.ts +8 -7
  14. package/lib/Signal/Group/ciphertext-message.d.ts.map +1 -0
  15. package/lib/Signal/Group/ciphertext-message.js +9 -16
  16. package/lib/Signal/Group/ciphertext-message.js.map +1 -0
  17. package/lib/Signal/Group/group-session-builder.d.ts +11 -13
  18. package/lib/Signal/Group/group-session-builder.d.ts.map +1 -0
  19. package/lib/Signal/Group/group-session-builder.js +19 -61
  20. package/lib/Signal/Group/group-session-builder.js.map +1 -0
  21. package/lib/Signal/Group/group_cipher.d.ts +14 -16
  22. package/lib/Signal/Group/group_cipher.d.ts.map +1 -0
  23. package/lib/Signal/Group/group_cipher.js +41 -70
  24. package/lib/Signal/Group/group_cipher.js.map +1 -0
  25. package/lib/Signal/Group/index.d.ts +12 -11
  26. package/lib/Signal/Group/index.d.ts.map +1 -0
  27. package/lib/Signal/Group/index.js +12 -61
  28. package/lib/Signal/Group/index.js.map +1 -0
  29. package/lib/Signal/Group/keyhelper.d.ts +9 -14
  30. package/lib/Signal/Group/keyhelper.d.ts.map +1 -0
  31. package/lib/Signal/Group/keyhelper.js +10 -58
  32. package/lib/Signal/Group/keyhelper.js.map +1 -0
  33. package/lib/Signal/Group/sender-chain-key.d.ts +13 -13
  34. package/lib/Signal/Group/sender-chain-key.d.ts.map +1 -0
  35. package/lib/Signal/Group/sender-chain-key.js +13 -34
  36. package/lib/Signal/Group/sender-chain-key.js.map +1 -0
  37. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -16
  38. package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +1 -0
  39. package/lib/Signal/Group/sender-key-distribution-message.js +28 -36
  40. package/lib/Signal/Group/sender-key-distribution-message.js.map +1 -0
  41. package/lib/Signal/Group/sender-key-message.d.ts +18 -18
  42. package/lib/Signal/Group/sender-key-message.d.ts.map +1 -0
  43. package/lib/Signal/Group/sender-key-message.js +38 -45
  44. package/lib/Signal/Group/sender-key-message.js.map +1 -0
  45. package/lib/Signal/Group/sender-key-name.d.ts +14 -15
  46. package/lib/Signal/Group/sender-key-name.d.ts.map +1 -0
  47. package/lib/Signal/Group/sender-key-name.js +20 -31
  48. package/lib/Signal/Group/sender-key-name.js.map +1 -0
  49. package/lib/Signal/Group/sender-key-record.d.ts +24 -25
  50. package/lib/Signal/Group/sender-key-record.d.ts.map +1 -0
  51. package/lib/Signal/Group/sender-key-record.js +18 -35
  52. package/lib/Signal/Group/sender-key-record.js.map +1 -0
  53. package/lib/Signal/Group/sender-key-state.d.ts +29 -34
  54. package/lib/Signal/Group/sender-key-state.d.ts.map +1 -0
  55. package/lib/Signal/Group/sender-key-state.js +37 -100
  56. package/lib/Signal/Group/sender-key-state.js.map +1 -0
  57. package/lib/Signal/Group/sender-message-key.d.ts +11 -10
  58. package/lib/Signal/Group/sender-message-key.d.ts.map +1 -0
  59. package/lib/Signal/Group/sender-message-key.js +15 -22
  60. package/lib/Signal/Group/sender-message-key.js.map +1 -0
  61. package/lib/Signal/libsignal.d.ts +5 -8
  62. package/lib/Signal/libsignal.d.ts.map +1 -0
  63. package/lib/Signal/libsignal.js +288 -142
  64. package/lib/Signal/libsignal.js.map +1 -0
  65. package/lib/Signal/lid-mapping.d.ts +23 -28
  66. package/lib/Signal/lid-mapping.d.ts.map +1 -0
  67. package/lib/Signal/lid-mapping.js +277 -184
  68. package/lib/Signal/lid-mapping.js.map +1 -0
  69. package/lib/Socket/Client/index.d.ts +3 -2
  70. package/lib/Socket/Client/index.d.ts.map +1 -0
  71. package/lib/Socket/Client/index.js +3 -22
  72. package/lib/Socket/Client/index.js.map +1 -0
  73. package/lib/Socket/Client/types.d.ts +15 -15
  74. package/lib/Socket/Client/types.d.ts.map +1 -0
  75. package/lib/Socket/Client/types.js +8 -15
  76. package/lib/Socket/Client/types.js.map +1 -0
  77. package/lib/Socket/Client/websocket.d.ts +12 -12
  78. package/lib/Socket/Client/websocket.d.ts.map +1 -0
  79. package/lib/Socket/Client/websocket.js +29 -37
  80. package/lib/Socket/Client/websocket.js.map +1 -0
  81. package/lib/Socket/business.d.ts +208 -178
  82. package/lib/Socket/business.d.ts.map +1 -0
  83. package/lib/Socket/business.js +91 -127
  84. package/lib/Socket/business.js.map +1 -0
  85. package/lib/Socket/chats.d.ts +120 -93
  86. package/lib/Socket/chats.d.ts.map +1 -0
  87. package/lib/Socket/chats.js +727 -652
  88. package/lib/Socket/chats.js.map +1 -0
  89. package/lib/Socket/communities.d.ts +273 -0
  90. package/lib/Socket/communities.d.ts.map +1 -0
  91. package/lib/Socket/communities.js +431 -0
  92. package/lib/Socket/communities.js.map +1 -0
  93. package/lib/Socket/dugong.js +261 -0
  94. package/lib/Socket/dugong.js.bak +204 -0
  95. package/lib/Socket/groups.d.ts +143 -111
  96. package/lib/Socket/groups.d.ts.map +1 -0
  97. package/lib/Socket/groups.js +165 -177
  98. package/lib/Socket/groups.js.map +1 -0
  99. package/lib/Socket/index.d.ts +252 -183
  100. package/lib/Socket/index.d.ts.map +1 -0
  101. package/lib/Socket/index.js +38 -18
  102. package/lib/Socket/index.js.bak +44 -0
  103. package/lib/Socket/index.js.map +1 -0
  104. package/lib/Socket/messages-recv.d.ts +196 -167
  105. package/lib/Socket/messages-recv.d.ts.map +1 -0
  106. package/lib/Socket/messages-recv.js +1443 -1563
  107. package/lib/Socket/messages-recv.js.map +1 -0
  108. package/lib/Socket/messages-send.d.ts +192 -158
  109. package/lib/Socket/messages-send.d.ts.map +1 -0
  110. package/lib/Socket/messages-send.js +1102 -1208
  111. package/lib/Socket/messages-send.js.bak +1400 -0
  112. package/lib/Socket/messages-send.js.map +1 -0
  113. package/lib/Socket/mex.d.ts +3 -0
  114. package/lib/Socket/mex.d.ts.map +1 -0
  115. package/lib/Socket/mex.js +42 -0
  116. package/lib/Socket/mex.js.map +1 -0
  117. package/lib/Socket/newsletter.d.ts +163 -138
  118. package/lib/Socket/newsletter.d.ts.map +1 -0
  119. package/lib/Socket/newsletter.js +153 -249
  120. package/lib/Socket/newsletter.js.map +1 -0
  121. package/lib/Socket/socket.d.ts +50 -36
  122. package/lib/Socket/socket.d.ts.map +1 -0
  123. package/lib/Socket/socket.js +749 -820
  124. package/lib/Socket/socket.js.map +1 -0
  125. package/lib/Store/index.d.ts +4 -4
  126. package/lib/Store/index.d.ts.map +1 -0
  127. package/lib/Store/index.js +4 -24
  128. package/lib/Store/index.js.map +1 -0
  129. package/lib/Store/make-in-memory-store.d.ts +44 -104
  130. package/lib/Store/make-in-memory-store.d.ts.map +1 -0
  131. package/lib/Store/make-in-memory-store.js +199 -213
  132. package/lib/Store/make-in-memory-store.js.map +1 -0
  133. package/lib/Store/make-ordered-dictionary.d.ts +13 -12
  134. package/lib/Store/make-ordered-dictionary.d.ts.map +1 -0
  135. package/lib/Store/make-ordered-dictionary.js +38 -45
  136. package/lib/Store/make-ordered-dictionary.js.map +1 -0
  137. package/lib/Store/object-repository.d.ts +11 -10
  138. package/lib/Store/object-repository.d.ts.map +1 -0
  139. package/lib/Store/object-repository.js +9 -16
  140. package/lib/Store/object-repository.js.map +1 -0
  141. package/lib/Types/Auth.d.ts +93 -97
  142. package/lib/Types/Auth.d.ts.map +1 -0
  143. package/lib/Types/Auth.js +2 -3
  144. package/lib/Types/Auth.js.map +1 -0
  145. package/lib/Types/Bussines.d.ts +25 -0
  146. package/lib/Types/Bussines.d.ts.map +1 -0
  147. package/lib/Types/Bussines.js +2 -3
  148. package/lib/Types/Bussines.js.map +1 -0
  149. package/lib/Types/Call.d.ts +14 -13
  150. package/lib/Types/Call.d.ts.map +1 -0
  151. package/lib/Types/Call.js +2 -3
  152. package/lib/Types/Call.js.map +1 -0
  153. package/lib/Types/Chat.d.ts +78 -97
  154. package/lib/Types/Chat.d.ts.map +1 -0
  155. package/lib/Types/Chat.js +8 -9
  156. package/lib/Types/Chat.js.map +1 -0
  157. package/lib/Types/Contact.d.ts +12 -9
  158. package/lib/Types/Contact.d.ts.map +1 -0
  159. package/lib/Types/Contact.js +2 -3
  160. package/lib/Types/Contact.js.map +1 -0
  161. package/lib/Types/Events.d.ts +206 -176
  162. package/lib/Types/Events.d.ts.map +1 -0
  163. package/lib/Types/Events.js +2 -3
  164. package/lib/Types/Events.js.map +1 -0
  165. package/lib/Types/GroupMetadata.d.ts +53 -48
  166. package/lib/Types/GroupMetadata.d.ts.map +1 -0
  167. package/lib/Types/GroupMetadata.js +2 -3
  168. package/lib/Types/GroupMetadata.js.map +1 -0
  169. package/lib/Types/Label.d.ts +13 -14
  170. package/lib/Types/Label.d.ts.map +1 -0
  171. package/lib/Types/Label.js +24 -30
  172. package/lib/Types/Label.js.map +1 -0
  173. package/lib/Types/LabelAssociation.d.ts +15 -20
  174. package/lib/Types/LabelAssociation.d.ts.map +1 -0
  175. package/lib/Types/LabelAssociation.js +6 -12
  176. package/lib/Types/LabelAssociation.js.map +1 -0
  177. package/lib/Types/Message.d.ts +248 -412
  178. package/lib/Types/Message.d.ts.map +1 -0
  179. package/lib/Types/Message.js +17 -19
  180. package/lib/Types/Message.js.map +1 -0
  181. package/lib/Types/Mex.d.ts +141 -0
  182. package/lib/Types/Mex.d.ts.map +1 -0
  183. package/lib/Types/Mex.js +37 -0
  184. package/lib/Types/Mex.js.map +1 -0
  185. package/lib/Types/Product.d.ts +58 -71
  186. package/lib/Types/Product.d.ts.map +1 -0
  187. package/lib/Types/Product.js +2 -3
  188. package/lib/Types/Product.js.map +1 -0
  189. package/lib/Types/RichType.d.ts +3 -0
  190. package/lib/Types/RichType.d.ts.map +1 -0
  191. package/lib/Types/RichType.js +23 -0
  192. package/lib/Types/RichType.js.bak +23 -0
  193. package/lib/Types/RichType.js.map +1 -0
  194. package/lib/Types/Signal.d.ts +71 -82
  195. package/lib/Types/Signal.d.ts.map +1 -0
  196. package/lib/Types/Signal.js +2 -3
  197. package/lib/Types/Signal.js.map +1 -0
  198. package/lib/Types/Socket.d.ts +76 -81
  199. package/lib/Types/Socket.d.ts.map +1 -0
  200. package/lib/Types/Socket.js +3 -3
  201. package/lib/Types/Socket.js.map +1 -0
  202. package/lib/Types/State.d.ts +75 -19
  203. package/lib/Types/State.d.ts.map +1 -0
  204. package/lib/Types/State.js +56 -14
  205. package/lib/Types/State.js.map +1 -0
  206. package/lib/Types/USync.d.ts +8 -8
  207. package/lib/Types/USync.d.ts.map +1 -0
  208. package/lib/Types/USync.js +2 -3
  209. package/lib/Types/USync.js.map +1 -0
  210. package/lib/Types/index.d.ts +47 -62
  211. package/lib/Types/index.d.ts.map +1 -0
  212. package/lib/Types/index.js +26 -50
  213. package/lib/Types/index.js.map +1 -0
  214. package/lib/Utils/auth-utils.d.ts +13 -10
  215. package/lib/Utils/auth-utils.d.ts.map +1 -0
  216. package/lib/Utils/auth-utils.js +213 -472
  217. package/lib/Utils/auth-utils.js.map +1 -0
  218. package/lib/Utils/browser-utils.d.ts +4 -0
  219. package/lib/Utils/browser-utils.d.ts.map +1 -0
  220. package/lib/Utils/browser-utils.js +28 -0
  221. package/lib/Utils/browser-utils.js.map +1 -0
  222. package/lib/Utils/business.d.ts +14 -20
  223. package/lib/Utils/business.d.ts.map +1 -0
  224. package/lib/Utils/business.js +110 -134
  225. package/lib/Utils/business.js.map +1 -0
  226. package/lib/Utils/chat-utils.d.ts +88 -70
  227. package/lib/Utils/chat-utils.d.ts.map +1 -0
  228. package/lib/Utils/chat-utils.js +466 -403
  229. package/lib/Utils/chat-utils.js.map +1 -0
  230. package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
  231. package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
  232. package/lib/Utils/companion-reg-client-utils.js +35 -0
  233. package/lib/Utils/companion-reg-client-utils.js.map +1 -0
  234. package/lib/Utils/crypto.d.ts +27 -46
  235. package/lib/Utils/crypto.d.ts.map +1 -0
  236. package/lib/Utils/crypto.js +117 -188
  237. package/lib/Utils/crypto.js.map +1 -0
  238. package/lib/Utils/decode-wa-message.d.ts +58 -45
  239. package/lib/Utils/decode-wa-message.d.ts.map +1 -0
  240. package/lib/Utils/decode-wa-message.js +213 -303
  241. package/lib/Utils/decode-wa-message.js.map +1 -0
  242. package/lib/Utils/event-buffer.d.ts +14 -17
  243. package/lib/Utils/event-buffer.d.ts.map +1 -0
  244. package/lib/Utils/event-buffer.js +321 -296
  245. package/lib/Utils/event-buffer.js.map +1 -0
  246. package/lib/Utils/generics.d.ts +66 -92
  247. package/lib/Utils/generics.d.ts.map +1 -0
  248. package/lib/Utils/generics.js +270 -436
  249. package/lib/Utils/generics.js.map +1 -0
  250. package/lib/Utils/history.d.ts +24 -23
  251. package/lib/Utils/history.d.ts.map +1 -0
  252. package/lib/Utils/history.js +106 -76
  253. package/lib/Utils/history.js.map +1 -0
  254. package/lib/Utils/identity-change-handler.d.ts +44 -0
  255. package/lib/Utils/identity-change-handler.d.ts.map +1 -0
  256. package/lib/Utils/identity-change-handler.js +50 -0
  257. package/lib/Utils/identity-change-handler.js.map +1 -0
  258. package/lib/Utils/index.d.ts +24 -21
  259. package/lib/Utils/index.d.ts.map +1 -0
  260. package/lib/Utils/index.js +24 -41
  261. package/lib/Utils/index.js.map +1 -0
  262. package/lib/Utils/link-preview.d.ts +12 -14
  263. package/lib/Utils/link-preview.d.ts.map +1 -0
  264. package/lib/Utils/link-preview.js +40 -75
  265. package/lib/Utils/link-preview.js.map +1 -0
  266. package/lib/Utils/logger.d.ts +10 -11
  267. package/lib/Utils/logger.d.ts.map +1 -0
  268. package/lib/Utils/logger.js +3 -7
  269. package/lib/Utils/logger.js.map +1 -0
  270. package/lib/Utils/lt-hash.d.ts +8 -14
  271. package/lib/Utils/lt-hash.d.ts.map +1 -0
  272. package/lib/Utils/lt-hash.js +3 -53
  273. package/lib/Utils/lt-hash.js.map +1 -0
  274. package/lib/Utils/make-mutex.d.ts +7 -7
  275. package/lib/Utils/make-mutex.d.ts.map +1 -0
  276. package/lib/Utils/make-mutex.js +28 -44
  277. package/lib/Utils/make-mutex.js.map +1 -0
  278. package/lib/Utils/message-retry-manager.d.ts +115 -88
  279. package/lib/Utils/message-retry-manager.d.ts.map +1 -0
  280. package/lib/Utils/message-retry-manager.js +265 -160
  281. package/lib/Utils/message-retry-manager.js.map +1 -0
  282. package/lib/Utils/messages-media.d.ts +105 -107
  283. package/lib/Utils/messages-media.d.ts.map +1 -0
  284. package/lib/Utils/messages-media.js +548 -619
  285. package/lib/Utils/messages-media.js.bak +786 -0
  286. package/lib/Utils/messages-media.js.map +1 -0
  287. package/lib/Utils/messages.d.ts +52 -66
  288. package/lib/Utils/messages.d.ts.map +1 -0
  289. package/lib/Utils/messages.js +1730 -1558
  290. package/lib/Utils/messages.js.backup +1768 -0
  291. package/lib/Utils/messages.js.bak +1809 -0
  292. package/lib/Utils/messages.js.bak2 +893 -0
  293. package/lib/Utils/messages.js.bak3 +1183 -0
  294. package/lib/Utils/messages.js.map +1 -0
  295. package/lib/Utils/noise-handler.d.ts +18 -18
  296. package/lib/Utils/noise-handler.d.ts.map +1 -0
  297. package/lib/Utils/noise-handler.js +176 -130
  298. package/lib/Utils/noise-handler.js.map +1 -0
  299. package/lib/Utils/offline-node-processor.d.ts +17 -0
  300. package/lib/Utils/offline-node-processor.d.ts.map +1 -0
  301. package/lib/Utils/offline-node-processor.js +40 -0
  302. package/lib/Utils/offline-node-processor.js.map +1 -0
  303. package/lib/Utils/pre-key-manager.d.ts +28 -0
  304. package/lib/Utils/pre-key-manager.d.ts.map +1 -0
  305. package/lib/Utils/pre-key-manager.js +106 -0
  306. package/lib/Utils/pre-key-manager.js.map +1 -0
  307. package/lib/Utils/process-message.d.ts +43 -32
  308. package/lib/Utils/process-message.d.ts.map +1 -0
  309. package/lib/Utils/process-message.js +484 -282
  310. package/lib/Utils/process-message.js.map +1 -0
  311. package/lib/Utils/reporting-utils.d.ts +11 -0
  312. package/lib/Utils/reporting-utils.d.ts.map +1 -0
  313. package/lib/Utils/reporting-utils.js +258 -0
  314. package/lib/Utils/reporting-utils.js.map +1 -0
  315. package/lib/Utils/rich-message-utils.d.ts +49 -0
  316. package/lib/Utils/rich-message-utils.d.ts.map +1 -0
  317. package/lib/Utils/rich-message-utils.js +1220 -724
  318. package/lib/Utils/rich-message-utils.js.backup +706 -0
  319. package/lib/Utils/rich-message-utils.js.bak +246 -0
  320. package/lib/Utils/rich-message-utils.js.map +1 -0
  321. package/lib/Utils/rich-message-utils.js.original +1332 -0
  322. package/lib/Utils/signal.d.ts +37 -32
  323. package/lib/Utils/signal.d.ts.map +1 -0
  324. package/lib/Utils/signal.js +140 -105
  325. package/lib/Utils/signal.js.map +1 -0
  326. package/lib/Utils/stanza-ack.d.ts +11 -0
  327. package/lib/Utils/stanza-ack.d.ts.map +1 -0
  328. package/lib/Utils/stanza-ack.js +38 -0
  329. package/lib/Utils/stanza-ack.js.map +1 -0
  330. package/lib/Utils/sync-action-utils.d.ts +19 -0
  331. package/lib/Utils/sync-action-utils.d.ts.map +1 -0
  332. package/lib/Utils/sync-action-utils.js +49 -0
  333. package/lib/Utils/sync-action-utils.js.map +1 -0
  334. package/lib/Utils/tc-token-utils.d.ts +37 -0
  335. package/lib/Utils/tc-token-utils.d.ts.map +1 -0
  336. package/lib/Utils/tc-token-utils.js +163 -0
  337. package/lib/Utils/tc-token-utils.js.map +1 -0
  338. package/lib/Utils/use-multi-file-auth-state.d.ts +5 -5
  339. package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
  340. package/lib/Utils/use-multi-file-auth-state.js +70 -120
  341. package/lib/Utils/use-multi-file-auth-state.js.map +1 -0
  342. package/lib/Utils/use-single-file-auth-state.d.ts +11 -13
  343. package/lib/Utils/use-single-file-auth-state.d.ts.map +1 -0
  344. package/lib/Utils/use-single-file-auth-state.js +92 -66
  345. package/lib/Utils/use-single-file-auth-state.js.map +1 -0
  346. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  347. package/lib/Utils/use-sqlite-auth-state.d.ts.map +1 -0
  348. package/lib/Utils/use-sqlite-auth-state.js +109 -0
  349. package/lib/Utils/use-sqlite-auth-state.js.map +1 -0
  350. package/lib/Utils/validate-connection.d.ts +11 -13
  351. package/lib/Utils/validate-connection.d.ts.map +1 -0
  352. package/lib/Utils/validate-connection.js +128 -113
  353. package/lib/Utils/validate-connection.js.map +1 -0
  354. package/lib/WABinary/constants.d.ts +25 -27
  355. package/lib/WABinary/constants.d.ts.map +1 -0
  356. package/lib/WABinary/constants.js +1451 -1292
  357. package/lib/WABinary/constants.js.bak +1373 -0
  358. package/lib/WABinary/constants.js.map +1 -0
  359. package/lib/WABinary/decode.d.ts +7 -9
  360. package/lib/WABinary/decode.d.ts.map +1 -0
  361. package/lib/WABinary/decode.js +163 -189
  362. package/lib/WABinary/decode.js.map +1 -0
  363. package/lib/WABinary/encode.d.ts +3 -3
  364. package/lib/WABinary/encode.d.ts.map +1 -0
  365. package/lib/WABinary/encode.js +110 -155
  366. package/lib/WABinary/encode.js.map +1 -0
  367. package/lib/WABinary/generic-utils.d.ts +14 -27
  368. package/lib/WABinary/generic-utils.d.ts.map +1 -0
  369. package/lib/WABinary/generic-utils.js +177 -105
  370. package/lib/WABinary/generic-utils.js.map +1 -0
  371. package/lib/WABinary/index.d.ts +6 -5
  372. package/lib/WABinary/index.d.ts.map +1 -0
  373. package/lib/WABinary/index.js +6 -25
  374. package/lib/WABinary/index.js.map +1 -0
  375. package/lib/WABinary/jid-utils.d.ts +41 -51
  376. package/lib/WABinary/jid-utils.d.ts.map +1 -0
  377. package/lib/WABinary/jid-utils.js +83 -120
  378. package/lib/WABinary/jid-utils.js.map +1 -0
  379. package/lib/WABinary/types.d.ts +10 -13
  380. package/lib/WABinary/types.d.ts.map +1 -0
  381. package/lib/WABinary/types.js +2 -3
  382. package/lib/WABinary/types.js.map +1 -0
  383. package/lib/WAM/BinaryInfo.d.ts +8 -15
  384. package/lib/WAM/BinaryInfo.d.ts.map +1 -0
  385. package/lib/WAM/BinaryInfo.js +7 -14
  386. package/lib/WAM/BinaryInfo.js.map +1 -0
  387. package/lib/WAM/constants.d.ts +30 -37
  388. package/lib/WAM/constants.d.ts.map +1 -0
  389. package/lib/WAM/constants.js +19193 -11711
  390. package/lib/WAM/constants.js.map +1 -0
  391. package/lib/WAM/encode.d.ts +3 -3
  392. package/lib/WAM/encode.d.ts.map +1 -0
  393. package/lib/WAM/encode.js +95 -109
  394. package/lib/WAM/encode.js.map +1 -0
  395. package/lib/WAM/index.d.ts +4 -3
  396. package/lib/WAM/index.d.ts.map +1 -0
  397. package/lib/WAM/index.js +4 -23
  398. package/lib/WAM/index.js.map +1 -0
  399. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -9
  400. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -0
  401. package/lib/WAUSync/Protocols/USyncContactProtocol.js +37 -21
  402. package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -0
  403. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +19 -22
  404. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +1 -0
  405. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +18 -26
  406. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +1 -0
  407. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +11 -12
  408. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +1 -0
  409. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +12 -20
  410. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +1 -0
  411. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +11 -12
  412. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +1 -0
  413. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +16 -24
  414. package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +1 -0
  415. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
  416. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +1 -0
  417. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
  418. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +1 -0
  419. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +26 -0
  420. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +1 -0
  421. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
  422. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +1 -0
  423. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +10 -0
  424. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +1 -0
  425. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
  426. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +1 -0
  427. package/lib/WAUSync/Protocols/index.d.ts +6 -6
  428. package/lib/WAUSync/Protocols/index.d.ts.map +1 -0
  429. package/lib/WAUSync/Protocols/index.js +6 -26
  430. package/lib/WAUSync/Protocols/index.js.map +1 -0
  431. package/lib/WAUSync/USyncQuery.d.ts +27 -28
  432. package/lib/WAUSync/USyncQuery.d.ts.map +1 -0
  433. package/lib/WAUSync/USyncQuery.js +68 -62
  434. package/lib/WAUSync/USyncQuery.js.map +1 -0
  435. package/lib/WAUSync/USyncUser.d.ts +15 -10
  436. package/lib/WAUSync/USyncUser.d.ts.map +1 -0
  437. package/lib/WAUSync/USyncUser.js +20 -19
  438. package/lib/WAUSync/USyncUser.js.map +1 -0
  439. package/lib/WAUSync/index.d.ts +4 -3
  440. package/lib/WAUSync/index.d.ts.map +1 -0
  441. package/lib/WAUSync/index.js +4 -23
  442. package/lib/WAUSync/index.js.map +1 -0
  443. package/lib/index.d.ts +11 -12
  444. package/lib/index.d.ts.map +1 -0
  445. package/lib/index.js +12 -39
  446. package/lib/index.js.map +1 -0
  447. package/package.json +86 -42
package/README.md CHANGED
@@ -29,7 +29,7 @@
29
29
 
30
30
  <br><br>
31
31
 
32
- <p><em>Extended from <code>@whiskeysockets/baileys</code> — packed with exclusive patches, AI-rich messages, and advanced WhatsApp features.</em></p>
32
+ <p><em>Extended from <code>@whiskeysockets/baileys</code> — dengan lapisan AI rich-message, patch grup/lokasi/order, dan API sendiri yang <strong>bukan</strong> sekadar rename dari fork lain.</em></p>
33
33
 
34
34
  </div>
35
35
 
@@ -45,7 +45,9 @@
45
45
  - [Connecting](#-connecting)
46
46
  - [Events](#-events)
47
47
  - [Sending Messages](#-sending-messages)
48
- - [Rich Messages](#-rich-messages)
48
+ - [Location + Buttons](#-location--buttons)
49
+ - [Order Status](#-order-status)
50
+ - [AI Rich Messages](#-ai-rich-messages)
49
51
  - [Newsletter](#-newsletter)
50
52
  - [Groups](#-groups)
51
53
  - [Privacy](#-privacy)
@@ -59,34 +61,32 @@
59
61
 
60
62
  ## ✨ Why This Fork?
61
63
 
62
- This fork builds on top of the original Baileys library with **targeted, production-ready patches** designed for modern bot development and AI integrations.
64
+ Fork ini dibangun di atas Baileys asli, dengan penekanan khusus pada satu hal: **API AI rich-message punya nama field sendiri**, bukan tempelan ulang dari fork lain. Kalau kamu pernah pakai fork "AI-message" lain dan lihat field seperti `richResponse` / `headerText` / `footerText` / `disclaimerText` / `richTip` — di sini semua itu dipetakan ulang jadi nama yang berbeda (`aiBlocks`, `topText`, `bottomText`, `aiNotice`, `tip`, dst), lengkap dengan struktur data yang juga disesuaikan.
63
65
 
64
66
  | # | Patch | Description |
65
67
  |:---:|:---|:---|
66
- | 01 | 🤖 **Rich Text** | AI-styled markdown text via `richText` |
67
- | 02 | 💻 **Rich Code Block** | Syntax-highlighted code blocks with language support |
68
- | 03 | 📊 **Rich Table** | Structured data tables with headers and rows |
69
- | 04 | 🖼️ **Rich Images** | Image grid / carousel for AI-generated visuals |
70
- | 05 | 🎥 **Rich Video** | Video embeds rendered as AI animated media |
71
- | 06 | 💡 **Rich Suggestions** | Follow-up prompt pills (like native AI chat) |
72
- | 07 | 🔣 **Rich LaTeX** | Math formula rendering via `GenAILatexItem` |
73
- | 08 | 🛍️ **Rich Product** | Product cards with horizontal scroll carousel |
74
- | 09 | 📰 **Rich Post** | Post cards with author metadata and carousel |
75
- | 10 | 🎬 **Rich Reels** | Reels carousel with engagement stats |
76
- | 11 | 🔍 **Rich Sources** | Search result source list with favicons |
77
- | 12 | 📌 **Rich Tip & Footer** | Metadata blocks for branding and disclaimers |
78
- | 13 | 🔀 **Rich Mixed** | Combine all rich types freely in `items` arrays |
79
- | 14 | 🔗 **Rich Response** | Full array mode with inline citations |
80
- | 15 | 🪪 **Custom Message ID** | All outgoing IDs prefixed with `PONTASOCKETS` |
81
- | 16 | 🐛 **LID Bug Fixes** | Full resolution for participant, sender, and admin LID issues |
82
- | 17 | 📦 **makeInMemoryStore Fix** | Stable session handling and store behavior |
83
- | 18 | 📣 **Newsletter Support** | Full channel/newsletter create, follow, react, and admin tools |
84
- | 19 | 🤖 **AI Logo Message** | Bot avatar support in message context |
85
- | 20 | 📊 **Logger Buffer Clear** | Prevents memory buildup from log buffers |
86
- | 21 | 🔁 **LID → JID Conversion** | Auto-converts LID mentions, sender, and member LIDs to JID |
87
- | 22 | 📍 **Location + Buttons** | Location messages with native list menu and extra buttons |
88
- | 23 | 📢 **Group Status** | Styled group status (text/media) with audience control |
89
- | 24 | 📦 **Order Status** | Interactive order tracking cards with native `order_status` flow |
68
+ | 01 | 🤖 **AI Blocks (`aiBlocks`)** | Array campuran text/code/table/image/video/product/post/reels/tip/suggest dalam satu pesan |
69
+ | 02 | 💻 **Code Block** | Syntax-highlighted code block via `code` + `language` |
70
+ | 03 | 📊 **Table** | Tabel data via `table` (rows) + `title` |
71
+ | 04 | 🖼️ **Rich Image** | Grid gambar AI via `richImage` |
72
+ | 05 | 🎥 **Rich Video** | Video embed animasi AI via `richVideo` |
73
+ | 06 | 💡 **Suggest** | Follow-up prompt pills via `suggest` |
74
+ | 07 | 🔣 **LaTeX** | Render rumus matematika via `latex` |
75
+ | 08 | 🛍️ **Rich Product** | Kartu produk (single / carousel) via `richProduct` |
76
+ | 09 | 📰 **Rich Post** | Kartu post carousel via `richPost` |
77
+ | 10 | 🎬 **Reels** | Carousel reels via `reels` |
78
+ | 11 | 🔍 **Source** | Daftar sumber pencarian dengan favicon via `source` |
79
+ | 12 | 📌 **Header / Footer / Disclaimer** | `topText`, `bottomText`, `aiNotice` bukan `headerText`/`footerText`/`disclaimerText` |
80
+ | 13 | 🔀 **Mixed Blocks** | Semua tipe di atas bisa digabung bebas lewat `aiBlocks` |
81
+ | 14 | 🔗 **Inline Citation** | Kutipan inline lewat `links` |
82
+ | 15 | 🐛 **LID Bug Fixes** | Resolusi penuh untuk participant, sender, dan admin LID |
83
+ | 16 | 📦 **makeInMemoryStore Fix** | Session handling dan store behavior lebih stabil |
84
+ | 17 | 📣 **Newsletter Support** | Create, follow, react, dan admin tools untuk channel/newsletter |
85
+ | 18 | 📊 **Logger Buffer Clear** | Mencegah memory buildup dari log buffer |
86
+ | 19 | 🔁 **LID JID Conversion** | Auto-convert mention/sender/member LID ke JID |
87
+ | 20 | 📍 **Location + Buttons** | Pesan lokasi dengan native list menu (`buttonLocation.sections`) dan extra buttons |
88
+ | 21 | 📢 **Group Status** | `groupStatusMessage` dengan `audienceType`, `backgroundColor`, `textColor`, `font` |
89
+ | 22 | 📦 **Order Status** | Kartu order tracking interaktif via flow native `order_status` |
90
90
 
91
91
  ---
92
92
 
@@ -95,7 +95,7 @@ This fork builds on top of the original Baileys library with **targeted, product
95
95
  ```
96
96
  ✔ Multi-Device Support ✔ End-to-End Encryption
97
97
  ✔ Real-Time Messaging ✔ Session Persistence
98
- Rich AI Bot Messages ✔ Newsletter Management
98
+ ✔ AI Rich Messages (aiBlocks) ✔ Newsletter Management
99
99
  ✔ Group & Channel Management ✔ Inline Citations & LaTeX
100
100
  ✔ Poll, Album, Carousel ✔ LID → JID Auto-Conversion
101
101
  ✔ Product / Post / Reels Cards ✔ Math Formula Rendering
@@ -168,8 +168,6 @@ const sock = makeWASocket({
168
168
  if (!sock.authState.creds.registered) {
169
169
  const number = '62xxxx'
170
170
  const code = await sock.requestPairingCode(number)
171
- // Or custom 8-digit code:
172
- const customCode = await sock.requestPairingCode(number, 'PONTASOCKETS')
173
171
  console.log(code)
174
172
  }
175
173
  ```
@@ -229,13 +227,11 @@ await sock.sendMessage(jid, { text: 'Reply!' }, { quoted: message })
229
227
  <summary><b>🖼️ Image</b></summary>
230
228
 
231
229
  ```js
232
- // From file
233
230
  await sock.sendMessage(jid, {
234
231
  image: fs.readFileSync('image.jpg'),
235
232
  caption: 'Caption here'
236
233
  })
237
234
 
238
- // From URL
239
235
  await sock.sendMessage(jid, {
240
236
  image: { url: 'https://example.com/image.jpg' },
241
237
  caption: 'Downloaded image'
@@ -252,7 +248,6 @@ await sock.sendMessage(jid, {
252
248
  caption: 'Funny clip!'
253
249
  })
254
250
 
255
- // View Once
256
251
  await sock.sendMessage(jid, {
257
252
  video: fs.readFileSync('secret.mp4'),
258
253
  viewOnce: true
@@ -264,10 +259,8 @@ await sock.sendMessage(jid, {
264
259
  <summary><b>🎵 Audio / PTT</b></summary>
265
260
 
266
261
  ```js
267
- // Regular audio
268
262
  await sock.sendMessage(jid, { audio: fs.readFileSync('audio.mp3'), ptt: false })
269
263
 
270
- // Push-to-talk
271
264
  await sock.sendMessage(jid, {
272
265
  audio: fs.readFileSync('voice.ogg'),
273
266
  ptt: true,
@@ -311,8 +304,7 @@ await sock.sendMessage(jid, {
311
304
 
312
305
  ```js
313
306
  await sock.sendMessage(jid, { react: { text: '👍', key: message.key } })
314
- // Remove reaction
315
- await sock.sendMessage(jid, { react: { text: '', key: message.key } })
307
+ await sock.sendMessage(jid, { react: { text: '', key: message.key } }) // hapus reaksi
316
308
  ```
317
309
  </details>
318
310
 
@@ -333,11 +325,15 @@ await sock.sendMessage(jid, {
333
325
  <details>
334
326
  <summary><b>📸 Album</b></summary>
335
327
 
328
+ > Minimal 2 media (gabungan gambar/video). Gunakan key `album`, bukan method terpisah.
329
+
336
330
  ```js
337
- await sock.sendAlbumMessage(jid, [
338
- { image: { url: 'https://example.com/1.jpg' }, caption: 'First' },
339
- { video: { url: 'https://example.com/clip.mp4' }, caption: 'Second' }
340
- ], { quoted: message, delay: 3000 })
331
+ await sock.sendMessage(jid, {
332
+ album: [
333
+ { image: { url: 'https://example.com/1.jpg' }, caption: 'First' },
334
+ { video: { url: 'https://example.com/clip.mp4' }, caption: 'Second' }
335
+ ]
336
+ }, { quoted: message })
341
337
  ```
342
338
  </details>
343
339
 
@@ -345,12 +341,11 @@ await sock.sendAlbumMessage(jid, [
345
341
  <summary><b>👨‍💻 Interactive (Native Flow & Carousel)</b></summary>
346
342
 
347
343
  ```js
348
- // Native Flow
344
+ // Native Flow — key-nya "nativeFlow", bukan "interactive"
349
345
  await sock.sendMessage(jid, {
350
346
  text: 'Choose an option:',
351
- title: 'Title',
352
- footer: '© PONTASOCKETS Baileys',
353
- interactive: [{
347
+ footer: '© Pontact Baileys',
348
+ nativeFlow: [{
354
349
  name: 'quick_reply',
355
350
  buttonParamsJson: JSON.stringify({ display_text: 'Quick Reply', id: '123' })
356
351
  }]
@@ -359,14 +354,13 @@ await sock.sendMessage(jid, {
359
354
  // Carousel
360
355
  await sock.sendMessage(jid, {
361
356
  text: 'Check out our collection!',
362
- title: 'Catalog',
363
- footer: '© PONTASOCKETS Baileys',
357
+ footer: '© Pontact Baileys',
364
358
  cards: [{
365
359
  image: { url: 'https://example.com/image.jpg' },
366
360
  title: 'Product Name',
367
- body: 'Product description',
368
- footer: '© PONTASOCKETS',
369
- buttons: [{
361
+ caption: 'Product description',
362
+ footer: '© PontaCT',
363
+ nativeFlow: [{
370
364
  name: 'quick_reply',
371
365
  buttonParamsJson: JSON.stringify({ display_text: 'Select', id: '1' })
372
366
  }]
@@ -391,7 +385,7 @@ await sock.sendMessage(jid, { keep: { key: message.key, type: 1 } })
391
385
 
392
386
  ### 📍 Location + Buttons
393
387
 
394
- > Location message with native list menu (`single_select`) and extra buttons — all in one `buttonsMessage`.
388
+ > Pesan lokasi dengan list menu native (`single_select`) dan extra buttons — semuanya dalam satu `buttonLocation`. Perhatikan: strukturnya pakai `sections` (bukan `listMenu` flat).
395
389
 
396
390
  <details>
397
391
  <summary><b>Location + List Menu</b></summary>
@@ -407,11 +401,15 @@ await sock.sendMessage(jid, {
407
401
  footer: '© PontaCT',
408
402
  thumbnail: 'https://example.com/map-preview.jpg',
409
403
  listButtonText: 'Pilih Layanan',
410
- listSectionTitle: 'Layanan Tersedia',
411
- listMenu: [
412
- { title: 'Customer Service', description: 'Lantai 1, Senin–Jumat 08.00–17.00', id: 'cs' },
413
- { title: 'Kasir & Pembayaran', description: 'Lantai 2, buka setiap hari', id: 'kasir' },
414
- { title: 'Gudang & Pengiriman', description: 'Gedung B, pintu belakang', id: 'gudang' }
404
+ sections: [
405
+ {
406
+ title: 'Layanan Tersedia',
407
+ rows: [
408
+ { id: 'cs', title: 'Customer Service', description: 'Lantai 1, Senin–Jumat 08.00–17.00' },
409
+ { id: 'kasir', title: 'Kasir & Pembayaran', description: 'Lantai 2, buka setiap hari' },
410
+ { id: 'gudang', title: 'Gudang & Pengiriman', description: 'Gedung B, pintu belakang' }
411
+ ]
412
+ }
415
413
  ]
416
414
  }
417
415
  })
@@ -441,51 +439,23 @@ await sock.sendMessage(jid, {
441
439
  ```
442
440
  </details>
443
441
 
444
- <details>
445
- <summary><b>Location + List Menu + Extra Buttons</b></summary>
446
-
447
- ```js
448
- await sock.sendMessage(jid, {
449
- buttonLocation: {
450
- latitude: -6.2088,
451
- longitude: 106.8456,
452
- name: 'Plaza PontaCT',
453
- address: 'Jl. MH Thamrin No. 5, Jakarta',
454
- text: 'Selamat datang di pusat layanan kami.',
455
- footer: 'Buka setiap hari 09.00–21.00',
456
- thumbnail: 'https://example.com/plaza.jpg',
457
- listButtonText: 'Pilih Tujuan',
458
- listSectionTitle: 'Area Tersedia',
459
- listMenu: [
460
- { title: 'Food Court', description: 'Lt. 1 — lebih dari 30 tenant', id: 'food' },
461
- { title: 'Cinema', description: 'Lt. 4 — 8 studio', id: 'cinema' },
462
- { title: 'Customer Care', description: 'Lt. 2 — sebelah eskalator', id: 'care' }
463
- ],
464
- extraButtons: [
465
- { id: 'navigate', displayText: '🧭 Navigasi' },
466
- { id: 'promo', displayText: '🎁 Promo Hari Ini' }
467
- ]
468
- }
469
- })
470
- ```
471
- </details>
472
-
473
442
  <details>
474
443
  <summary><b>📋 Fields Reference</b></summary>
475
444
 
476
445
  | Field | Type | Required | Default | Description |
477
446
  |:---|:---|:---:|:---|:---|
478
- | `latitude` | `number` | | `0` | Latitude coordinate |
479
- | `longitude` | `number` | | `0` | Longitude coordinate |
480
- | `name` | `string` | — | `'Location'` | Place name |
481
- | `address` | `string` | — | `''` | Text address |
482
- | `text` | `string` | — | `''` | Message body text |
483
- | `footer` | `string` | — | `''` | Footer text |
484
- | `thumbnail` | `Buffer / URL / path` | | — | Map preview image |
485
- | `listButtonText` | `string` | — | `'Pilih Menu'` | List button label |
486
- | `listSectionTitle` | `string` | — | `'Pilihan'` | List section title |
487
- | `listMenu` | `array` | — | — | Menu rows |
488
- | `extraButtons` | `array` | — | — | Extra buttons |
447
+ | `latitude` | `number` | | | Latitude coordinate |
448
+ | `longitude` | `number` | | | Longitude coordinate |
449
+ | `name` | `string` | — | `'Location'` | Nama tempat |
450
+ | `address` | `string` | — | `''` | Alamat teks |
451
+ | `text` | `string` | — | `''` | Isi pesan |
452
+ | `footer` | `string` | — | `''` | Teks footer |
453
+ | `thumbnail` | `Buffer / URL / path` | | — | Gambar preview peta |
454
+ | `listButtonText` | `string` | — | `'📄 Pilih Menu'` | Label tombol list |
455
+ | `sections` | `array<{title, rows[]}>` | — | — | Section list menu, tiap `row` wajib punya `id` & `title` |
456
+ | `extraButtons` | `array<{id, displayText}>` | — | — | Tombol tambahan |
457
+
458
+ > Wajib ada minimal 1 `sections` **atau** 1 `extraButtons`.
489
459
 
490
460
  </details>
491
461
 
@@ -493,7 +463,7 @@ await sock.sendMessage(jid, {
493
463
 
494
464
  ### 📦 Order Status
495
465
 
496
- > Interactive order tracking card using native `order_status` flow button.
466
+ > Kartu order tracking interaktif menggunakan native flow button `order_status`.
497
467
 
498
468
  <details>
499
469
  <summary><b>Basic Order Status</b></summary>
@@ -504,7 +474,7 @@ await sock.sendMessage(jid, {
504
474
  image: 'https://example.com/order-banner.jpg',
505
475
  title: 'Status Pesanan',
506
476
  text: 'Pesanan kamu sedang diproses oleh penjual.',
507
- referenceId: 'ORD-20250629-001',
477
+ referenceId: 'ORD-20260629-001',
508
478
  status: 'PROCESSING',
509
479
  currency: 'IDR'
510
480
  }
@@ -519,10 +489,10 @@ await sock.sendMessage(jid, {
519
489
  await sock.sendMessage(jid, {
520
490
  orderStatus: {
521
491
  image: 'https://example.com/order.jpg',
522
- title: 'Update Pesanan #ORD-2025-001',
492
+ title: 'Update Pesanan #ORD-2026-001',
523
493
  text: 'Pesananmu sedang dalam perjalanan! 🚚',
524
494
  footer: 'Estimasi tiba: 2–3 hari kerja',
525
- referenceId: 'ORD-2025-001',
495
+ referenceId: 'ORD-2026-001',
526
496
  status: 'SHIPPED',
527
497
  subtotalValue: 15000000,
528
498
  subtotalOffset: 100,
@@ -534,40 +504,22 @@ await sock.sendMessage(jid, {
534
504
  ```
535
505
  </details>
536
506
 
537
- <details>
538
- <summary><b>Local Image File</b></summary>
539
-
540
- ```js
541
- const fs = require('fs')
542
- await sock.sendMessage(jid, {
543
- orderStatus: {
544
- image: fs.readFileSync('./assets/order-confirm.jpg'),
545
- title: 'Pesanan Dikonfirmasi ✅',
546
- text: 'Terima kasih telah berbelanja!',
547
- referenceId: 'ORD-LOCAL-001',
548
- status: 'PROCESSING',
549
- currency: 'IDR'
550
- }
551
- })
552
- ```
553
- </details>
554
-
555
507
  <details>
556
508
  <summary><b>📋 Fields Reference</b></summary>
557
509
 
558
510
  | Field | Type | Required | Default | Description |
559
511
  |:---|:---|:---:|:---|:---|
560
- | `image` | `Buffer / URL / path` | ✅ | — | Header card image |
561
- | `title` | `string` | — | `'Order Status'` | Header title |
562
- | `text` | `string` | — | `'Silakan cek status pesanan Anda.'` | Body text |
563
- | `footer` | `string` | — | `'Powered by PontaCT'` | Footer text |
564
- | `referenceId` | `string` | | `'PT-001'` | Order reference ID |
565
- | `status` | `string` | — | `'PROCESSING'` | Order status |
566
- | `subtotalValue` | `number` | — | `0` | Subtotal value (in offset units) |
567
- | `subtotalOffset` | `number` | — | `100` | Value divider |
568
- | `taxValue` | `number` | — | `0` | Tax value |
569
- | `taxOffset` | `number` | — | `100` | Tax divider |
570
- | `currency` | `string` | — | `'IDR'` | Currency code |
512
+ | `image` | `Buffer / URL / path` | ✅ | — | Gambar header kartu |
513
+ | `title` | `string` | — | `'Order Status'` | Judul header |
514
+ | `text` | `string` | — | `'Silakan cek status pesanan Anda.'` | Isi body |
515
+ | `footer` | `string` | — | `'Powered by @pontalabs/baileys'` | Teks footer |
516
+ | `referenceId` | `string` | | | ID referensi order |
517
+ | `status` | `string` | — | `'PROCESSING'` | Status order |
518
+ | `subtotalValue` | `number` | — | `0` | Nilai subtotal (dalam satuan offset) |
519
+ | `subtotalOffset` | `number` | — | `100` | Pembagi nilai |
520
+ | `taxValue` | `number` | — | `0` | Nilai pajak |
521
+ | `taxOffset` | `number` | — | `100` | Pembagi pajak |
522
+ | `currency` | `string` | — | `'IDR'` | Kode mata uang |
571
523
 
572
524
  > **Status values:** `PROCESSING` · `SHIPPED` · `DELIVERED` · `CANCELLED` · `REFUNDED`
573
525
 
@@ -575,75 +527,60 @@ await sock.sendMessage(jid, {
575
527
 
576
528
  ---
577
529
 
578
- ### 🤖 Rich Messages
530
+ ### 🤖 AI Rich Messages
579
531
 
580
- > All rich messages are sent via standard `sendMessage` and rendered as AI bot messages in WhatsApp. Use the appropriate key instead of `text`, `image`, `video`, etc.
532
+ > Semua rich message dikirim lewat `sendMessage` biasa dan dirender sebagai AI bot message di WhatsApp. **Field-nya sengaja berbeda dari fork lain** bukan `richResponse`/`headerText`/`footerText`/`disclaimerText`, tapi `aiBlocks`/`topText`/`bottomText`/`aiNotice`.
581
533
 
582
- **Quick jump:** [Rich Text](#rich-text) · [Code](#rich-code-block) · [Table](#rich-table) · [Images](#rich-images) · [Video](#rich-video) · [Suggestions](#rich-suggestions) · [LaTeX](#rich-latex) · [Product](#rich-product) · [Post](#rich-post) · [Reels](#rich-reels) · [Sources](#rich-sources) · [Tip & Footer](#rich-tip--footer) · [Mixed](#rich-mixed) · [Response](#rich-response)
534
+ **Quick jump:** [AI Blocks](#-ai-blocks--aiblocks) · [Code](#-code-block) · [Table](#-table) · [Rich Image](#-rich-image) · [Rich Video](#-rich-video) · [Suggest](#-suggest) · [LaTeX](#-latex) · [Rich Product](#-rich-product) · [Rich Post](#-rich-post) · [Reels](#-reels) · [Source](#-source) · [Header / Footer / Disclaimer](#-header--footer--disclaimer) · [Links & Citations](#-links--citations)
583
535
 
584
536
  ---
585
537
 
586
- #### 📝 Rich Text
587
-
588
- > AI bot-styled markdown text rendered in `richResponseMessage`.
538
+ #### 🔀 AI Blocks — `aiBlocks`
589
539
 
590
- <details>
591
- <summary><b>Simple Text</b></summary>
592
-
593
- ```js
594
- await sock.sendMessage(jid, { richText: 'Halo! Ini pesan dari bot.' }, { quoted: message })
595
- ```
596
- </details>
597
-
598
- <details>
599
- <summary><b>Markdown (bold, italic, inline code)</b></summary>
540
+ > Mode array — campur bebas semua tipe block dalam satu pesan. Ini pengganti pola `items`/`richResponse` di fork lain.
600
541
 
601
542
  ```js
602
543
  await sock.sendMessage(jid, {
603
- richText: '*Hasil eksekusi:*\nStatus: `success`\nWaktu: _120ms_'
544
+ aiBlocks: [
545
+ { text: 'Ini teks dari AI dengan *markdown* dan _italic_.' },
546
+ { code: 'console.log("Hello World")', language: 'javascript' },
547
+ { table: [['id', 'name', 'score'], ['1', 'Ponta', '98'], ['2', 'Yue', '87']], title: 'Leaderboard' },
548
+ { suggest: ['Lihat selengkapnya', 'Bagikan', 'Simpan'] }
549
+ ],
550
+ topText: 'Judul',
551
+ bottomText: 'Footer',
552
+ aiNotice: 'Generated by AI'
604
553
  }, { quoted: message })
605
554
  ```
606
- </details>
607
555
 
608
- <details>
609
- <summary><b>Multiple Paragraphs (Array)</b></summary>
556
+ **Valid keys di dalam array `aiBlocks`:**
610
557
 
611
- ```js
612
- await sock.sendMessage(jid, {
613
- richText: ['Baris pertama.', 'Baris kedua.', 'Baris ketiga.']
614
- }, { quoted: message })
615
- ```
616
- </details>
558
+ | Key | Keterangan |
559
+ |:---|:---|
560
+ | `{ text, inlineEntities? }` | Teks (opsional dengan citation) |
561
+ | `{ code, language }` | Code block |
562
+ | `{ table, title?, noHeading? }` | Tabel — `table` = array of rows |
563
+ | `{ richImage }` | Grid gambar |
564
+ | `{ richVideo }` | Video embed |
565
+ | `{ latex }` | Formula matematika |
566
+ | `{ richProduct }` | Kartu produk |
567
+ | `{ richPost }` | Kartu post |
568
+ | `{ reels }` | Carousel reels |
569
+ | `{ source }` | Daftar sumber pencarian |
570
+ | `{ tip }` | Teks metadata kecil |
571
+ | `{ suggest }` | Suggestion pills |
572
+ | `{ gridImage, inlineImage, dynamic, map, contentItems }` | Tipe legacy (masih didukung) |
617
573
 
618
574
  ---
619
575
 
620
- #### 💻 Rich Code Block
621
-
622
- > Syntax-highlighted code. Use `code` for single block, `codes` for multiple.
623
-
624
- <details>
625
- <summary><b>Single Block</b></summary>
626
-
627
- ```js
628
- await sock.sendMessage(jid, {
629
- code: 'console.log("Hello World")',
630
- language: 'javascript'
631
- }, { quoted: message })
632
- ```
633
- </details>
634
-
635
- <details>
636
- <summary><b>Multiple Blocks</b></summary>
576
+ #### 💻 Code Block
637
577
 
638
578
  ```js
639
579
  await sock.sendMessage(jid, {
640
- codes: [
641
- { code: 'SELECT * FROM users WHERE id = 1;', language: 'sql' },
642
- { code: '{ "id": 1, "name": "Ponta", "role": "admin" }', language: 'json' }
643
- ]
580
+ code: 'SELECT * FROM users WHERE id = 1;',
581
+ language: 'sql'
644
582
  }, { quoted: message })
645
583
  ```
646
- </details>
647
584
 
648
585
  <details>
649
586
  <summary><b>Supported Languages</b></summary>
@@ -666,373 +603,141 @@ await sock.sendMessage(jid, {
666
603
 
667
604
  ---
668
605
 
669
- #### 📊 Rich Table
670
-
671
- > Structured table with `title`, `headers`, and `rows`.
606
+ #### 📊 Table
672
607
 
673
- <details>
674
- <summary><b>Simple Table</b></summary>
675
-
676
- ```js
677
- await sock.sendMessage(jid, {
678
- table: {
679
- title: 'Daftar User',
680
- headers: ['Name', 'Role', 'Status'],
681
- rows: [
682
- ['Ponta', 'Admin', 'Active'],
683
- ['Yue', 'Member', 'Idle'],
684
- ['Frieren', 'Guest', 'Offline']
685
- ]
686
- }
687
- }, { quoted: message })
688
- ```
689
- </details>
690
-
691
- <details>
692
- <summary><b>Table without Title</b></summary>
608
+ > `table` diisi array of rows (bukan object `{headers, rows}`). Baris pertama otomatis jadi heading kecuali `noHeading: true`.
693
609
 
694
610
  ```js
695
611
  await sock.sendMessage(jid, {
696
- table: {
697
- headers: ['Command', 'Description'],
698
- rows: [
699
- ['.ping', 'Cek latency bot'],
700
- ['.info', 'Info bot'],
701
- ['.help', 'List semua command']
702
- ]
703
- }
704
- }, { quoted: message })
705
- ```
706
- </details>
707
-
708
- <details>
709
- <summary><b>Data Only (no header)</b></summary>
710
-
711
- ```js
712
- await sock.sendMessage(jid, {
713
- table: {
714
- rows: [
715
- ['RAM', '512 MB'],
716
- ['CPU', '4 Core'],
717
- ['Uptime', '99.9%']
718
- ]
719
- }
612
+ title: 'Daftar User',
613
+ table: [
614
+ ['Name', 'Role', 'Status'],
615
+ ['Ponta', 'Admin', 'Active'],
616
+ ['Yue', 'Member', 'Idle']
617
+ ]
720
618
  }, { quoted: message })
721
619
  ```
722
- </details>
723
620
 
724
621
  ---
725
622
 
726
- #### 🖼️ Rich Images
727
-
728
- > AI image grid. Single URL = single image, multiple URLs = carousel.
729
-
730
- <details>
731
- <summary><b>Single Image</b></summary>
623
+ #### 🖼️ Rich Image
732
624
 
733
625
  ```js
734
- await sock.sendMessage(jid, { richImages: 'https://example.com/photo.jpg' }, { quoted: message })
735
- ```
736
- </details>
626
+ // Satu gambar
627
+ await sock.sendMessage(jid, { richImage: 'https://example.com/photo.jpg' }, { quoted: message })
737
628
 
738
- <details>
739
- <summary><b>Multiple Images (Grid)</b></summary>
740
-
741
- ```js
629
+ // Beberapa gambar (grid)
742
630
  await sock.sendMessage(jid, {
743
- richImages: [
631
+ richImage: [
744
632
  'https://example.com/photo1.jpg',
745
633
  'https://example.com/photo2.jpg',
746
634
  'https://example.com/photo3.jpg'
747
635
  ]
748
636
  }, { quoted: message })
749
637
  ```
750
- </details>
751
-
752
- <details>
753
- <summary><b>Inside items / richResponse</b></summary>
754
-
755
- ```js
756
- // items
757
- await sock.sendMessage(jid, {
758
- items: [
759
- { text: 'Hasil foto hari ini:' },
760
- { images: ['https://example.com/1.jpg', 'https://example.com/2.jpg'] }
761
- ]
762
- }, { quoted: message })
763
-
764
- // richResponse
765
- await sock.sendMessage(jid, {
766
- richResponse: [
767
- { text: 'Lihat gambarnya:' },
768
- { images: 'https://example.com/banner.jpg' }
769
- ]
770
- }, { quoted: message })
771
- ```
772
- </details>
773
638
 
774
639
  ---
775
640
 
776
641
  #### 🎥 Rich Video
777
642
 
778
- > Video embed as AI animated media (`GenAIImaginePrimitive` with `imagine_type: ANIMATE`).
779
-
780
- <details>
781
- <summary><b>Shorthand URL</b></summary>
782
-
783
- ```js
784
- await sock.sendMessage(jid, { richVideo: 'https://example.com/clip.mp4' }, { quoted: message })
785
- ```
786
- </details>
787
-
788
- <details>
789
- <summary><b>Full Options</b></summary>
790
-
791
- ```js
792
- await sock.sendMessage(jid, {
793
- richVideo: {
794
- url: 'https://example.com/clip.mp4',
795
- mimeType: 'video/mp4', // default: 'video/mp4'
796
- duration: 15, // seconds, default: 10
797
- fallbackText: 'Preview video' // default: '[ VIDEO - PontaCT ]'
798
- }
799
- }, { quoted: message })
800
- ```
801
- </details>
802
-
803
- <details>
804
- <summary><b>Inside items / richResponse</b></summary>
643
+ > Format `url|durasiDetik`, bisa string tunggal atau array.
805
644
 
806
645
  ```js
807
- // items
808
- await sock.sendMessage(jid, {
809
- items: [
810
- { text: 'Cek videonya:' },
811
- { videoUrl: 'https://example.com/clip.mp4', duration: 20 }
812
- ]
813
- }, { quoted: message })
814
-
815
- // richResponse
816
646
  await sock.sendMessage(jid, {
817
- richResponse: [
818
- { text: 'Tutorial:' },
819
- { video: { url: 'https://example.com/tutorial.mp4', duration: 30 } }
820
- ]
647
+ richVideo: 'https://example.com/clip.mp4|15'
821
648
  }, { quoted: message })
822
649
  ```
823
- </details>
824
650
 
825
651
  ---
826
652
 
827
- #### 💡 Rich Suggestions
828
-
829
- > Follow-up prompt pills — like native AI chat buttons.
830
-
831
- <details>
832
- <summary><b>Shorthand</b></summary>
833
-
834
- ```js
835
- await sock.sendMessage(jid, {
836
- richSuggestions: ['Coba lagi', 'Lihat detail', 'Batalkan']
837
- }, { quoted: message })
838
- ```
839
- </details>
840
-
841
- <details>
842
- <summary><b>Inside items / richResponse</b></summary>
653
+ #### 💡 Suggest
843
654
 
844
655
  ```js
845
- // items
846
656
  await sock.sendMessage(jid, {
847
- items: [
848
- { text: 'Mau lanjut ke mana?' },
849
- { suggestions: ['Halaman utama', 'Bantuan', 'Hubungi admin'] }
850
- ]
851
- }, { quoted: message })
852
-
853
- // richResponse
854
- await sock.sendMessage(jid, {
855
- richResponse: [
856
- { text: 'Hasil pencarian ditemukan.' },
857
- { suggestions: ['Tampilkan semua', 'Filter ulang', 'Export'] }
858
- ]
657
+ suggest: ['Coba lagi', 'Lihat detail', 'Batalkan']
859
658
  }, { quoted: message })
860
659
  ```
861
- </details>
862
660
 
863
661
  ---
864
662
 
865
- #### 🔣 Rich LaTeX
866
-
867
- > Math formula rendering as `GenAILatexItem` inline entity. `url` points to a rendered formula image (PNG/JPG from external LaTeX renderer).
663
+ #### 🔣 LaTeX
868
664
 
869
- <details>
870
- <summary><b>Shorthand URL</b></summary>
665
+ > `latex.expressions[].url` di-generate otomatis lewat `latex.codecogs.com` kalau tidak diisi.
871
666
 
872
667
  ```js
873
668
  await sock.sendMessage(jid, {
874
- richLatex: 'https://latex.codecogs.com/png.latex?E%3Dmc%5E2'
875
- }, { quoted: message })
876
- ```
877
- </details>
878
-
879
- <details>
880
- <summary><b>Full Options</b></summary>
881
-
882
- ```js
883
- await sock.sendMessage(jid, {
884
- richLatex: {
885
- url: 'https://latex.codecogs.com/png.latex?E%3Dmc%5E2',
886
- text: 'E = mc²', // label & fallback
887
- width: 120, // default: 100
888
- height: 60, // default: 100
889
- font_height: 83.33, // default: 83.33
890
- padding: 15 // default: 15
669
+ latex: {
670
+ text: 'E = mc²',
671
+ expressions: [
672
+ { expression: 'E=mc^2', width: 120, height: 40 }
673
+ ]
891
674
  }
892
675
  }, { quoted: message })
893
676
  ```
894
- </details>
895
-
896
- <details>
897
- <summary><b>Inside items / richResponse</b></summary>
898
-
899
- ```js
900
- // items
901
- await sock.sendMessage(jid, {
902
- items: [
903
- { text: 'Rumus energi kinetik:' },
904
- {
905
- latexUrl: 'https://latex.codecogs.com/png.latex?E_k%3D%5Cfrac%7B1%7D%7B2%7Dmv%5E2',
906
- latexText: 'Ek = ½mv²',
907
- latexWidth: 150,
908
- latexHeight: 60
909
- }
910
- ]
911
- }, { quoted: message })
912
-
913
- // richResponse
914
- await sock.sendMessage(jid, {
915
- richResponse: [
916
- { text: 'Solusi integral:' },
917
- { latex: { url: 'https://latex.codecogs.com/png.latex?%5Cint%20x%5E2%20dx', text: '∫x² dx = x³/3 + C' } }
918
- ]
919
- }, { quoted: message })
920
- ```
921
- </details>
922
677
 
923
678
  ---
924
679
 
925
680
  #### 🛍️ Rich Product
926
681
 
927
- > Product card(s) as `GenAIProductItemCardPrimitive`. Object = single card, Array = horizontal scroll carousel.
928
-
929
- <details>
930
- <summary><b>Single Product</b></summary>
931
-
932
682
  ```js
683
+ // Single
933
684
  await sock.sendMessage(jid, {
934
685
  richProduct: {
935
686
  title: 'Sepatu Adidas Samba',
936
- price_display_string: 'Rp 1.200.000',
937
- description: 'Sepatu casual ikonik, tersedia berbagai ukuran.',
938
- retailer_id: 'adidas_store',
939
- thumbnail: { url: 'https://example.com/adidas.jpg', mime_type: 'image/jpeg', width: 300, height: 300 }
687
+ brand: 'Adidas',
688
+ price: 'Rp 1.200.000',
689
+ product_url: 'https://example.com/produk/adidas-samba',
690
+ image_url: 'https://example.com/adidas.jpg'
940
691
  }
941
692
  }, { quoted: message })
942
- ```
943
- </details>
944
-
945
- <details>
946
- <summary><b>Product Carousel</b></summary>
947
693
 
948
- ```js
694
+ // Carousel — cukup kirim array
949
695
  await sock.sendMessage(jid, {
950
696
  richProduct: [
951
- {
952
- title: 'Sepatu A',
953
- price_display_string: 'Rp 500.000',
954
- thumbnail: { url: 'https://example.com/a.jpg', mime_type: 'image/jpeg', width: 300, height: 300 }
955
- },
956
- {
957
- title: 'Sepatu B',
958
- price_display_string: 'Rp 750.000',
959
- thumbnail: { url: 'https://example.com/b.jpg', mime_type: 'image/jpeg', width: 300, height: 300 }
960
- }
697
+ { title: 'Sepatu A', price: 'Rp 500.000', product_url: 'https://example.com/a', image_url: 'https://example.com/a.jpg' },
698
+ { title: 'Sepatu B', price: 'Rp 750.000', product_url: 'https://example.com/b', image_url: 'https://example.com/b.jpg' }
961
699
  ]
962
700
  }, { quoted: message })
963
701
  ```
964
- </details>
965
702
 
966
703
  <details>
967
- <summary><b>Inside items / richResponse</b></summary>
704
+ <summary><b>📋 Fields Reference</b></summary>
968
705
 
969
- ```js
970
- // items
971
- await sock.sendMessage(jid, {
972
- items: [
973
- { text: 'Rekomendasi produk hari ini:' },
974
- { product: { title: 'Produk X', price_display_string: 'Rp 99.000' } }
975
- ]
976
- }, { quoted: message })
706
+ | Field | Description |
707
+ |:---|:---|
708
+ | `title`, `brand`, `price`, `sale_price` | Info produk |
709
+ | `product_url` (alias `url`) | **Wajib** diawali `http(s)://` |
710
+ | `image_url` (alias `image`) | Gambar utama |
711
+ | `icon_url` (alias `icon`) | Gambar tambahan/ikon |
977
712
 
978
- // richResponse
979
- await sock.sendMessage(jid, {
980
- richResponse: [
981
- { text: 'Pilih produkmu:' },
982
- { product: [{ title: 'A' }, { title: 'B' }] }
983
- ]
984
- }, { quoted: message })
985
- ```
986
713
  </details>
987
714
 
988
715
  ---
989
716
 
990
717
  #### 📰 Rich Post
991
718
 
992
- > Post card(s) as `GenAIPostPrimitive`. Object = single post, Array = carousel.
993
-
994
- <details>
995
- <summary><b>Single Post</b></summary>
996
-
997
719
  ```js
998
720
  await sock.sendMessage(jid, {
999
721
  richPost: {
1000
722
  title: 'Caption post ini',
1001
- author_display_name: '@pontalabs',
1002
- author_profile_image: 'https://example.com/avatar.jpg',
1003
- media_url: 'https://example.com/post.jpg',
1004
- timestamp: Math.floor(Date.now() / 1000)
723
+ username: '@pontalabs',
724
+ profile_picture_url: 'https://example.com/avatar.jpg',
725
+ thumbnail_url: 'https://example.com/post.jpg',
726
+ likes_count: 120,
727
+ comments_count: 8,
728
+ source_app: 'INSTAGRAM'
1005
729
  }
1006
730
  }, { quoted: message })
1007
731
  ```
1008
- </details>
1009
-
1010
- <details>
1011
- <summary><b>Post Carousel</b></summary>
1012
-
1013
- ```js
1014
- await sock.sendMessage(jid, {
1015
- richPost: [
1016
- { title: 'Post 1', author_display_name: '@user1', media_url: 'https://example.com/1.jpg' },
1017
- { title: 'Post 2', author_display_name: '@user2', media_url: 'https://example.com/2.jpg' }
1018
- ]
1019
- }, { quoted: message })
1020
- ```
1021
- </details>
1022
732
 
1023
733
  ---
1024
734
 
1025
- #### 🎬 Rich Reels
1026
-
1027
- > Reels carousel as `GenAIReelPrimitive` with `contentItemsMetadata`. Auto-injects `richResponseSourcesMetadata` with `provider: 'PontaCT'`.
1028
-
1029
- <details>
1030
- <summary><b>Single Reel</b></summary>
735
+ #### 🎬 Reels
1031
736
 
1032
737
  ```js
1033
738
  await sock.sendMessage(jid, {
1034
- richReels: {
1035
- title: '@creator_name',
739
+ reels: {
740
+ username: '@creator_name',
1036
741
  profileIconUrl: 'https://example.com/avatar.jpg',
1037
742
  thumbnailUrl: 'https://example.com/thumb.jpg',
1038
743
  videoUrl: 'https://example.com/reel.mp4',
@@ -1045,330 +750,72 @@ await sock.sendMessage(jid, {
1045
750
  }
1046
751
  }, { quoted: message })
1047
752
  ```
1048
- </details>
1049
-
1050
- <details>
1051
- <summary><b>Reels Carousel</b></summary>
1052
-
1053
- ```js
1054
- await sock.sendMessage(jid, {
1055
- richReels: [
1056
- {
1057
- title: '@creator1',
1058
- profileIconUrl: 'https://example.com/av1.jpg',
1059
- thumbnailUrl: 'https://example.com/th1.jpg',
1060
- videoUrl: 'https://example.com/r1.mp4',
1061
- likes_count: 5000,
1062
- reel_source: 'IG'
1063
- },
1064
- {
1065
- title: '@creator2',
1066
- profileIconUrl: 'https://example.com/av2.jpg',
1067
- thumbnailUrl: 'https://example.com/th2.jpg',
1068
- videoUrl: 'https://example.com/r2.mp4',
1069
- likes_count: 8200,
1070
- reel_source: 'TT'
1071
- }
1072
- ]
1073
- }, { quoted: message })
1074
- ```
1075
- </details>
1076
753
 
1077
754
  <details>
1078
755
  <summary><b>📋 Fields Reference</b></summary>
1079
756
 
1080
- | Field | Type | Default | Description |
1081
- |:---|:---|:---:|:---|
1082
- | `title` | `string` | — | Username / creator name |
1083
- | `profileIconUrl` | `string` | — | Avatar URL |
1084
- | `thumbnailUrl` | `string` | — | Thumbnail cover URL |
1085
- | `videoUrl` | `string` | — | Video source URL |
1086
- | `reels_title` | `string` | `''` | Reel title |
1087
- | `likes_count` | `number` | `0` | Like count |
1088
- | `shares_count` | `number` | `0` | Share count |
1089
- | `view_count` | `number` | `0` | View count |
1090
- | `reel_source` | `string` | `'IG'` | Source platform |
1091
- | `is_verified` | `boolean` | `false` | Verified badge |
1092
-
1093
- </details>
1094
-
1095
- ---
1096
-
1097
- #### 🔍 Rich Sources
1098
-
1099
- > Search result source list as `GenAISearchResultPrimitive`. Accepts full objects **or** shorthand `[faviconUrl, sourceUrl, displayName]`.
1100
-
1101
- <details>
1102
- <summary><b>Shorthand Array</b></summary>
1103
-
1104
- ```js
1105
- await sock.sendMessage(jid, {
1106
- richSources: [
1107
- ['https://wikipedia.org/favicon.ico', 'https://wikipedia.org/wiki/Node.js', 'Wikipedia'],
1108
- ['https://nodejs.org/favicon.ico', 'https://nodejs.org/en/docs', 'Node.js Docs'],
1109
- ['https://github.com/favicon.ico', 'https://github.com/nodejs/node', 'GitHub']
1110
- ]
1111
- }, { quoted: message })
1112
- ```
1113
- </details>
1114
-
1115
- <details>
1116
- <summary><b>Full Object</b></summary>
1117
-
1118
- ```js
1119
- await sock.sendMessage(jid, {
1120
- richSources: [
1121
- {
1122
- source_type: 'THIRD_PARTY',
1123
- source_display_name: 'Wikipedia',
1124
- source_subtitle: 'wikipedia.org',
1125
- source_url: 'https://wikipedia.org/wiki/Node.js',
1126
- favicon: { url: 'https://wikipedia.org/favicon.ico', mime_type: 'image/jpeg', width: 16, height: 16 }
1127
- }
1128
- ]
1129
- }, { quoted: message })
1130
- ```
1131
- </details>
1132
-
1133
- <details>
1134
- <summary><b>Mixed Format</b></summary>
757
+ | Field | Default | Description |
758
+ |:---|:---:|:---|
759
+ | `username` (alias `title`) | — | Nama creator |
760
+ | `profileIconUrl` | — | Avatar URL |
761
+ | `thumbnailUrl` | — | Thumbnail cover |
762
+ | `videoUrl` | — | Sumber video |
763
+ | `reels_title` | `''` | Judul reel |
764
+ | `likes_count`, `shares_count`, `view_count` | `0` | Statistik |
765
+ | `reel_source` | `'IG'` | Platform sumber |
766
+ | `is_verified` | `false` | Badge verified |
1135
767
 
1136
- ```js
1137
- await sock.sendMessage(jid, {
1138
- richSources: [
1139
- ['https://wikipedia.org/fav.ico', 'https://wikipedia.org', 'Wikipedia'],
1140
- { source_type: 'THIRD_PARTY', source_display_name: 'Docs', source_url: 'https://docs.example.com' }
1141
- ]
1142
- }, { quoted: message })
1143
- ```
1144
768
  </details>
1145
769
 
1146
770
  ---
1147
771
 
1148
- #### 📌 Rich Tip & Footer
1149
-
1150
- > `richTip` — small metadata text above/center of message.
1151
- > `richFooter` — metadata text below message (disclaimer / branding).
1152
-
1153
- <details>
1154
- <summary><b>Rich Tip</b></summary>
1155
-
1156
- ```js
1157
- await sock.sendMessage(jid, {
1158
- richTip: 'Dihasilkan oleh AI · pontalabs v0.3.4'
1159
- }, { quoted: message })
1160
- ```
1161
- </details>
1162
-
1163
- <details>
1164
- <summary><b>Rich Footer</b></summary>
772
+ #### 🔍 Source
1165
773
 
1166
774
  ```js
1167
775
  await sock.sendMessage(jid, {
1168
- richFooter: '© 2025 PontaCT · Data bersumber dari layanan publik'
1169
- }, { quoted: message })
1170
- ```
1171
- </details>
1172
-
1173
- <details>
1174
- <summary><b>Inside items / richResponse</b></summary>
1175
-
1176
- ```js
1177
- // items
1178
- await sock.sendMessage(jid, {
1179
- items: [
1180
- { text: 'Hasil pencarian:' },
1181
- { sources: [['https://fav.ico', 'https://example.com', 'Example']] },
1182
- { tip: 'AI-generated content' },
1183
- { footer: '© PontaCT Baileys' }
1184
- ]
1185
- }, { quoted: message })
1186
-
1187
- // richResponse
1188
- await sock.sendMessage(jid, {
1189
- richResponse: [
1190
- { text: 'Summary di sini.' },
1191
- { footer: '© PontaCT · pontalabs' }
776
+ source: [
777
+ { url: 'https://wikipedia.org/wiki/Node.js', title: 'Node.js', favicon: 'https://wikipedia.org/favicon.ico' },
778
+ { url: 'https://nodejs.org/en/docs', title: 'Node.js Docs', favicon: 'https://nodejs.org/favicon.ico' }
1192
779
  ]
1193
780
  }, { quoted: message })
1194
781
  ```
1195
- </details>
1196
782
 
1197
783
  ---
1198
784
 
1199
- #### 🔀 Rich Mixed `items`
1200
-
1201
- > Combine all rich types in any order. Array order = display order.
1202
-
1203
- **Valid keys in `items`:**
1204
-
1205
- | Key | Type |
1206
- |:---|:---|
1207
- | `{ text }` | Rich text |
1208
- | `{ code, language }` | Code block |
1209
- | `{ table }` | Table |
1210
- | `{ images }` | Image grid |
1211
- | `{ videoUrl, mimeType?, duration? }` | Video embed |
1212
- | `{ suggestions }` | Suggestion pills |
1213
- | `{ latexUrl, latexText?, latexWidth?, latexHeight? }` | LaTeX formula |
1214
- | `{ product }` | Product card(s) |
1215
- | `{ post }` | Post card(s) |
1216
- | `{ reels }` | Reels carousel |
1217
- | `{ sources }` | Search sources |
1218
- | `{ tip }` | Tip metadata |
1219
- | `{ footer }` | Footer metadata |
1220
-
1221
- <details>
1222
- <summary><b>Text + Code + Table</b></summary>
1223
-
1224
- ```js
1225
- await sock.sendMessage(jid, {
1226
- items: [
1227
- { text: 'Query yang dijalankan:' },
1228
- { code: 'SELECT id, name, score FROM users ORDER BY score DESC LIMIT 3', language: 'sql' },
1229
- { text: 'Hasil:' },
1230
- {
1231
- table: {
1232
- headers: ['id', 'name', 'score'],
1233
- rows: [
1234
- ['1', 'Ponta', '98'],
1235
- ['2', 'Yue', '87'],
1236
- ['3', 'Frieren', '75']
1237
- ]
1238
- }
1239
- }
1240
- ]
1241
- }, { quoted: message })
1242
- ```
1243
- </details>
1244
-
1245
- <details>
1246
- <summary><b>Text + Images + Video + Suggestions</b></summary>
785
+ #### 📌 Header / Footer / Disclaimer
1247
786
 
1248
- ```js
1249
- await sock.sendMessage(jid, {
1250
- items: [
1251
- { text: '*Konten hari ini*' },
1252
- { images: ['https://example.com/1.jpg', 'https://example.com/2.jpg'] },
1253
- { videoUrl: 'https://example.com/preview.mp4', duration: 15 },
1254
- { suggestions: ['Lihat selengkapnya', 'Bagikan', 'Simpan'] }
1255
- ]
1256
- }, { quoted: message })
1257
- ```
1258
- </details>
1259
-
1260
- <details>
1261
- <summary><b>Full Mixed (all types)</b></summary>
787
+ > `topText` tampil di paling atas, `bottomText` selalu tampil paling bawah (setelah semua media), `aiNotice` tampil sebagai badge disclaimer bawaan WhatsApp — **ini yang membedakan dari fork lain** yang biasanya memakai `headerText` / `footerText` / `disclaimerText`.
1262
788
 
1263
789
  ```js
1264
790
  await sock.sendMessage(jid, {
1265
- items: [
1266
- { text: '*Laporan Harian Bot*' },
1267
- { table: { headers: ['Metric', 'Value'], rows: [['Uptime', '99.9%'], ['Messages', '1.2K']] } },
1268
- { code: 'SELECT COUNT(*) FROM messages WHERE date = CURDATE()', language: 'sql' },
1269
- { text: 'Formula uptime:' },
1270
- {
1271
- latexUrl: 'https://latex.codecogs.com/png.latex?U%3D%5Cfrac%7Bt_u%7D%7Bt_t%7D%5Ctimes100',
1272
- latexText: 'U = (tu/tt) × 100'
1273
- },
1274
- { sources: [['https://example.com/fav.ico', 'https://example.com', 'Dashboard']] },
1275
- { suggestions: ['Refresh', 'Export PDF'] },
1276
- { footer: 'Auto-generated · PontaCT' }
1277
- ]
1278
- }, { quoted: message })
791
+ aiBlocks: [
792
+ { text: 'Ini teks dari AI dengan *markdown* dan **bold**.' }
793
+ ],
794
+ topText: 'Judul',
795
+ bottomText: 'Footer',
796
+ aiNotice: 'Generated by AI'
797
+ })
1279
798
  ```
1280
- </details>
1281
799
 
1282
800
  ---
1283
801
 
1284
- #### 🔗 Rich Response — `richResponse`
802
+ #### 🔗 Links & Citations
1285
803
 
1286
- > Full array mode supporting all types including inline citations via `inlineEntities`.
1287
-
1288
- **Valid keys in `richResponse`:**
1289
-
1290
- | Key | Type |
1291
- |:---|:---|
1292
- | `{ text, inlineEntities? }` | Text + optional citation/hyperlink |
1293
- | `{ code, language }` | Code block |
1294
- | `{ table, title? }` | Table |
1295
- | `{ images }` | Image grid |
1296
- | `{ video }` | Video embed |
1297
- | `{ suggestions }` | Suggestion pills |
1298
- | `{ latex }` | LaTeX formula |
1299
- | `{ product }` | Product card(s) |
1300
- | `{ post }` | Post card(s) |
1301
- | `{ reels }` | Reels carousel |
1302
- | `{ sources }` | Search sources |
1303
- | `{ tip }` | Tip metadata |
1304
- | `{ footer }` | Footer metadata |
1305
-
1306
- <details>
1307
- <summary><b>Inline Citation</b></summary>
804
+ > `links` bisa digabung dengan tipe lain di mode flat, dan otomatis diubah jadi teks bernomor + citation.
1308
805
 
1309
806
  ```js
1310
807
  await sock.sendMessage(jid, {
1311
- richResponse: [
808
+ links: [
1312
809
  {
1313
- text: 'Node.js {{SS_0}}¹{{/SS_0}} adalah runtime JavaScript. Dibuat oleh Ryan Dahl {{SS_1}}²{{/SS_1}} pada 2009.',
1314
- inlineEntities: [
1315
- {
1316
- key: 'SS_0',
1317
- metadata: {
1318
- reference_id: 1,
1319
- reference_url: 'https://nodejs.org',
1320
- reference_title: 'Node.js Official',
1321
- reference_display_name: 'nodejs.org',
1322
- sources: [{
1323
- source_type: 'THIRD_PARTY',
1324
- source_display_name: 'nodejs.org',
1325
- source_subtitle: 'nodejs.org',
1326
- source_url: 'https://nodejs.org'
1327
- }],
1328
- __typename: 'GenAISearchCitationItem'
1329
- }
1330
- },
1331
- {
1332
- key: 'SS_1',
1333
- metadata: {
1334
- reference_id: 2,
1335
- reference_url: 'https://wikipedia.org/wiki/Ryan_Dahl',
1336
- reference_title: 'Ryan Dahl - Wikipedia',
1337
- reference_display_name: 'Wikipedia',
1338
- sources: [{
1339
- source_type: 'THIRD_PARTY',
1340
- source_display_name: 'Wikipedia',
1341
- source_subtitle: 'wikipedia.org',
1342
- source_url: 'https://wikipedia.org/wiki/Ryan_Dahl'
1343
- }],
1344
- __typename: 'GenAISearchCitationItem'
1345
- }
1346
- }
1347
- ]
810
+ text: 'Node.js adalah runtime JavaScript',
811
+ title: 'Node.js Official',
812
+ url: 'https://nodejs.org',
813
+ sources: [{ url: 'https://nodejs.org', displayName: 'nodejs.org' }]
1348
814
  }
1349
- ]
1350
- }, { quoted: message })
1351
- ```
1352
- </details>
1353
-
1354
- <details>
1355
- <summary><b>Full Response — all types at once</b></summary>
1356
-
1357
- ```js
1358
- await sock.sendMessage(jid, {
1359
- richResponse: [
1360
- { text: '*Hasil Pencarian:* Node.js {{SS_0}}¹{{/SS_0}}', inlineEntities: [/* ... */] },
1361
- { images: ['https://example.com/nodejs.png'] },
1362
- { text: 'Cara install:' },
1363
- { code: 'npm install node', language: 'bash' },
1364
- { table: { headers: ['Version', 'LTS', 'Release'], rows: [['22.x', 'Yes', '2024'], ['21.x', 'No', '2023']] } },
1365
- { sources: [['https://nodejs.org/fav.ico', 'https://nodejs.org', 'Node.js']] },
1366
- { suggestions: ['Lihat changelog', 'Download', 'Docs'] },
1367
- { footer: 'PontaCT · pontalabs' }
1368
- ]
815
+ ],
816
+ bottomText: 'Sumber: nodejs.org'
1369
817
  }, { quoted: message })
1370
818
  ```
1371
- </details>
1372
819
 
1373
820
  ---
1374
821
 
@@ -1378,11 +825,8 @@ await sock.sendMessage(jid, {
1378
825
  <summary><b>📋 Get Newsletter Metadata</b></summary>
1379
826
 
1380
827
  ```js
1381
- // By invite code
1382
828
  const newsletter = await sock.newsletterMetadata('invite', '0029Vaf0HPMLdQeZsp3XRp2T')
1383
-
1384
- // By JID
1385
- const newsletter = await sock.newsletterMetadata('jid', '120363282083849178@newsletter')
829
+ const newsletter2 = await sock.newsletterMetadata('jid', '120363282083849178@newsletter')
1386
830
  ```
1387
831
  </details>
1388
832
 
@@ -1415,11 +859,7 @@ const newsletter = await sock.newsletterCreate(
1415
859
  <summary><b>🌟 React to Newsletter Post</b></summary>
1416
860
 
1417
861
  ```js
1418
- await sock.newsletterReactMessage(
1419
- '120363282083849178@newsletter',
1420
- '12', // server message ID
1421
- '🦖' // emoji
1422
- )
862
+ await sock.newsletterReactMessage('120363282083849178@newsletter', '12', '🦖')
1423
863
  ```
1424
864
  </details>
1425
865
 
@@ -1446,10 +886,10 @@ console.log('Group JID:', group.id)
1446
886
  ```js
1447
887
  const jid = '123456789@g.us'
1448
888
 
1449
- await sock.groupSettingUpdate(jid, 'announcement') // admin-only messages
1450
- await sock.groupSettingUpdate(jid, 'not_announcement') // all members can send
1451
- await sock.groupSettingUpdate(jid, 'locked') // admin-only edit info
1452
- await sock.groupSettingUpdate(jid, 'unlocked') // all members can edit info
889
+ await sock.groupSettingUpdate(jid, 'announcement')
890
+ await sock.groupSettingUpdate(jid, 'not_announcement')
891
+ await sock.groupSettingUpdate(jid, 'locked')
892
+ await sock.groupSettingUpdate(jid, 'unlocked')
1453
893
  ```
1454
894
  </details>
1455
895
 
@@ -1473,54 +913,41 @@ await sock.groupParticipantsUpdate(jid, participants, 'demote')
1473
913
  const code = await sock.groupInviteCode(jid)
1474
914
  console.log('Link: https://chat.whatsapp.com/' + code)
1475
915
 
1476
- // Revoke & generate new link
1477
916
  const newCode = await sock.groupRevokeInvite(jid)
1478
917
  ```
1479
918
  </details>
1480
919
 
1481
- <details>
1482
- <summary><b>📋 Group Metadata</b></summary>
1483
-
1484
- ```js
1485
- const metadata = await sock.groupMetadata(jid)
1486
- console.log('Name:', metadata.subject)
1487
- console.log('Participants:', metadata.participants.length)
1488
- ```
1489
- </details>
1490
-
1491
920
  <details>
1492
921
  <summary><b>📢 Group Status</b></summary>
1493
922
 
1494
- > Send group status (`groupStatusMessageV2`) with audience control and styling. `message` can be a `string` or a prepared WAMessage object.
923
+ > Kirim status grup lewat `groupStatusMessage`. `message` boleh `string` biasa (dianggap `text`) atau object payload `sendMessage` lain (mis. media).
1495
924
 
1496
925
  ```js
1497
926
  // Text Status
1498
927
  await sock.sendMessage(jid, {
1499
- groupStatus: {
1500
- message: 'Selamat datang di grup PontaCT! 🎉',
1501
- audienceType: 0 // 0 = all members
928
+ groupStatusMessage: {
929
+ message: { text: 'Selamat datang di grup PontaCT! 🎉' },
930
+ audienceType: 0
1502
931
  }
1503
932
  })
1504
933
 
1505
934
  // Styled Text Status
1506
935
  await sock.sendMessage(jid, {
1507
- groupStatus: {
1508
- message: 'Bot aktif kembali! ✅',
936
+ groupStatusMessage: {
937
+ message: { text: 'Bot aktif kembali! ✅' },
1509
938
  audienceType: 0,
1510
- backgroundArgb: 0xFF1A1A2E,
1511
- textArgb: 0xFFFFFFFF,
939
+ backgroundColor: '#1A1A2E',
940
+ textColor: '#FFFFFF',
1512
941
  font: 4
1513
942
  }
1514
943
  })
1515
944
 
1516
945
  // Media Status
1517
- const { imageMessage } = await prepareWAMessageMedia(
1518
- { image: { url: 'https://example.com/banner.jpg' } },
1519
- { upload: sock.waUploadToServer }
1520
- )
1521
-
1522
946
  await sock.sendMessage(jid, {
1523
- groupStatus: { message: { imageMessage }, audienceType: 0 }
947
+ groupStatusMessage: {
948
+ message: { image: { url: 'https://example.com/banner.jpg' } },
949
+ audienceType: 0
950
+ }
1524
951
  })
1525
952
  ```
1526
953
 
@@ -1529,11 +956,11 @@ await sock.sendMessage(jid, {
1529
956
 
1530
957
  | Field | Type | Required | Default | Description |
1531
958
  |:---|:---|:---:|:---|:---|
1532
- | `message` | `string / object` | ✅ | — | Status content (string or WAMessage) |
959
+ | `message` | `object` | ✅ | — | Payload pesan (`{ text }`, `{ image }`, dst) |
1533
960
  | `audienceType` | `number` | — | `0` | Target audience (0 = all) |
1534
- | `backgroundArgb` | `number` | — | — | Background ARGB color (text only) |
1535
- | `textArgb` | `number` | — | — | Text ARGB color (text only) |
1536
- | `font` | `number` | — | — | Font style 0–9 (text only) |
961
+ | `backgroundColor` | `string / number` | — | — | Hex (`'#ff6b9d'`) atau integer ARGB hanya untuk teks |
962
+ | `textColor` | `string / number` | — | — | Hex atau integer ARGB hanya untuk teks |
963
+ | `font` | `number` | — | — | Gaya font 0–9 hanya untuk teks |
1537
964
 
1538
965
  </details>
1539
966
 
@@ -1565,12 +992,12 @@ await sock.updateBlockStatus(jid, 'unblock')
1565
992
  <summary><b>👁️ Privacy Settings</b></summary>
1566
993
 
1567
994
  ```js
1568
- await sock.updateLastSeenPrivacy('all') // 'all' | 'contacts' | 'none'
1569
- await sock.updateOnlinePrivacy('all') // 'all' | 'match_last_seen'
1570
- await sock.updateProfilePicturePrivacy('all') // 'all' | 'contacts' | 'none'
1571
- await sock.updateReadReceiptsPrivacy('all') // 'all' | 'none'
1572
- await sock.updateGroupsAddPrivacy('all') // 'all' | 'contacts'
1573
- await sock.updateDefaultDisappearingMode(86400) // 0 = disable
995
+ await sock.updateLastSeenPrivacy('all')
996
+ await sock.updateOnlinePrivacy('all')
997
+ await sock.updateProfilePicturePrivacy('all')
998
+ await sock.updateReadReceiptsPrivacy('all')
999
+ await sock.updateGroupsAddPrivacy('all')
1000
+ await sock.updateDefaultDisappearingMode(86400)
1574
1001
  ```
1575
1002
  </details>
1576
1003
 
@@ -1583,7 +1010,7 @@ await sock.updateDefaultDisappearingMode(86400) // 0 = disable
1583
1010
 
1584
1011
  ```js
1585
1012
  const sock = makeWASocket({
1586
- logger: { level: 'debug' }, // 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace'
1013
+ logger: { level: 'debug' },
1587
1014
  auth: state
1588
1015
  })
1589
1016
  ```
@@ -1596,10 +1023,6 @@ const sock = makeWASocket({
1596
1023
  sock.ws.on('CB:presence', (json) => {
1597
1024
  console.log('Presence update:', json)
1598
1025
  })
1599
-
1600
- sock.ws.on('CB:edge_routing', (node) => {
1601
- console.log('Edge routing:', node)
1602
- })
1603
1026
  ```
1604
1027
  </details>
1605
1028
 
@@ -1607,34 +1030,39 @@ sock.ws.on('CB:edge_routing', (node) => {
1607
1030
 
1608
1031
  ## 📚 API Reference
1609
1032
 
1610
- | Method | Description |
1033
+ | Method / Field | Description |
1611
1034
  |:---|:---|
1612
- | `makeWASocket(options)` | Create a new WhatsApp socket connection |
1613
- | `useMultiFileAuthState(path)` | Multi-file authentication state manager |
1614
- | `sock.sendMessage(jid, content, opts)` | Send any message type |
1615
- | `sock.sendAlbumMessage(jid, contents, opts)` | Send album/carousel of media |
1616
- | `sock.groupCreate(title, participants)` | Create a new group |
1617
- | `sock.groupMetadata(jid)` | Fetch group metadata |
1618
- | `sock.groupSettingUpdate(jid, setting)` | Update group settings |
1619
- | `sock.groupParticipantsUpdate(jid, participants, action)` | Modify group members |
1620
- | `sock.groupInviteCode(jid)` | Get group invite code |
1621
- | `sock.groupRevokeInvite(jid)` | Revoke and regenerate invite |
1622
- | `sock.newsletterMetadata(type, value)` | Fetch newsletter info |
1623
- | `sock.newsletterCreate(name, desc, picture)` | Create a newsletter |
1624
- | `sock.newsletterFollow(jid)` | Follow a newsletter |
1625
- | `sock.newsletterUnfollow(jid)` | Unfollow a newsletter |
1626
- | `sock.newsletterMute(jid)` | Mute a newsletter |
1627
- | `sock.newsletterUnmute(jid)` | Unmute a newsletter |
1628
- | `sock.newsletterReactMessage(jid, id, emoji)` | React to a newsletter post |
1629
- | `sock.updateProfilePicture(jid, content)` | Update profile picture |
1630
- | `sock.removeProfilePicture(jid)` | Remove profile picture |
1631
- | `sock.updateBlockStatus(jid, status)` | Block or unblock a user |
1632
- | `sock.updateLastSeenPrivacy(value)` | Control last seen visibility |
1633
- | `sock.updateOnlinePrivacy(value)` | Control online status visibility |
1634
- | `sock.updateProfilePicturePrivacy(value)` | Control profile picture visibility |
1635
- | `sock.updateReadReceiptsPrivacy(value)` | Control read receipts |
1636
- | `sock.updateGroupsAddPrivacy(value)` | Control who can add you to groups |
1637
- | `sock.updateDefaultDisappearingMode(seconds)` | Set default disappearing messages |
1035
+ | `makeWASocket(options)` | Buat koneksi socket WhatsApp baru |
1036
+ | `useMultiFileAuthState(path)` | Multi-file auth state manager |
1037
+ | `sock.sendMessage(jid, content, opts)` | Kirim pesan tipe apa pun |
1038
+ | `content.album` | Kirim album/carousel media (min. 2 item) |
1039
+ | `content.aiBlocks` | Kirim rich AI message berbagai tipe (lihat [AI Rich Messages](#-ai-rich-messages)) |
1040
+ | `content.topText / bottomText / aiNotice` | Header / footer / disclaimer untuk AI rich message |
1041
+ | `content.buttonLocation` | Pesan lokasi + list menu / extra buttons |
1042
+ | `content.orderStatus` | Kartu order tracking interaktif |
1043
+ | `content.groupStatusMessage` | Kirim status grup dengan styling |
1044
+ | `sock.groupCreate(title, participants)` | Buat grup baru |
1045
+ | `sock.groupMetadata(jid)` | Ambil metadata grup |
1046
+ | `sock.groupSettingUpdate(jid, setting)` | Update pengaturan grup |
1047
+ | `sock.groupParticipantsUpdate(jid, participants, action)` | Ubah anggota grup |
1048
+ | `sock.groupInviteCode(jid)` | Ambil kode undangan grup |
1049
+ | `sock.groupRevokeInvite(jid)` | Cabut & buat ulang undangan |
1050
+ | `sock.newsletterMetadata(type, value)` | Ambil info newsletter |
1051
+ | `sock.newsletterCreate(name, desc, picture)` | Buat newsletter |
1052
+ | `sock.newsletterFollow(jid)` | Follow newsletter |
1053
+ | `sock.newsletterUnfollow(jid)` | Unfollow newsletter |
1054
+ | `sock.newsletterMute(jid)` | Mute newsletter |
1055
+ | `sock.newsletterUnmute(jid)` | Unmute newsletter |
1056
+ | `sock.newsletterReactMessage(jid, id, emoji)` | React ke post newsletter |
1057
+ | `sock.updateProfilePicture(jid, content)` | Update foto profil |
1058
+ | `sock.removeProfilePicture(jid)` | Hapus foto profil |
1059
+ | `sock.updateBlockStatus(jid, status)` | Block / unblock user |
1060
+ | `sock.updateLastSeenPrivacy(value)` | Atur visibilitas last seen |
1061
+ | `sock.updateOnlinePrivacy(value)` | Atur visibilitas status online |
1062
+ | `sock.updateProfilePicturePrivacy(value)` | Atur visibilitas foto profil |
1063
+ | `sock.updateReadReceiptsPrivacy(value)` | Atur read receipts |
1064
+ | `sock.updateGroupsAddPrivacy(value)` | Atur siapa yang bisa menambahkan ke grup |
1065
+ | `sock.updateDefaultDisappearingMode(seconds)` | Atur default disappearing messages |
1638
1066
 
1639
1067
  ---
1640
1068
 
@@ -1650,31 +1078,31 @@ sock.ws.on('CB:edge_routing', (node) => {
1650
1078
 
1651
1079
  ## 🤝 Contributing
1652
1080
 
1653
- 1. **Fork** the repository
1654
- 2. Create a feature branch: `git checkout -b feat/your-feature`
1655
- 3. Commit your changes: `git commit -m "feat: add something awesome"`
1656
- 4. Push to your branch: `git push origin feat/your-feature`
1657
- 5. Open a **Pull Request**
1081
+ 1. **Fork** repository ini
1082
+ 2. Buat feature branch: `git checkout -b feat/your-feature`
1083
+ 3. Commit perubahan: `git commit -m "feat: add something awesome"`
1084
+ 4. Push ke branch kamu: `git push origin feat/your-feature`
1085
+ 5. Buka **Pull Request**
1658
1086
 
1659
1087
  ---
1660
1088
 
1661
1089
  ## 📜 License
1662
1090
 
1663
- This project is licensed for **personal and non-commercial use only**.
1091
+ Proyek ini dilisensikan untuk **penggunaan personal dan non-komersial saja**.
1664
1092
 
1665
1093
  | | |
1666
1094
  |:---:|:---|
1667
- | ✅ | Personal use and modification allowed |
1668
- | ✅ | Redistribution with attribution allowed |
1669
- | ❌ | Commercial use strictly prohibited |
1670
- | ❌ | Resale or rebranding prohibited |
1095
+ | ✅ | Penggunaan dan modifikasi personal diperbolehkan |
1096
+ | ✅ | Redistribusi dengan atribusi diperbolehkan |
1097
+ | ❌ | Penggunaan komersial dilarang keras |
1098
+ | ❌ | Dijual ulang atau rebranding dilarang |
1671
1099
 
1672
1100
  ---
1673
1101
 
1674
1102
  ## ⚠️ Disclaimer
1675
1103
 
1676
- > This project is **not affiliated with WhatsApp or Meta** in any way.
1677
- > Use at your own risk and refer to WhatsApp's [Terms of Service](https://www.whatsapp.com/legal/terms-of-service) for compliance.
1104
+ > Proyek ini **tidak berafiliasi dengan WhatsApp atau Meta** dengan cara apa pun.
1105
+ > Gunakan dengan risiko sendiri dan lihat [Terms of Service](https://www.whatsapp.com/legal/terms-of-service) WhatsApp untuk kepatuhan.
1678
1106
 
1679
1107
  ---
1680
1108