@pontasockets/baileys 0.2.6 → 0.2.7

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 (2) hide show
  1. package/README.md +36 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -494,6 +494,12 @@ await sock.sendMessage(jid, {
494
494
 
495
495
  > Render teks dengan citation/footnote yang bisa diklik — mirip jawaban AI WhatsApp yang punya referensi sumber
496
496
 
497
+ **Format citation di teks:** `{{KEY}}N{{/KEY}}`
498
+ - `KEY` harus cocok dengan field `key` di `inlineEntities`
499
+ - `N` adalah nomor urut footnote (¹²³ atau 1 2 3)
500
+
501
+ ---
502
+
497
503
  **Single citation**
498
504
 
499
505
  ```javascript
@@ -537,7 +543,12 @@ await sock.sendMessage(jid, {
537
543
  reference_url: 'https://nodejs.org',
538
544
  reference_title: 'Node.js Official',
539
545
  reference_display_name: 'nodejs.org',
540
- sources: [{ source_type: 'THIRD_PARTY', source_display_name: 'nodejs.org', source_subtitle: 'nodejs.org', source_url: 'https://nodejs.org' }],
546
+ sources: [{
547
+ source_type: 'THIRD_PARTY',
548
+ source_display_name: 'nodejs.org',
549
+ source_subtitle: 'nodejs.org',
550
+ source_url: 'https://nodejs.org'
551
+ }],
541
552
  __typename: 'GenAISearchCitationItem'
542
553
  }
543
554
  },
@@ -548,7 +559,12 @@ await sock.sendMessage(jid, {
548
559
  reference_url: 'https://wikipedia.org/wiki/Ryan_Dahl',
549
560
  reference_title: 'Ryan Dahl - Wikipedia',
550
561
  reference_display_name: 'Wikipedia',
551
- sources: [{ source_type: 'THIRD_PARTY', source_display_name: 'Wikipedia', source_subtitle: 'wikipedia.org', source_url: 'https://wikipedia.org/wiki/Ryan_Dahl' }],
562
+ sources: [{
563
+ source_type: 'THIRD_PARTY',
564
+ source_display_name: 'Wikipedia',
565
+ source_subtitle: 'wikipedia.org',
566
+ source_url: 'https://wikipedia.org/wiki/Ryan_Dahl'
567
+ }],
552
568
  __typename: 'GenAISearchCitationItem'
553
569
  }
554
570
  }
@@ -572,23 +588,32 @@ await sock.sendMessage(jid, {
572
588
  reference_url: 'https://nodejs.org/en/download',
573
589
  reference_title: 'Download Node.js',
574
590
  reference_display_name: 'nodejs.org',
575
- sources: [{ source_type: 'THIRD_PARTY', source_display_name: 'nodejs.org', source_subtitle: 'nodejs.org', source_url: 'https://nodejs.org/en/download' }],
591
+ sources: [{
592
+ source_type: 'THIRD_PARTY',
593
+ source_display_name: 'nodejs.org',
594
+ source_subtitle: 'nodejs.org',
595
+ source_url: 'https://nodejs.org/en/download'
596
+ }],
576
597
  __typename: 'GenAISearchCitationItem'
577
598
  }
578
599
  }]
579
600
  },
580
- { code: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -\napt-get install -y nodejs', language: 'bash' },
581
- { text: '_Verifikasi instalasi dengan_ `node --version`' }
601
+ {
602
+ code: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
603
+ apt-get install -y nodejs',
604
+ language: 'bash'
605
+ },
606
+ {
607
+ text: '_Verifikasi instalasi dengan_ `node --version`'
608
+ }
582
609
  ]
583
610
  }, { quoted: message })
584
611
  ```
585
612
 
586
- > **Format citation di teks:** `{{KEY}}N{{/KEY}}` — `KEY` harus cocok dengan `key` di `inlineEntities`, `N` adalah nomor urut footnote
587
-
588
- > **`richResponse` array** support semua tipe yang sama dengan `items`:
589
- > - `{ text, inlineEntities? }` — teks / markdown dengan optional citation
590
- > - `{ code, language }` — code block
591
- > - `{ table, title? }` — tabel (rows langsung array of arrays `[items[], isHeading?]`)
613
+ > **Tipe yang valid di dalam `richResponse`:**
614
+ > - `{ text, inlineEntities? }` — teks/markdown, dengan optional citation
615
+ > - `{ code, language }` code block (tokenized)
616
+ > - `{ table, title? }` — tabel, `table` berupa `[{ items: string[], isHeading?: bool }, ...]`
592
617
 
593
618
  </details>`{ code: 'string', language: 'string' }` — code block
594
619
  > - `{ table: { title?, headers?, rows } }` — tabel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pontasockets/baileys",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Baileys is a lightweight JavaScript library for interacting with the WhatsApp Web API using WebSocket.",
5
5
  "keywords": [
6
6
  "facebook",