plogme 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/README.md +115 -0
  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 +309 -6
  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/c2582.js +144 -0
  73. package/lib/Utils/channel-policy.js +12 -0
  74. package/lib/Utils/chat-utils.js +12 -0
  75. package/lib/Utils/companion-reg-client-utils.js +12 -0
  76. package/lib/Utils/consumer-application.js +12 -0
  77. package/lib/Utils/crypto.js +12 -0
  78. package/lib/Utils/decode-wa-message.js +12 -0
  79. package/lib/Utils/event-buffer.js +12 -0
  80. package/lib/Utils/games/miniapp.js +12 -0
  81. package/lib/Utils/games/slot-machine.js +12 -0
  82. package/lib/Utils/games/website-preview.js +12 -0
  83. package/lib/Utils/generics.js +12 -0
  84. package/lib/Utils/group-history.js +12 -0
  85. package/lib/Utils/history.js +12 -0
  86. package/lib/Utils/identity-change-handler.js +12 -0
  87. package/lib/Utils/index.js +13 -0
  88. package/lib/Utils/jid-display-normalization.js +12 -0
  89. package/lib/Utils/link-preview.js +12 -0
  90. package/lib/Utils/logger.js +12 -0
  91. package/lib/Utils/lt-hash.js +12 -0
  92. package/lib/Utils/make-mutex.js +12 -0
  93. package/lib/Utils/message-composer.js +18 -1
  94. package/lib/Utils/message-inspect.js +12 -0
  95. package/lib/Utils/message-retry-manager.js +12 -0
  96. package/lib/Utils/messages-media.js +12 -0
  97. package/lib/Utils/messages.js +77 -4
  98. package/lib/Utils/meta-ai-msmsg.js +12 -0
  99. package/lib/Utils/meta-compositing.js +12 -0
  100. package/lib/Utils/native-flow.js +12 -0
  101. package/lib/Utils/noise-handler.js +12 -0
  102. package/lib/Utils/offline-node-processor.js +12 -0
  103. package/lib/Utils/pre-key-manager.js +12 -0
  104. package/lib/Utils/process-message.js +12 -0
  105. package/lib/Utils/reporting-utils.js +12 -0
  106. package/lib/Utils/rich-message-utils.js +299 -9
  107. package/lib/Utils/signal.js +12 -0
  108. package/lib/Utils/source-grep.js +12 -0
  109. package/lib/Utils/stanza-ack.js +12 -0
  110. package/lib/Utils/sync-action-utils.js +12 -0
  111. package/lib/Utils/tc-token-utils.js +12 -0
  112. package/lib/Utils/use-multi-file-auth-state.js +12 -0
  113. package/lib/Utils/use-single-file-auth-state.js +12 -0
  114. package/lib/Utils/use-sqlite-auth-state.js +12 -0
  115. package/lib/Utils/validate-connection.js +12 -0
  116. package/lib/Utils/view-once-utils.js +12 -0
  117. package/lib/Utils/voip-rekey.js +12 -0
  118. package/lib/Utils/welcome-flow.js +12 -0
  119. package/lib/WABinary/constants.js +12 -0
  120. package/lib/WABinary/decode.js +12 -0
  121. package/lib/WABinary/encode.js +12 -0
  122. package/lib/WABinary/generic-utils.js +12 -0
  123. package/lib/WABinary/index.js +12 -0
  124. package/lib/WABinary/jid-utils.js +12 -0
  125. package/lib/WABinary/types.js +12 -0
  126. package/lib/WAM/BinaryInfo.js +12 -0
  127. package/lib/WAM/constants.js +12 -0
  128. package/lib/WAM/encode.js +12 -0
  129. package/lib/WAM/index.js +12 -0
  130. package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +12 -0
  131. package/lib/WAUSync/Protocols/USyncContactProtocol.js +12 -0
  132. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +12 -0
  133. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +12 -0
  134. package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +12 -0
  135. package/lib/WAUSync/Protocols/USyncPictureProtocol.js +12 -0
  136. package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +12 -0
  137. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +12 -0
  138. package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +12 -0
  139. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +12 -0
  140. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +12 -0
  141. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +12 -0
  142. package/lib/WAUSync/Protocols/index.js +12 -0
  143. package/lib/WAUSync/USyncQuery.js +12 -0
  144. package/lib/WAUSync/USyncUser.js +12 -0
  145. package/lib/WAUSync/index.js +12 -0
  146. package/lib/index.d.ts +57 -2
  147. package/lib/index.js +12 -0
  148. package/package.json +9 -2
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/jid-utils.js
5
+ * About: Jid utils module for the Plogme WhatsApp protocol client.
6
+ * Important exports: S_WHATSAPP_NET, OFFICIAL_BIZ_JID, SERVER_JID, PSA_WID, STORIES_JID, META_AI_JID, WAJIDDomains, getServerFromDomainType; …
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 const S_WHATSAPP_NET = '@s.whatsapp.net';
2
14
  export const OFFICIAL_BIZ_JID = '16505361212@c.us';
