plogme 2.1.0 → 2.1.2

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 (147) hide show
  1. package/README.md +226 -2
  2. package/WAProto/WAProto.proto +12 -0
  3. package/WAProto/index.d.ts +12 -0
  4. package/WAProto/index.js +12 -0
  5. package/engine-requirements.js +12 -0
  6. package/lib/Defaults/ban-checker.js +12 -0
  7. package/lib/Defaults/index.js +12 -0
  8. package/lib/Signal/Group/ciphertext-message.js +12 -0
  9. package/lib/Signal/Group/group-session-builder.js +12 -0
  10. package/lib/Signal/Group/group_cipher.js +12 -0
  11. package/lib/Signal/Group/index.js +12 -0
  12. package/lib/Signal/Group/keyhelper.js +12 -0
  13. package/lib/Signal/Group/sender-chain-key.js +12 -0
  14. package/lib/Signal/Group/sender-key-distribution-message.js +12 -0
  15. package/lib/Signal/Group/sender-key-message.js +12 -0
  16. package/lib/Signal/Group/sender-key-name.js +12 -0
  17. package/lib/Signal/Group/sender-key-record.js +12 -0
  18. package/lib/Signal/Group/sender-key-state.js +12 -0
  19. package/lib/Signal/Group/sender-message-key.js +12 -0
  20. package/lib/Signal/libsignal.js +12 -0
  21. package/lib/Signal/lid-mapping.js +12 -0
  22. package/lib/Socket/Client/index.js +12 -0
  23. package/lib/Socket/Client/types.js +12 -0
  24. package/lib/Socket/Client/websocket.js +12 -0
  25. package/lib/Socket/aigroups.js +12 -0
  26. package/lib/Socket/ban-checker.js +12 -0
  27. package/lib/Socket/business.js +12 -0
  28. package/lib/Socket/chats.js +12 -0
  29. package/lib/Socket/communities.js +12 -0
  30. package/lib/Socket/graphql.js +12 -0
  31. package/lib/Socket/groups.js +12 -0
  32. package/lib/Socket/index.js +12 -0
  33. package/lib/Socket/interactive-handler.js +12 -0
  34. package/lib/Socket/interop.js +12 -0
  35. package/lib/Socket/managed-account.js +12 -0
  36. package/lib/Socket/messages-recv.js +12 -0
  37. package/lib/Socket/messages-send.js +358 -7
  38. package/lib/Socket/mex.js +12 -0
  39. package/lib/Socket/newsletter.js +12 -0
  40. package/lib/Socket/privacy.js +12 -0
  41. package/lib/Socket/registration.js +12 -0
  42. package/lib/Socket/socket.js +12 -0
  43. package/lib/Socket/username.js +12 -0
  44. package/lib/Store/index.js +12 -0
  45. package/lib/Store/make-cache-manager-store.js +12 -0
  46. package/lib/Store/make-in-memory-store.js +12 -0
  47. package/lib/Store/make-ordered-dictionary.js +12 -0
  48. package/lib/Store/object-repository.js +12 -0
  49. package/lib/Types/Auth.js +12 -0
  50. package/lib/Types/Bussines.js +12 -0
  51. package/lib/Types/Call.js +12 -0
  52. package/lib/Types/Chat.js +12 -0
  53. package/lib/Types/Contact.js +12 -0
  54. package/lib/Types/Events.js +12 -0
  55. package/lib/Types/GroupMetadata.js +12 -0
  56. package/lib/Types/Label.js +12 -0
  57. package/lib/Types/LabelAssociation.js +12 -0
  58. package/lib/Types/Message.js +12 -0
  59. package/lib/Types/Mex.js +12 -0
  60. package/lib/Types/Product.js +12 -0
  61. package/lib/Types/RichType.js +12 -0
  62. package/lib/Types/Signal.js +12 -0
  63. package/lib/Types/Socket.js +12 -0
  64. package/lib/Types/State.js +12 -0
  65. package/lib/Types/USync.js +12 -0
  66. package/lib/Types/index.js +12 -0
  67. package/lib/Utils/auth-utils.js +12 -0
  68. package/lib/Utils/bot-capabilities.js +12 -0
  69. package/lib/Utils/bot-planning-replay.js +12 -0
  70. package/lib/Utils/browser-utils.js +12 -0
  71. package/lib/Utils/business.js +12 -0
  72. package/lib/Utils/channel-policy.js +12 -0
  73. package/lib/Utils/chat-utils.js +12 -0
  74. package/lib/Utils/companion-reg-client-utils.js +12 -0
  75. package/lib/Utils/consumer-application.js +12 -0
  76. package/lib/Utils/crypto.js +12 -0
  77. package/lib/Utils/decode-wa-message.js +12 -0
  78. package/lib/Utils/event-buffer.js +12 -0
  79. package/lib/Utils/games/miniapp.js +12 -0
  80. package/lib/Utils/games/slot-machine.js +12 -0
  81. package/lib/Utils/games/website-preview.js +12 -0
  82. package/lib/Utils/generics.js +12 -0
  83. package/lib/Utils/group-history.js +12 -0
  84. package/lib/Utils/history.js +12 -0
  85. package/lib/Utils/identity-change-handler.js +12 -0
  86. package/lib/Utils/index.js +12 -0
  87. package/lib/Utils/jid-display-normalization.js +12 -0
  88. package/lib/Utils/link-preview.js +12 -0
  89. package/lib/Utils/logger.js +12 -0
  90. package/lib/Utils/lt-hash.js +12 -0
  91. package/lib/Utils/make-mutex.js +12 -0
  92. package/lib/Utils/message-composer.js +18 -1
  93. package/lib/Utils/message-inspect.js +12 -0
  94. package/lib/Utils/message-retry-manager.js +12 -0
  95. package/lib/Utils/messages-media.js +12 -0
  96. package/lib/Utils/messages.js +232 -4
  97. package/lib/Utils/meta-ai-msmsg.js +12 -0
  98. package/lib/Utils/meta-compositing.js +12 -0
  99. package/lib/Utils/native-flow.js +12 -0
  100. package/lib/Utils/noise-handler.js +12 -0
  101. package/lib/Utils/offline-node-processor.js +12 -0
  102. package/lib/Utils/pre-key-manager.js +12 -0
  103. package/lib/Utils/process-message.js +12 -0
  104. package/lib/Utils/reporting-utils.js +12 -0
  105. package/lib/Utils/rich-message-utils.js +484 -91
  106. package/lib/Utils/signal.js +12 -0
  107. package/lib/Utils/source-grep.js +12 -0
  108. package/lib/Utils/stanza-ack.js +12 -0
  109. package/lib/Utils/sync-action-utils.js +12 -0
  110. package/lib/Utils/tc-token-utils.js +12 -0
  111. package/lib/Utils/use-multi-file-auth-state.js +12 -0
  112. package/lib/Utils/use-single-file-auth-state.js +12 -0
  113. package/lib/Utils/use-sqlite-auth-state.js +12 -0
  114. package/lib/Utils/validate-connection.js +12 -0
  115. package/lib/Utils/view-once-utils.js +12 -0
  116. package/lib/Utils/voip-rekey.js +12 -0
  117. package/lib/Utils/welcome-flow.js +12 -0
  118. package/lib/WABinary/constants.js +12 -0
  119. package/lib/WABinary/decode.js +12 -0
  120. package/lib/WABinary/encode.js +12 -0
  121. package/lib/WABinary/generic-utils.js +12 -0
  122. package/lib/WABinary/index.js +12 -0
  123. package/lib/WABinary/jid-utils.js +12 -0
  124. package/lib/WABinary/types.js +12 -0
  125. package/lib/WAM/BinaryInfo.js +12 -0
  126. package/lib/WAM/constants.js +12 -0
  127. package/lib/WAM/encode.js +12 -0
  128. package/lib/WAM/index.js +12 -0
  129. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +12 -0
  130. package/lib/WAUSync/Protocols/USyncContactProtocol.js +12 -0
  131. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +12 -0
  132. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +12 -0
  133. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +12 -0
  134. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +12 -0
  135. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +12 -0
  136. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +12 -0
  137. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +12 -0
  138. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +12 -0
  139. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +12 -0
  140. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +12 -0
  141. package/lib/WAUSync/Protocols/index.js +12 -0
  142. package/lib/WAUSync/USyncQuery.js +12 -0
  143. package/lib/WAUSync/USyncUser.js +12 -0
  144. package/lib/WAUSync/index.js +12 -0
  145. package/lib/index.d.ts +50 -2
  146. package/lib/index.js +12 -0
  147. package/package.json +9 -2
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/index.js
5
+ * About: WAUSync module for the Plogme WhatsApp protocol client.
6
+ * Important exports: No public exports detected; module side effects or declarations are local.
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  export * from './Protocols/index.js';
2
14
  export * from './USyncQuery.js';
