@vanzxy/baileys 2.0.1 → 2.0.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.
package/NOTICE.md CHANGED
@@ -34,9 +34,8 @@ below was MIT-licensed at its source at the time it was ported.
34
34
  entry. Let me know which and I'll finalize it.
35
35
 
36
36
  ### MessageBuilder v4.7 additions (setResponseId/setBotResponseId/hasId/getIds/peek/delete)
37
- - **Source:** credited in-code only as "temen's MessageBuilderV4.7" (`temen` = Indonesian for "friend/buddy") not a resolvable handle or repo.
37
+ - **Source:** Nixel same author/watermark as the main MessageBuilder/AIRich base above ("temen's MessageBuilderV4.7" in the in-code credit refers to Nixel, confirmed by the person who introduced this codebase).
38
38
  - **Location in this package:** `lib/Utils/MessageBuilder.js` (`~line 2120, 2885, 2916`).
39
- - **⚠ Needs your input:** I can't attribute this properly without the actual author/repo name. Let me know who this refers to.
40
39
 
41
40
  ### Button/list addon-kind resolution logic
42
41
  - **Source:** vinikjkkj, [zapo](https://github.com/vinikjkkj/zapo) (MIT).
package/README.md CHANGED
@@ -74,7 +74,7 @@
74
74
  - [💖 Support](#-support)
75
75
  - [👑 Maintainer](#-maintainer)
76
76
  - [⚠️ Disclaimer](#-disclaimer)
77
- - [📝 Patch Notes](#-v6-patch-notes)
77
+ - [📝 Patch Notes](#-v7-patch-notes)
78
78
 
79
79
  </details>
80
80
 
@@ -524,10 +524,14 @@ Every message builder lives in its own file under `lib/Builders/`, so you can tr
524
524
  | `ButtonV3.js` | `ButtonV3` | Built around `loadFrom(msg)` — loads an existing `templateMessage` (e.g. one you fetched or that was quoted) so you can edit it in place instead of building one from scratch. |
525
525
  | `Carousel.js` | `Carousel` | Chains `Button(...).toCard()` results into a swipeable card carousel. Capped at `Carousel.MAX_CARDS` (10) since WhatsApp silently truncates anything beyond that. |
526
526
  | `Poll.js` | `Poll` | Poll/vote message builder — question, options, single/multi-select, hidden-voter mode, correct-answer marking, expiry. |
527
+ | `NativeFlow.js` | `NativeFlow` | Modern `interactiveMessage`/`nativeFlowMessage` builder — `cta_url`, `cta_copy`, `cta_call`, `quick_reply`, `single_select`, offer banners, and the "..." options bottom-sheet. The recommended replacement for `ButtonV3`'s legacy hydrated-template buttons. |
528
+ | `Location.js` | `Location` | Static location pins via the existing `location` shorthand, plus live/moving locations (built directly against `WAProto.Message.LiveLocationMessage` since there's no shorthand for that yet — call `send()` again with a higher `setSequence()` to push updates). |
529
+ | `Contact.js` | `Contact` | vCard contact-card builder — one contact sends as `contactMessage`, two or more as `contactsArrayMessage`. `addContact()` generates a minimal VCARD 3.0 block from plain fields; `addRawVcard()` accepts a pre-built vCard string. |
530
+ | `Album.js` | `Album` | Media-group/album builder — bundles 2+ images/videos. Thin wrapper: the actual cover + delayed-follow-up sending is already handled by the `content.album` shorthand in `Socket/messages-send.js`. |
527
531
  | `AIRich.js` | `AIRich` (+ aliases `ORich`, `AIVanzxy`, `LeafRich`, `VanzxyAI`, `VanzxyRich`, `RichVanzxy`) | The rich AI-assistant-style response builder described above — headings, formatted text, tables, media/product/post cards, task/progress cards, tip banners, quick-reply suggestions. |
528
532
  | `A2UI.js` | `A2UI`, `sendA2UIWidget` | Lower-level A2UI/Bloks widget builder. Builds the flat `components` tree (Column/Row → `children`, Card/Button → `child`, Modal → `trigger`/`content`) that Bloks widgets expect and sends it through the same `getBizBinaryNode()` path as `Button`/`ButtonV2`, so the wire-level node always matches the button names actually sent. |
529
- | `VanzxyBaileys.js` | `VanzxyBaileys` | A unified builder **hub** — one object that wraps all the builders above behind short method names (`.button()`, `.buttonV2()`, `.buttonV3()`, `.carousel()`, `.poll()`, `.airich()`, `.a2ui()`), plus PascalCase aliases (`.Button()`, `.Carousel()`, `.Poll()`, `.AIRich()`, `.A2UI()`) for developers who prefer that naming style. Nothing new is implemented here — it's purely a single entry point over the individual classes. |
530
- | `index.js` | everything above, plus `MESSAGE_BUILDER_VERSION` | The barrel file — re-exports every builder and its aliases so `import { Button, Poll, AIRich, VanzxyBaileys } from '@vanzxy/baileys'` works without reaching into individual files. `MESSAGE_BUILDER_VERSION` tracks the builder API surface's own version, independent of the package version. |
533
+ | `VanzxyBaileys.js` | `VanzxyBaileys` | A unified builder **hub** — one object that wraps all the builders above behind short method names (`.button()`, `.buttonV2()`, `.buttonV3()`, `.carousel()`, `.poll()`, `.nativeFlow()`, `.location()`, `.contact()`, `.album()`, `.airich()`, `.a2ui()`), plus PascalCase aliases (`.Button()`, `.Carousel()`, `.Poll()`, `.NativeFlow()`, `.Location()`, `.Contact()`, `.Album()`, `.AIRich()`, `.A2UI()`) for developers who prefer that naming style. Nothing new is implemented here — it's purely a single entry point over the individual classes. |
534
+ | `index.js` | everything above, plus `MESSAGE_BUILDER_VERSION` | The barrel file — re-exports every builder and its aliases so `import { Button, Poll, AIRich, VanzxyBaileys } from '@vanzxy/baileys'` works without reaching into individual files. `MESSAGE_BUILDER_VERSION` tracks the builder API surface's own version, independent of the package version (currently `5.0`). |
531
535
 
532
536
  **Unified hub example** — useful if you'd rather carry one object around than import each builder individually:
533
537
 
@@ -826,6 +830,17 @@ Use responsibly and follow WhatsApp Terms of Service.
826
830
 
827
831
  ---
828
832
 
833
+ ## 📝 V7 Patch Notes
834
+
835
+ - Added four new builders to `lib/Builders/` (see the [📁 Builders Folder Map](#-builders-folder-map-libbuilders) for details), wired into both `index.js` and the `VanzxyBaileys` hub:
836
+ - `NativeFlow.js` — modern `interactiveMessage`/`nativeFlowMessage` builder (`cta_url`, `cta_copy`, `cta_call`, `quick_reply`, `single_select`), the recommended replacement for `ButtonV3`'s legacy hydrated-template buttons.
837
+ - `Location.js` — static + live location builder.
838
+ - `Contact.js` — single/multi vCard contact-card builder.
839
+ - `Album.js` — media-group/album builder (thin wrapper over the existing `content.album` shorthand).
840
+ - Fixed a version mismatch: `AIRich.js`'s internal `VERSION` constant was still `4.7` while `index.js`'s `MESSAGE_BUILDER_VERSION` had already moved to `4.8`. Both now read `5.0`.
841
+
842
+ ---
843
+
829
844
  ## 📝 V6 Patch Notes
830
845
 
831
846
  - Fixed a `package.json` typo: the version field was mistakenly left at `1.0.1` instead of `2.0.1` after the V5 release — corrected to `2.0.1` so the published package version matches the intended release.