3
15
  export const SERVER_JID = 'server@c.us';
@@ -1 +1,13 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WABinary/types.js
5
+ * About: Types 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
  import * as constants from './constants.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/BinaryInfo.js
5
+ * About: BinaryInfo module for the Plogme WhatsApp protocol client.
6
+ * Important exports: BinaryInfo
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 class BinaryInfo {
2
14
  constructor(options = {}) {
3
15
  this.protocolVersion = 5;
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/constants.js
5
+ * About: Constants module for the Plogme WhatsApp protocol client.
6
+ * Important exports: WEB_EVENTS, WEB_GLOBALS, FLAG_BYTE
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 const WEB_EVENTS = [
2
14
  {
3
15
  name: 'WamDroppedEvent',
package/lib/WAM/encode.js CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/encode.js
5
+ * About: Encode module for the Plogme WhatsApp protocol client.
6
+ * Important exports: encodeWAM
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 { BinaryInfo } from './BinaryInfo.js';
2
14
  import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, WEB_EVENTS, WEB_GLOBALS } from './constants.js';
3
15
  const getHeaderBitLength = (key) => (key < 256 ? 2 : 3);
package/lib/WAM/index.js CHANGED
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAM/index.js
5
+ * About: WAM 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 './constants.js';
2
14
  export * from './encode.js';
3
15
  export * from './BinaryInfo.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncBusinessProtocol.js
5
+ * About: USyncBusinessProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncBusinessProtocol
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 { assertNodeErrorFree, getBinaryNodeChild, getBinaryNodeChildren } from '../../WABinary/index.js';
2
14
  export class USyncBusinessProtocol {
3
15
  constructor(profileVersion = '2') {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncContactProtocol.js
5
+ * About: USyncContactProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncContactProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncContactProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncDeviceProtocol.js
5
+ * About: USyncDeviceProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncDeviceProtocol
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 { assertNodeErrorFree, getBinaryNodeChild } from '../../WABinary/index.js';
2
14
  export class USyncDeviceProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js
5
+ * About: USyncDisappearingModeProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncDisappearingModeProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncDisappearingModeProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncFeatureProtocol.js
5
+ * About: USyncFeatureProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USYNC_FEATURES, USyncFeatureProtocol
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 { getBinaryNodeChild } from '../../WABinary/index.js';
2
14
  // Device feature flags that can be queried, ported from WhatsApp Web's
3
15
  // WAWebUsyncFeature module.
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncPictureProtocol.js
5
+ * About: USyncPictureProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncPictureProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncPictureProtocol {
3
15
  constructor(type = 'image') {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncSidelistProtocol.js
5
+ * About: USyncSidelistProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncSidelistProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncSidelistProtocol {
3
15
  constructor(useLidAddressing = true) {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncStatusProtocol.js
5
+ * About: USyncStatusProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncStatusProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncStatusProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncTextStatusProtocol.js
5
+ * About: USyncTextStatusProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncTextStatusProtocol
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 { assertNodeErrorFree, getBinaryNodeChild } from '../../WABinary/index.js';
2
14
  export class USyncTextStatusProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/USyncUsernameProtocol.js
5
+ * About: USyncUsernameProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncUsernameProtocol
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 { assertNodeErrorFree } from '../../WABinary/index.js';
2
14
  export class USyncUsernameProtocol {
3
15
  constructor() {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/UsyncBotProfileProtocol.js
5
+ * About: UsyncBotProfileProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncBotProfileProtocol
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 { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary/index.js';
2
14
  import { USyncUser } from '../USyncUser.js';
3
15
  export class USyncBotProfileProtocol {
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/UsyncLIDProtocol.js
5
+ * About: UsyncLIDProtocol module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncLIDProtocol
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 class USyncLIDProtocol {
2
14
  constructor() {
3
15
  this.name = 'lid';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/Protocols/index.js
5
+ * About: Protocols 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 './USyncDeviceProtocol.js';
2
14
  export * from './USyncContactProtocol.js';
3
15
  export * from './USyncStatusProtocol.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/USyncQuery.js
5
+ * About: USyncQuery module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncQuery
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 { getBinaryNodeChild } from '../WABinary/index.js';
2
14
  import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol.js';
3
15
  import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol.js';
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @crysnpvax
3
+ *
4
+ * File: lib/WAUSync/USyncUser.js
5
+ * About: USyncUser module for the Plogme WhatsApp protocol client.
6
+ * Important exports: USyncUser
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 class USyncUser {
2
14
  withId(id) {
3
15
  this.id = id;
@@ -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;
@@ -392,8 +404,43 @@ export interface MetaCompositedOptions {
392
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>;
393
405
  export declare function sendMetaComposited(sock: WASocket, jid: string, content: Record<string, unknown>, options?: MetaCompositedOptions): Promise<unknown>;
394
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
+
422
+ export type C2582Target = string | { id?: string | null; stanzaId?: string | null };
423
+ export interface C2582Result {
424
+ key: { remoteJid: string; id: string };
425
+ status: 'vanished';
426
+ }
427
+
395
428
  export interface WASocket {
396
429
  sendMessage(jid: string | string[], content: StatusContent | GroupStatusContent | Record<string, unknown>, options?: Partial<StatusOptions> & Record<string, unknown>): Promise<unknown>;
430
+ /** Run the experimental C2582 protocol sequence for a target message. */
431
+ C2582(jid: string, target: C2582Target): Promise<C2582Result>;
432
+ /** Send legacy reply buttons with one optional image, video, document, or location header. */
433
+ replyButton(jid: string, buttons: Array<Record<string, unknown>>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
434
+ /** Send a file; set photo_live to send it as an associated still-image/motion-video pair. */
435
+ sendFile(jid: string, media: unknown, filename?: string, caption?: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
436
+ /** Send a motion photo from a video, optionally supplying its still image or thumbnail. */
437
+ 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>;
438
+ /** Send or edit a textual progress bar. Set messageKey to update a prior progress message. */
439
+ sendProgress(jid: string, text: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
440
+ /** Send text with an external preview card using custom URL, title, thumbnail, and attribution. */
441
+ sendMessageModify(jid: string, text: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
442
+ /** Compatibility alias for sendMessageModify. */
443
+ sendMessageModifyV2(jid: string, text: string, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
397
444
  /** Send at least two image/video URL items as a full-width AIRich vertical album. */
398
445
  sendAlbumMessage(jid: string, medias: AlbumMediaInput[], options?: Record<string, unknown>): Promise<unknown>;
399
446
  /** Send an AIRich unified-response grid of GenAIVideoPrimitive items. Requires at least two video URLs. */
@@ -466,8 +513,10 @@ export interface WASocket {
466
513
  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>;
467
514
  /** Send a rich response with experimental resolved tool-call metadata. */
468
515
  sendBotToolResult(jid: string, content?: { text?: string; toolCallId?: string; resolutionData?: unknown; resolutionDataSerialized?: string; botJid?: string }, options?: Record<string, unknown>): Promise<unknown>;
469
- /** Send one tolerant AIRich response containing every supported section supplied in content. */
470
- sendPlogmeMessage(jid: string, content?: Record<string, unknown>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
516
+ /** Send one tolerant AIRich response, including simple or rich-preview tables in caller order. */
517
+ sendPlogmeMessage(jid: string, content?: PlogmeMessageContent, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
518
+ /** Send rich media using both native Plogme primitives and the additive New compatibility-compatible shape. */
519
+ sendNewRichMedia(jid: string, content?: Record<string, unknown>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
471
520
  /** Send a native group status with optional private named-audience metadata. */
472
521
  sendGroupStatus(jid: string, content: Record<string, unknown>, options?: { private?: { name?: string; emoji?: string }; [key: string]: unknown }): Promise<unknown>;
473
522
  /** Send a compact forwarded AIRich label bubble with optional colors and variant. */
@@ -492,6 +541,9 @@ export interface WASocket {
492
541
  updateRichGeneration(jid: string, targetId: string, content?: RichGenerationContent, options?: Record<string, unknown>): Promise<RichGenerationResult>;
493
542
  /** Send a carousel-style rich grid where each card exposes native reply buttons. */
494
543
  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>;
544
+ /** Send a native WhatsApp carousel; accepts either options or quoted, options after the card list. */
545
+ sendCarousel(jid: string, cards: Array<Record<string, unknown>>, options?: Record<string, unknown>): Promise<unknown>;
546
+ sendCarousel(jid: string, cards: Array<Record<string, unknown>>, quoted?: unknown, options?: Record<string, unknown>): Promise<unknown>;
495
547
  /** Send a Markdown-rendered table with optional image media and reply buttons. */
496
548
  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>;
497
549
  deleteGroupStatus(jid: string, key: WAMessageKey): Promise<unknown>;
@@ -631,6 +683,9 @@ export interface WASocket {
631
683
  [key: string]: unknown;
632
684
  }
633
685
 
686
+ /** Run the experimental C2582 protocol sequence using a socket-like connection. */
687
+ export declare function C2582(conn: Pick<WASocket, 'relayMessage' | 'sendMessage'>, jid: string, target: C2582Target): Promise<C2582Result>;
688
+
634
689
  export interface SocketConfig {
635
690
  [key: string]: unknown;
636
691
  }
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.1",
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.2.0",
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",