3
15
  export * from './USyncUser.js';
package/lib/index.d.ts CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/index.d.ts
5
+ * About: Index.d module for the Plogme WhatsApp protocol client.
6
+ * Important exports: WAMessageKey, StatusOptions, PollVoteEvent, StatusContent, GroupStatusContent, StatusPrivacyList, StatusCustomList, BroadcastListQuota; …
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  export interface WAMessageKey {
2
14
  remoteJid?: string | null;
3
15
  fromMe?: boolean | null;
@@ -50,6 +62,8 @@ export interface StatusContent {
50
62
 
51
63
  export interface GroupStatusContent extends StatusContent {
52
64
  groupStatus: true;
65
+ /** Select the legacy groupStatusMessage envelope for compatibility testing. */
66
+ groupStatusVersion?: 'legacy' | 'v1' | 'v2';
53
67
  }
54
68
 
55
69
  /** One status distribution list entry as returned by `getStatusPrivacy`. */
@@ -390,8 +404,35 @@ export interface MetaCompositedOptions {
390
404
  export declare function editMetaMessage(sock: WASocket, jid: string, key: WAMessageKey, content: Record<string, unknown>, sendOptions?: Record<string, unknown>, streamContext?: Record<string, unknown>): Promise<unknown>;
391
405
  export declare function sendMetaComposited(sock: WASocket, jid: string, content: Record<string, unknown>, options?: MetaCompositedOptions): Promise<unknown>;
392
406
 
407
+ export type PlogmeSimpleTable = unknown[][];
408
+ export interface PlogmeRichTable {
409
+ title?: string;
410
+ headers: unknown[];
411
+ rows: unknown[][];
412
+ headerText?: string;
413
+ footer?: string;
414
+ }
415
+ export type PlogmeTableInput = PlogmeSimpleTable | PlogmeRichTable;
416
+ export interface PlogmeMessageContent extends Record<string, unknown> {
417
+ table?: PlogmeTableInput;
418
+ richTable?: PlogmeRichTable;
419
+ tables?: PlogmeTableInput[];
420
+ }
421
+
393
422
  export interface WASocket {
394
423
  sendMessage(jid: string | string[], content: StatusContent | GroupStatusContent | Record<string, unknown>, options?: Partial<StatusOptions> & Record<string, unknown>): Promise<unknown>;
424
+ /** Send legacy reply buttons with one optional image, video, document, or location header. */
425
+ replyButton(jid: string, buttons: Array<Record<string, unknown>>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
426
+ /** Send a file; set photo_live to send it as an associated still-image/motion-video pair. */
427
+ sendFile(jid: string, media: unknown, filename?: string, caption?: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
428
+ /** Send a motion photo from a video, optionally supplying its still image or thumbnail. */
429
+ sendPhotoLive(jid: string, content: { video: unknown; image?: unknown; thumbnail?: unknown; videoThumbnail?: Uint8Array; imageThumbnail?: Uint8Array; caption?: string; text?: string; motionPhotoPresentationOffsetMs?: number; presentationOffsetMs?: number }, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
430
+ /** Send or edit a textual progress bar. Set messageKey to update a prior progress message. */
431
+ sendProgress(jid: string, text: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
432
+ /** Send text with an external preview card using custom URL, title, thumbnail, and attribution. */
433
+ sendMessageModify(jid: string, text: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
434
+ /** Compatibility alias for sendMessageModify. */
435
+ sendMessageModifyV2(jid: string, text: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
395
436
  /** Send at least two image/video URL items as a full-width AIRich vertical album. */
396
437
  sendAlbumMessage(jid: string, medias: AlbumMediaInput[], options?: Record<string, unknown>): Promise<unknown>;
397
438
  /** Send an AIRich unified-response grid of GenAIVideoPrimitive items. Requires at least two video URLs. */
@@ -464,8 +505,12 @@ export interface WASocket {
464
505
  sendBotPlanning(jid: string, content?: { text?: string; steps?: Array<string | { title?: string; name?: string; body?: string }>; queryPlan?: boolean; botJid?: string }, options?: Record<string, unknown>): Promise<unknown>;
465
506
  /** Send a rich response with experimental resolved tool-call metadata. */
466
507
  sendBotToolResult(jid: string, content?: { text?: string; toolCallId?: string; resolutionData?: unknown; resolutionDataSerialized?: string; botJid?: string }, options?: Record<string, unknown>): Promise<unknown>;
467
- /** Send one tolerant AIRich response containing every supported section supplied in content. */
468
- sendPlogmeMessage(jid: string, content?: Record<string, unknown>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
508
+ /** Send one tolerant AIRich response, including simple or rich-preview tables in caller order. */
509
+ sendPlogmeMessage(jid: string, content?: PlogmeMessageContent, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
510
+ /** Send rich media using both native Plogme primitives and the additive New compatibility-compatible shape. */
511
+ sendNewRichMedia(jid: string, content?: Record<string, unknown>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
512
+ /** Send a native group status with optional private named-audience metadata. */
513
+ sendGroupStatus(jid: string, content: Record<string, unknown>, options?: { private?: { name?: string; emoji?: string }; [key: string]: unknown }): Promise<unknown>;
469
514
  /** Send a compact forwarded AIRich label bubble with optional colors and variant. */
470
515
  sendRichLabelMessage(jid: string, content?: { text?: string; variant?: string; backgroundColor?: string; textColor?: string; responseId?: string }, options?: Record<string, unknown>): Promise<Record<string, unknown>>;
471
516
  /** Send a prompt through the verified Meta AI/Hatch route and return its message ID. */
@@ -488,6 +533,9 @@ export interface WASocket {
488
533
  updateRichGeneration(jid: string, targetId: string, content?: RichGenerationContent, options?: Record<string, unknown>): Promise<RichGenerationResult>;
489
534
  /** Send a carousel-style rich grid where each card exposes native reply buttons. */
490
535
  sendRichButtonGrid(jid: string, grid: { text?: string; footer?: string; cards: Array<{ title?: string; caption?: string; image?: unknown; buttons?: Array<{ id?: string; text?: string; buttonText?: string; url?: string; call?: string; copy?: string; sections?: unknown[] }>; nativeFlow?: unknown[] }> }, options?: Record<string, unknown>): Promise<unknown>;
536
+ /** Send a native WhatsApp carousel; accepts either options or quoted, options after the card list. */
537
+ sendCarousel(jid: string, cards: Array<Record<string, unknown>>, options?: Record<string, unknown>): Promise<unknown>;
538
+ sendCarousel(jid: string, cards: Array<Record<string, unknown>>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
491
539
  /** Send a Markdown-rendered table with optional image media and reply buttons. */
492
540
  sendInteractiveTable(jid: string, table: { title?: string; headers?: unknown[]; rows?: unknown[][]; image?: unknown; buttons?: Array<{ id?: string; text?: string; buttonText?: string }>; footer?: string }, options?: Record<string, unknown>): Promise<unknown>;
493
541
  deleteGroupStatus(jid: string, key: WAMessageKey): Promise<unknown>;
package/lib/index.js CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/index.js
5
+ * About: Lib module for the Plogme WhatsApp protocol client.
6
+ * Important exports: makeWASocket, checkStatusWA
7
+ * Directions: Import the listed exports and preserve protocol, validation, and compatibility invariants when modifying.
8
+ *
9
+ * Copyright and attribution notice.
10
+ * Do not copy, reproduce, redistribute, modify, or create derivative works
11
+ * from this source without explicit written permission.
12
+ */
1
13
  import makeWASocket, { checkStatusWA } from './Socket/index.js';
2
14
  export * from '../WAProto/index.js';
3
15
  export * from './Utils/index.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "plogme",
3
- "version": "2.1.0",
4
- "description": "Production-ready Baileys fork ⚉ with AI groups, Meta AI prompting, safe compositing fallbacks, rich responses, interactive messages, albums, newsletters, and communities — without antiban wrappers.",
3
+ "version": "2.1.2",
4
+ "description": "Production-ready Baileys fork ⚉ with AI groups, Meta AI prompting, safe compositing fallbacks, rich responses, interactive messages, albums, newsletters, and communities — with antiban wrappers.",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -30,6 +30,13 @@
30
30
  "cody ai",
31
31
  "bot-planning-replay",
32
32
  "plogme",
33
+ "richHtmlMessages",
34
+ "group status",
35
+ "animated wallpapers",
36
+ "request location",
37
+ "unified rich response",
38
+ "rich table preview",
39
+ "antiban baileys",
33
40
  "interactive-messages",
34
41
  "js-whatsapp",
35
42
  "meta-compositing",