@vinzsocket/baileys 3.2.11 → 3.2.12
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/README.md +5 -5
- package/lib/Socket/dugong.js +35 -0
- package/lib/Socket/groups.d.ts +262 -156
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**Fork WebSocket library WhatsApp Web Multi-Device — dasar dari ekosistem bot Harps-MD**
|
|
6
6
|
|
|
7
7
|
[](https://github.com/VinzSocket/Baileys)
|
|
8
|
-

|
|
9
9
|

|
|
10
10
|

|
|
11
11
|

|
|
@@ -1218,7 +1218,7 @@ await conn.sendMessage(groupJid, {
|
|
|
1218
1218
|
})
|
|
1219
1219
|
```
|
|
1220
1220
|
|
|
1221
|
-
> ⚠️ **Penting:** sejak v3.2.
|
|
1221
|
+
> ⚠️ **Penting:** sejak v3.2.12, setiap mode `handleGroupStory()` **wajib** menyertakan `additionalNodes` (node `<meta is_vsn2="1">`) di panggilan `relayMessage()`-nya. Tanpa ini, pesan tetap terkirim & ter-enkripsi normal (tidak ada error), tapi klien penerima tidak tahu payload tersebut harus dirender sebagai story grup — sehingga tidak pernah muncul sebagai ring status untuk anggota lain. Detail lengkap bug ini ada di [Changelog v3.2.12](#-changelog-ringkas). Jika Anda memakai versi ≥ 3.2.12, ini sudah otomatis tertangani.
|
|
1222
1222
|
|
|
1223
1223
|
### Story Card Generator (`renderStoryCard`)
|
|
1224
1224
|
|
|
@@ -2318,7 +2318,7 @@ Jika handler lama Anda memiliki logic khusus untuk mem-parsing `buttonsResponseM
|
|
|
2318
2318
|
|
|
2319
2319
|
### Q: Bot terkoneksi tapi tombol/list yang saya kirim tidak muncul di HP penerima?
|
|
2320
2320
|
|
|
2321
|
-
**A:** Ini hampir selalu soal `additionalNodes` binary hint yang hilang. Jika Anda memakai `sock.sendMessage()` biasa, ini seharusnya sudah otomatis. Jika Anda memakai `relayMessage()` secara manual, pastikan menyertakan `buildInteractiveAdditionalNodes(jid, message)` — lihat bagian [`buildInteractiveAdditionalNodes`](#buildinteractiveadditionalnodes--kenapa-wajib-ada). Pastikan juga Anda sedang menjalankan versi ≥ 3.2.
|
|
2321
|
+
**A:** Ini hampir selalu soal `additionalNodes` binary hint yang hilang. Jika Anda memakai `sock.sendMessage()` biasa, ini seharusnya sudah otomatis. Jika Anda memakai `relayMessage()` secara manual, pastikan menyertakan `buildInteractiveAdditionalNodes(jid, message)` — lihat bagian [`buildInteractiveAdditionalNodes`](#buildinteractiveadditionalnodes--kenapa-wajib-ada). Pastikan juga Anda sedang menjalankan versi ≥ 3.2.12 untuk `groupStatusMessage`, karena bug ini pernah terjadi khusus untuk Group Status V2 sebelum versi tersebut.
|
|
2322
2322
|
|
|
2323
2323
|
### Q: Error `ERR_REQUIRE_ESM` saat `require('@vinzsocket/baileys')`?
|
|
2324
2324
|
|
|
@@ -2348,7 +2348,7 @@ Modul ini sengaja **lazy-imported** (tidak jadi hard dependency) supaya konsumen
|
|
|
2348
2348
|
|
|
2349
2349
|
### Q: Apakah Harps-Baileys mendukung WhatsApp Flow (form registrasi multi-field native)?
|
|
2350
2350
|
|
|
2351
|
-
**A:** Dukungan native multi-field Flow form (`flow_json` dengan banyak field terstruktur, validasi server-side, dsb — fitur "WhatsApp Flows" penuh) **belum diverifikasi tersedia** secara native di fork ini pada versi 3.2.
|
|
2351
|
+
**A:** Dukungan native multi-field Flow form (`flow_json` dengan banyak field terstruktur, validasi server-side, dsb — fitur "WhatsApp Flows" penuh) **belum diverifikasi tersedia** secara native di fork ini pada versi 3.2.12. Alternatif yang bisa dipakai sekarang adalah **form terpandu bertahap** (guided step-by-step): kirim serangkaian pertanyaan satu per satu memakai `interactiveMessage` biasa (teks/tombol/list) dan simpan progres jawaban di state percakapan bot Anda sendiri, alih-alih mengandalkan satu payload Flow form native. Jika kebutuhan Anda spesifik untuk Flow form penuh, pantau `CHANGELOG.md` untuk update fitur ini di rilis mendatang.
|
|
2352
2352
|
|
|
2353
2353
|
### Q: Pesan text saya yang mengandung URL tidak menampilkan link preview?
|
|
2354
2354
|
|
|
@@ -2870,7 +2870,7 @@ done
|
|
|
2870
2870
|
|
|
2871
2871
|
Riwayat perubahan lengkap ada di [`CHANGELOG.md`](./CHANGELOG.md). Ringkasan rilis terbaru:
|
|
2872
2872
|
|
|
2873
|
-
### v3.2.
|
|
2873
|
+
### v3.2.12 (2026-07-06) — Bug Fix Kritis Group Status
|
|
2874
2874
|
|
|
2875
2875
|
**Masalah:** status/story grup (`groupStatusMessage`) tidak pernah muncul sebagai ring status untuk anggota lain, walaupun `relayMessage()` berhasil tanpa error sama sekali.
|
|
2876
2876
|
|
package/lib/Socket/dugong.js
CHANGED
|
@@ -482,6 +482,41 @@ export class ExtendedMessageBuilder {
|
|
|
482
482
|
innerMessage = await this.bail.generateWAMessageContent(s, { upload: this.waUploadToServer });
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
+
// PATCH (parity fix): WA client pakai contextInfo.isGroupStatus + statusSourceType
|
|
486
|
+
// pada pesan bagian dalam (mis. imageMessage.contextInfo) buat mutusin apakah
|
|
487
|
+
// pesan ini dirender sebagai STATUS RING grup atau cuma pesan biasa. Tanpa ini,
|
|
488
|
+
// relayMessage() tetap sukses (makanya kelihatan "berhasil" di reply bot) tapi
|
|
489
|
+
// WA client menampilkannya sebagai pesan biasa di dalam chat grup, bukan status —
|
|
490
|
+
// persis kayak yang sebelumnya kejadian di sini. Enum statusSourceType resmi WA:
|
|
491
|
+
// IMAGE=0, VIDEO=1, GIF=2, AUDIO=3, TEXT=4, MUSIC_STANDALONE=5.
|
|
492
|
+
const statusSourceTypeByType = {
|
|
493
|
+
imageMessage: 0,
|
|
494
|
+
videoMessage: s.gif ? 2 : 1,
|
|
495
|
+
audioMessage: 3,
|
|
496
|
+
extendedTextMessage: 4
|
|
497
|
+
};
|
|
498
|
+
const innerMsgKey = Object.keys(innerMessage).find(k => innerMessage[k] && typeof innerMessage[k] === 'object');
|
|
499
|
+
if (innerMsgKey) {
|
|
500
|
+
innerMessage[innerMsgKey].contextInfo = innerMessage[innerMsgKey].contextInfo || {};
|
|
501
|
+
innerMessage[innerMsgKey].contextInfo.isGroupStatus = true;
|
|
502
|
+
if (typeof innerMessage[innerMsgKey].contextInfo.statusSourceType !== 'number'
|
|
503
|
+
&& typeof statusSourceTypeByType[innerMsgKey] === 'number') {
|
|
504
|
+
innerMessage[innerMsgKey].contextInfo.statusSourceType = statusSourceTypeByType[innerMsgKey];
|
|
505
|
+
}
|
|
506
|
+
// Opsional: { v2: true } — nambahin metadata "ring pink" (reshare-able, audience
|
|
507
|
+
// metadata, dst.) di atas Group Status biasa. Caller bisa override field spesifik
|
|
508
|
+
// lewat s.featureEligibilities / s.statusAttributions / s.statusAudienceMetadata.
|
|
509
|
+
if (s.v2 || s.richStatus) {
|
|
510
|
+
innerMessage[innerMsgKey].contextInfo.featureEligibilities = {
|
|
511
|
+
canBeReshared: true,
|
|
512
|
+
canReceiveMultiReact: false,
|
|
513
|
+
...(s.featureEligibilities || {})
|
|
514
|
+
};
|
|
515
|
+
innerMessage[innerMsgKey].contextInfo.statusAttributions = s.statusAttributions || [{ type: 10 }];
|
|
516
|
+
innerMessage[innerMsgKey].contextInfo.statusAudienceMetadata = s.statusAudienceMetadata || { audienceType: 1 };
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
485
520
|
// Wrap dengan messageContextInfo + messageSecret — WAJIB supaya konten bisa ditampilkan
|
|
486
521
|
const wrapped = {
|
|
487
522
|
groupStatusMessageV2: {
|
package/lib/Socket/groups.d.ts
CHANGED
|
@@ -1,161 +1,267 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import type { proto } from '../../WAProto/index.js';
|
|
2
|
+
|
|
3
|
+
export type WAMediaUploadFunction = (stream: Buffer | NodeJS.ReadableStream, options?: {
|
|
4
|
+
fileEncSha256?: Buffer;
|
|
5
|
+
mediaType?: string;
|
|
6
|
+
newsletter?: boolean;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
url: string;
|
|
9
|
+
directPath: string;
|
|
10
|
+
}>;
|
|
11
|
+
|
|
12
|
+
export interface WAMessageContentGenerationOptions {
|
|
13
|
+
upload?: WAMediaUploadFunction;
|
|
14
|
+
mediaCache?: any;
|
|
15
|
+
options?: any;
|
|
16
|
+
logger?: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ExtendedMessageUtils {
|
|
20
|
+
prepareWAMessageMedia: (media: any, options: WAMessageContentGenerationOptions) => Promise<any>;
|
|
21
|
+
generateWAMessageContent: (content: any, options: WAMessageContentGenerationOptions) => Promise<any>;
|
|
22
|
+
generateWAMessageFromContent: (jid: string, content: any, options?: any) => any;
|
|
23
|
+
generateWAMessage: (jid: string, content: any, options?: any) => Promise<any>;
|
|
24
|
+
generateMessageID: () => string;
|
|
25
|
+
/** Optional — kalau ada, dipakai buat kasih hint <biz>/<meta is_vsn2="1"/> node ke relayMessage(). */
|
|
26
|
+
buildInteractiveAdditionalNodes?: (jid: string, m: any) => any[];
|
|
27
|
+
/** Optional — canvas-rendered story card generator, lihat Utils/story-card.js. */
|
|
28
|
+
renderStoryCard?: (options: StoryCardOptions) => Promise<Buffer>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface StickerMessage {
|
|
32
|
+
url: string;
|
|
33
|
+
fileSha256: Buffer | string;
|
|
34
|
+
fileEncSha256: Buffer | string;
|
|
35
|
+
mediaKey: Buffer | string;
|
|
36
|
+
mimetype: string;
|
|
37
|
+
directPath: string;
|
|
38
|
+
fileLength: number | string;
|
|
39
|
+
mediaKeyTimestamp: number | string;
|
|
40
|
+
isAnimated?: boolean;
|
|
41
|
+
stickerSentTs?: number | string;
|
|
42
|
+
isAvatar?: boolean;
|
|
43
|
+
isAiSticker?: boolean;
|
|
44
|
+
isLottie?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface PaymentMessage {
|
|
48
|
+
amount: number;
|
|
49
|
+
currency?: string;
|
|
50
|
+
from?: string;
|
|
51
|
+
expiry?: number;
|
|
52
|
+
sticker?: { stickerMessage: StickerMessage };
|
|
53
|
+
note?: string;
|
|
54
|
+
background?: {
|
|
55
|
+
id?: string;
|
|
56
|
+
fileLength?: string;
|
|
57
|
+
width?: number;
|
|
58
|
+
height?: number;
|
|
59
|
+
mimetype?: string;
|
|
60
|
+
placeholderArgb?: number;
|
|
61
|
+
textArgb?: number;
|
|
62
|
+
subtextArgb?: number;
|
|
58
63
|
};
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ProductMessage {
|
|
67
|
+
title: string;
|
|
68
|
+
description: string;
|
|
69
|
+
thumbnail: Buffer | { url: string };
|
|
70
|
+
productId: string;
|
|
71
|
+
retailerId: string;
|
|
72
|
+
url: string;
|
|
73
|
+
body?: string;
|
|
74
|
+
footer?: string;
|
|
75
|
+
buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
|
|
76
|
+
priceAmount1000?: number | null;
|
|
77
|
+
currencyCode?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ExternalAdReply {
|
|
81
|
+
title?: string;
|
|
82
|
+
body?: string;
|
|
83
|
+
mediaType?: number;
|
|
84
|
+
thumbnailUrl?: string;
|
|
85
|
+
mediaUrl?: string;
|
|
86
|
+
sourceUrl?: string;
|
|
87
|
+
showAdAttribution?: boolean;
|
|
88
|
+
renderLargerThumbnail?: boolean;
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface InteractiveMessage {
|
|
93
|
+
header?: string;
|
|
94
|
+
title: string;
|
|
95
|
+
footer?: string;
|
|
96
|
+
thumbnail?: string | Buffer | { url: string };
|
|
97
|
+
image?: string | Buffer | { url: string };
|
|
98
|
+
video?: string | Buffer | { url: string };
|
|
99
|
+
document?: string | Buffer | { url: string };
|
|
100
|
+
mimetype?: string;
|
|
101
|
+
fileName?: string;
|
|
102
|
+
jpegThumbnail?: string | Buffer | { url: string };
|
|
103
|
+
contextInfo?: {
|
|
104
|
+
mentionedJid?: string[];
|
|
105
|
+
forwardingScore?: number;
|
|
106
|
+
isForwarded?: boolean;
|
|
107
|
+
externalAdReply?: ExternalAdReply;
|
|
108
|
+
[key: string]: any;
|
|
61
109
|
};
|
|
62
|
-
|
|
63
|
-
|
|
110
|
+
externalAdReply?: ExternalAdReply;
|
|
111
|
+
buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
|
|
112
|
+
nativeFlowMessage?: {
|
|
113
|
+
messageParamsJson?: string;
|
|
114
|
+
buttons?: proto.Message.InteractiveMessage.INativeFlowButton[];
|
|
115
|
+
[key: string]: any;
|
|
64
116
|
};
|
|
65
|
-
|
|
66
|
-
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface AlbumItem {
|
|
120
|
+
image?: string | Buffer | { url: string; caption?: string };
|
|
121
|
+
video?: string | Buffer | { url: string; caption?: string };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface EventMessageLocation {
|
|
125
|
+
degreesLatitude: number;
|
|
126
|
+
degreesLongitude: number;
|
|
127
|
+
name: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface EventMessage {
|
|
131
|
+
isCanceled?: boolean;
|
|
132
|
+
name: string;
|
|
133
|
+
description: string;
|
|
134
|
+
location?: EventMessageLocation;
|
|
135
|
+
joinLink?: string;
|
|
136
|
+
startTime?: string | number;
|
|
137
|
+
endTime?: string | number;
|
|
138
|
+
extraGuestsAllowed?: boolean;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface PollVote {
|
|
142
|
+
optionName: string;
|
|
143
|
+
optionVoteCount: string | number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface PollResultMessage {
|
|
147
|
+
name: string;
|
|
148
|
+
pollVotes: PollVote[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface StoryCardOptions {
|
|
152
|
+
title?: string;
|
|
153
|
+
body?: string;
|
|
154
|
+
footer?: string;
|
|
155
|
+
gradient?: 'sunset' | 'purple' | 'ocean' | 'forest' | 'midnight' | 'fire';
|
|
156
|
+
colors?: [string, string];
|
|
157
|
+
direction?: 'vertical' | 'diagonal';
|
|
158
|
+
width?: number;
|
|
159
|
+
height?: number;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface GroupStatusMessage {
|
|
163
|
+
/** Mode 3 (advanced): pre-built inner WAMessage — di-wrap langsung dengan messageSecret. */
|
|
164
|
+
message?: any;
|
|
165
|
+
/** Mode 1: raw relay / forward story langsung, bypass semua processing lain. */
|
|
166
|
+
raw?: any;
|
|
167
|
+
|
|
168
|
+
/** Teks story. Kalau kosong dan gak ada media lain, fallback text-mode dengan string kosong. */
|
|
169
|
+
text?: string;
|
|
170
|
+
/** Dipakai sebagai caption untuk media, atau fallback text kalau `text` kosong. */
|
|
171
|
+
caption?: string;
|
|
172
|
+
|
|
173
|
+
image?: string | Buffer | { url: string };
|
|
174
|
+
video?: string | Buffer | { url: string };
|
|
175
|
+
/** Shorthand: dikirim sebagai video looping (`gifPlayback: true` otomatis di-set). */
|
|
176
|
+
gif?: string | Buffer | { url: string };
|
|
177
|
+
audio?: string | Buffer | { url: string };
|
|
178
|
+
sticker?: string | Buffer | { url: string };
|
|
179
|
+
document?: string | Buffer | { url: string };
|
|
180
|
+
/** Canvas-rendered story card (gradient + title/body/footer), lihat Utils/story-card.js. */
|
|
181
|
+
card?: StoryCardOptions;
|
|
182
|
+
|
|
183
|
+
/** Teks & audio (ptt) saja — ARGB hex (mis. 0xFF128C7E). */
|
|
184
|
+
backgroundColor?: number;
|
|
185
|
+
/** Teks saja. */
|
|
186
|
+
textArgb?: number;
|
|
187
|
+
/** Teks saja, 0-5. */
|
|
188
|
+
font?: number;
|
|
189
|
+
|
|
190
|
+
/** Video & gif. */
|
|
191
|
+
gifPlayback?: boolean;
|
|
192
|
+
/** Video/audio — durasi dalam detik. */
|
|
193
|
+
seconds?: number;
|
|
194
|
+
|
|
195
|
+
/** Audio: voice note (true, default) atau musik biasa (false). */
|
|
196
|
+
ptt?: boolean;
|
|
197
|
+
/** Audio/document. */
|
|
198
|
+
mimetype?: string;
|
|
199
|
+
/** Document. */
|
|
200
|
+
fileName?: string;
|
|
201
|
+
|
|
202
|
+
/** Didukung di semua mode (text/image/card/gif/video/audio/sticker/document). */
|
|
203
|
+
mentions?: string[];
|
|
204
|
+
|
|
205
|
+
/** Aktifkan metadata Group Status "V2" (ring pink) — reshare-able, audience metadata, dst. */
|
|
206
|
+
v2?: boolean;
|
|
207
|
+
/** Alias dari `v2`. */
|
|
208
|
+
richStatus?: boolean;
|
|
209
|
+
/** Override untuk field featureEligibilities saat v2/richStatus aktif. */
|
|
210
|
+
featureEligibilities?: { canBeReshared?: boolean; canReceiveMultiReact?: boolean; [key: string]: any };
|
|
211
|
+
/** Override untuk field statusAttributions saat v2/richStatus aktif. */
|
|
212
|
+
statusAttributions?: Array<{ type: number; [key: string]: any }>;
|
|
213
|
+
/** Override untuk field statusAudienceMetadata saat v2/richStatus aktif. */
|
|
214
|
+
statusAudienceMetadata?: { audienceType?: number; [key: string]: any };
|
|
215
|
+
|
|
216
|
+
[key: string]: any;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface ExtendedMessageContent {
|
|
220
|
+
requestPaymentMessage?: PaymentMessage;
|
|
221
|
+
productMessage?: ProductMessage;
|
|
222
|
+
interactiveMessage?: InteractiveMessage;
|
|
223
|
+
albumMessage?: AlbumItem[];
|
|
224
|
+
eventMessage?: EventMessage;
|
|
225
|
+
pollResultMessage?: PollResultMessage;
|
|
226
|
+
groupStatusMessage?: GroupStatusMessage;
|
|
227
|
+
sender?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export type ExtendedMessageType = 'PAYMENT' | 'PRODUCT' | 'INTERACTIVE' | 'ALBUM' | 'EVENT' | 'POLL_RESULT' | 'GROUP_STORY';
|
|
231
|
+
|
|
232
|
+
export declare class ExtendedMessageBuilder {
|
|
233
|
+
utils: ExtendedMessageUtils;
|
|
234
|
+
relayMessage: (jid: string, content: any, options?: any) => Promise<any>;
|
|
235
|
+
waUploadToServer: WAMediaUploadFunction;
|
|
236
|
+
bail: {
|
|
237
|
+
generateWAMessageContent: ExtendedMessageUtils['generateWAMessageContent'];
|
|
238
|
+
generateMessageID: () => string;
|
|
239
|
+
getContentType: (msg: any) => string;
|
|
67
240
|
};
|
|
68
|
-
|
|
69
|
-
|
|
241
|
+
|
|
242
|
+
constructor(utils: ExtendedMessageUtils, waUploadToServer: WAMediaUploadFunction, relayMessageFn: (jid: string, content: any, options?: any) => Promise<any>);
|
|
243
|
+
|
|
244
|
+
detectType(content: ExtendedMessageContent): ExtendedMessageType | null;
|
|
245
|
+
|
|
246
|
+
handlePayment(content: { requestPaymentMessage: PaymentMessage }, quoted?: proto.IWebMessageInfo | null): Promise<{
|
|
247
|
+
requestPaymentMessage: proto.Message.RequestPaymentMessage;
|
|
70
248
|
}>;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
91
|
-
updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
92
|
-
updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
93
|
-
updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
94
|
-
updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
|
|
95
|
-
updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
96
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
97
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
|
|
98
|
-
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
99
|
-
chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
|
|
100
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
101
|
-
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
102
|
-
removeContact: (jid: string) => Promise<void>;
|
|
103
|
-
placeholderResendCache: import("../Types/index.js").CacheStore;
|
|
104
|
-
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
105
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
106
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
107
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
108
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
109
|
-
star: (jid: string, messages: {
|
|
110
|
-
id: string;
|
|
111
|
-
fromMe?: boolean;
|
|
112
|
-
}[], star: boolean) => Promise<void>;
|
|
113
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
114
|
-
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
115
|
-
type: "md";
|
|
116
|
-
ws: import("./Client/websocket.js").WebSocketClient;
|
|
117
|
-
ev: import("../Types/index.js").BaileysEventEmitter & {
|
|
118
|
-
process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
119
|
-
buffer(): void;
|
|
120
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
121
|
-
flush(): boolean;
|
|
122
|
-
isBuffering(): boolean;
|
|
123
|
-
destroy(): void;
|
|
124
|
-
};
|
|
125
|
-
authState: {
|
|
126
|
-
creds: import("../Types/index.js").AuthenticationCreds;
|
|
127
|
-
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
128
|
-
};
|
|
129
|
-
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
130
|
-
user: import("../Types/index.js").Contact | undefined;
|
|
131
|
-
generateMessageTag: () => string;
|
|
132
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
133
|
-
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
134
|
-
waitForSocketOpen: () => Promise<void>;
|
|
135
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
136
|
-
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
137
|
-
logout: (msg?: string) => Promise<void>;
|
|
138
|
-
end: (error: Error | undefined) => Promise<void>;
|
|
139
|
-
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
140
|
-
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
141
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
|
142
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
143
|
-
digestKeyBundle: () => Promise<void>;
|
|
144
|
-
rotateSignedPreKey: () => Promise<void>;
|
|
145
|
-
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
146
|
-
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
147
|
-
sendUnifiedSession: () => Promise<void>;
|
|
148
|
-
wamBuffer: import("../index.js").BinaryInfo;
|
|
149
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
150
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
151
|
-
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
152
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
153
|
-
jid: string;
|
|
154
|
-
exists: boolean;
|
|
155
|
-
}[] | undefined>;
|
|
156
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
157
|
-
fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
|
|
158
|
-
};
|
|
159
|
-
export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata;
|
|
160
|
-
export type GroupsSocket = ReturnType<typeof makeGroupsSocket>;
|
|
161
|
-
//# sourceMappingURL=groups.d.ts.map
|
|
249
|
+
|
|
250
|
+
handleProduct(content: { productMessage: ProductMessage }, jid: string, quoted?: proto.IWebMessageInfo | null): Promise<{
|
|
251
|
+
viewOnceMessage: { message: { interactiveMessage: any } };
|
|
252
|
+
}>;
|
|
253
|
+
|
|
254
|
+
handleInteractive(content: { interactiveMessage: InteractiveMessage }, jid: string, quoted?: proto.IWebMessageInfo | null, options?: { mentions?: string[] }): Promise<{
|
|
255
|
+
interactiveMessage: any;
|
|
256
|
+
}>;
|
|
257
|
+
|
|
258
|
+
handleAlbum(content: { albumMessage: AlbumItem[] }, jid: string, quoted?: proto.IWebMessageInfo | null): Promise<any>;
|
|
259
|
+
|
|
260
|
+
handleEvent(content: { eventMessage: EventMessage }, jid: string, quoted?: proto.IWebMessageInfo | null): Promise<any>;
|
|
261
|
+
|
|
262
|
+
handlePollResult(content: { pollResultMessage: PollResultMessage }, jid: string, quoted?: proto.IWebMessageInfo | null): Promise<any>;
|
|
263
|
+
|
|
264
|
+
handleGroupStory(content: { groupStatusMessage: GroupStatusMessage }, jid: string): Promise<any>;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export default ExtendedMessageBuilder;
|