@arcaelas/whatsapp 1.4.0 → 2.0.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 (41) hide show
  1. package/build/cjs/Chat.d.ts +187 -205
  2. package/build/cjs/Chat.js +151 -274
  3. package/build/cjs/Chat.js.map +1 -1
  4. package/build/cjs/Contact.d.ts +317 -304
  5. package/build/cjs/Contact.js +58 -103
  6. package/build/cjs/Contact.js.map +1 -1
  7. package/build/cjs/Message.d.ts +567 -265
  8. package/build/cjs/Message.js +274 -256
  9. package/build/cjs/Message.js.map +1 -1
  10. package/build/cjs/WhatsApp.d.ts +16 -4
  11. package/build/cjs/WhatsApp.js +77 -79
  12. package/build/cjs/WhatsApp.js.map +1 -1
  13. package/build/cjs/index.d.ts +2 -2
  14. package/build/cjs/store/driver/FileEngine.d.ts +13 -2
  15. package/build/cjs/store/driver/FileEngine.js +15 -19
  16. package/build/cjs/store/driver/FileEngine.js.map +1 -1
  17. package/build/cjs/store/driver/RedisEngine.d.ts +13 -4
  18. package/build/cjs/store/driver/RedisEngine.js +23 -22
  19. package/build/cjs/store/driver/RedisEngine.js.map +1 -1
  20. package/build/cjs/store/engine.d.ts +9 -10
  21. package/build/esm/Chat.d.ts +187 -205
  22. package/build/esm/Chat.js +151 -273
  23. package/build/esm/Chat.js.map +1 -1
  24. package/build/esm/Contact.d.ts +317 -304
  25. package/build/esm/Contact.js +58 -102
  26. package/build/esm/Contact.js.map +1 -1
  27. package/build/esm/Message.d.ts +567 -265
  28. package/build/esm/Message.js +275 -256
  29. package/build/esm/Message.js.map +1 -1
  30. package/build/esm/WhatsApp.d.ts +16 -4
  31. package/build/esm/WhatsApp.js +80 -82
  32. package/build/esm/WhatsApp.js.map +1 -1
  33. package/build/esm/index.d.ts +2 -2
  34. package/build/esm/store/driver/FileEngine.d.ts +13 -2
  35. package/build/esm/store/driver/FileEngine.js +15 -19
  36. package/build/esm/store/driver/FileEngine.js.map +1 -1
  37. package/build/esm/store/driver/RedisEngine.d.ts +13 -4
  38. package/build/esm/store/driver/RedisEngine.js +23 -22
  39. package/build/esm/store/driver/RedisEngine.js.map +1 -1
  40. package/build/esm/store/engine.d.ts +9 -10
  41. package/package.json +2 -2
@@ -5,90 +5,85 @@
5
5
  import type { WhatsApp } from './WhatsApp';
6
6
  /**
7
7
  * @description Objeto raw del contacto (protocolo).
8
+ * Raw contact object (protocol).
8
9
  */
9
10
  export interface IContactRaw {
10
- /** JID único del contacto */
11
+ /** JID único del contacto / Unique contact JID */
11
12
  id: string;
12
- /** ID alternativo en formato LID */
13
+ /** ID alternativo en formato LID / Alternative ID in LID format */
13
14
  lid?: string | null;
14
- /** Nombre guardado en la agenda del usuario */
15
+ /** Nombre guardado en la agenda del usuario / Name saved in user's address book */
15
16
  name?: string | null;
16
- /** Nombre que el contacto configuró en su perfil (pushName) */
17
+ /** Nombre que el contacto configuró en su perfil (pushName) / Profile push name */
17
18
  notify?: string | null;
18
- /** Nombre de cuenta business verificada */
19
+ /** Nombre de cuenta business verificada / Verified business account name */
19
20
  verifiedName?: string | null;
20
- /** URL de la foto de perfil */
21
+ /** URL de la foto de perfil / Profile picture URL */
21
22
  imgUrl?: string | null;
22
- /** Bio/estado del perfil del contacto */
23
+ /** Bio/estado del perfil del contacto / Contact profile bio/status */
23
24
  status?: string | null;
24
25
  }
25
- /**
26
- * @description Datos persistidos de un contacto.
27
- */
28
- export interface IContact {
29
- /** JID del contacto (ej: 123456@s.whatsapp.net) */
30
- id: string;
31
- /** Nombre del contacto */
32
- name: string;
33
- /** URL de la foto de perfil o null */
34
- photo: string | null;
35
- /** Número de teléfono sin formato */
36
- phone: string;
37
- /** Bio del contacto */
38
- content: string;
39
- /** Objeto raw del protocolo */
40
- raw: IContactRaw;
41
- }
42
26
  /**
43
27
  * @description
44
28
  * Clase base para representar un contacto de WhatsApp.
45
- * Usar Contact.get() para obtener instancias.
29
+ * Base class representing a WhatsApp contact.
46
30
  */
47
31
  export declare class Contact {
48
32
  readonly raw: IContactRaw;
49
- constructor(data: IContact);
50
- /** JID único del contacto */
33
+ constructor(raw: IContactRaw);
34
+ /** JID único del contacto / Unique contact JID */
51
35
  get id(): string;
52
- /** Nombre del contacto */
36
+ /** Nombre del contacto / Contact name */
53
37
  get name(): string;
54
- /** URL de la foto de perfil o null */
38
+ /** URL de la foto de perfil o null / Profile picture URL or null */
55
39
  get photo(): string | null;
56
- /** Número de teléfono sin formato */
40
+ /** Número de teléfono sin formato / Phone number without format */
57
41
  get phone(): string;
58
- /** Bio del contacto */
42
+ /** Bio del contacto / Contact bio */
59
43
  get content(): string;
60
44
  }
61
- /**
62
- * @description Construye IContact desde raw.
63
- * @param raw Objeto raw del contacto.
64
- * @returns IContact normalizado.
65
- */
66
- export declare function build_contact(raw: IContactRaw): IContact;
67
45
  /**
68
46
  * @description Factory que retorna la clase Contact enlazada al contexto.
47
+ * Factory that returns the Contact class bound to context.
69
48
  * @param wa Instancia de WhatsApp.
70
- * @returns Clase _Contact que extiende Contact.
71
49
  */
72
50
  export declare function contact(wa: WhatsApp): {
73
- new (data: IContact): {
51
+ new (raw: IContactRaw): {
74
52
  /**
75
53
  * @description Cambia el nombre del contacto.
54
+ * Renames the contact.
76
55
  * @param name Nuevo nombre.
77
- * @returns true si se guardó correctamente.
78
56
  */
79
57
  rename(name: string): Promise<boolean>;
80
58
  /**
81
59
  * @description Actualiza los datos del perfil desde WhatsApp.
82
- * @returns this con datos actualizados, o null si falla.
60
+ * Refreshes profile data from WhatsApp.
83
61
  */
84
62
  refresh(): Promise</*elided*/ any | null>;
85
63
  /**
86
64
  * @description Obtiene o crea el chat con este contacto.
87
- * @returns Chat asociado al contacto.
65
+ * Gets or creates the chat with this contact.
88
66
  */
89
67
  chat(): Promise<{
68
+ refresh(): Promise</*elided*/ any | null>;
69
+ remove(): Promise<boolean>;
70
+ pin(value: boolean): Promise<boolean>;
71
+ archive(value: boolean): Promise<boolean>;
72
+ mute(duration: number | null): Promise<boolean>;
73
+ seen(): Promise<boolean>;
74
+ members(offset?: number, limit?: number): Promise<InstanceType</*elided*/ any>[]>;
90
75
  messages(offset?: number, limit?: number): Promise<InstanceType<{
91
76
  new (data: import("./Message").IMessage): {
77
+ edit(text: string): Promise<boolean>;
78
+ remove(): Promise<boolean>;
79
+ forward(to_cid: string): Promise<boolean>;
80
+ react(emoji: string): Promise<boolean>;
81
+ text(content: string): Promise</*elided*/ any | null>;
82
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
83
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
84
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
85
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
86
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
92
87
  stream(): Promise<import("node:stream").Readable>;
93
88
  content(): Promise<Buffer>;
94
89
  readonly index: import("./Message").IMessageIndex;
@@ -109,11 +104,19 @@ export declare function contact(wa: WhatsApp): {
109
104
  get deleted_at(): number | null;
110
105
  };
111
106
  get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
112
- react(cid: string, mid: string, emoji: string): Promise<boolean>;
113
- remove(cid: string, mid: string): Promise<boolean>;
114
- forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
115
- edit(cid: string, mid: string, text: string): Promise<boolean>;
116
- text(cid: string, text: string): Promise<{
107
+ list(cid: string, offset?: number, limit?: number): Promise<InstanceType</*elided*/ any>[]>;
108
+ count(cid: string): Promise<number>;
109
+ text(cid: string, text: string, mid?: string): Promise<{
110
+ edit(text: string): Promise<boolean>;
111
+ remove(): Promise<boolean>;
112
+ forward(to_cid: string): Promise<boolean>;
113
+ react(emoji: string): Promise<boolean>;
114
+ text(content: string): Promise</*elided*/ any | null>;
115
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
116
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
117
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
118
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
119
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
117
120
  stream(): Promise<import("node:stream").Readable>;
118
121
  content(): Promise<Buffer>;
119
122
  readonly index: import("./Message").IMessageIndex;
@@ -133,7 +136,17 @@ export declare function contact(wa: WhatsApp): {
133
136
  get created_at(): number;
134
137
  get deleted_at(): number | null;
135
138
  } | null>;
136
- image(cid: string, buffer: Buffer, caption?: string): Promise<{
139
+ image(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
140
+ edit(text: string): Promise<boolean>;
141
+ remove(): Promise<boolean>;
142
+ forward(to_cid: string): Promise<boolean>;
143
+ react(emoji: string): Promise<boolean>;
144
+ text(content: string): Promise</*elided*/ any | null>;
145
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
146
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
147
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
148
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
149
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
137
150
  stream(): Promise<import("node:stream").Readable>;
138
151
  content(): Promise<Buffer>;
139
152
  readonly index: import("./Message").IMessageIndex;
@@ -153,7 +166,17 @@ export declare function contact(wa: WhatsApp): {
153
166
  get created_at(): number;
154
167
  get deleted_at(): number | null;
155
168
  } | null>;
156
- video(cid: string, buffer: Buffer, caption?: string): Promise<{
169
+ video(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
170
+ edit(text: string): Promise<boolean>;
171
+ remove(): Promise<boolean>;
172
+ forward(to_cid: string): Promise<boolean>;
173
+ react(emoji: string): Promise<boolean>;
174
+ text(content: string): Promise</*elided*/ any | null>;
175
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
176
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
177
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
178
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
179
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
157
180
  stream(): Promise<import("node:stream").Readable>;
158
181
  content(): Promise<Buffer>;
159
182
  readonly index: import("./Message").IMessageIndex;
@@ -173,7 +196,17 @@ export declare function contact(wa: WhatsApp): {
173
196
  get created_at(): number;
174
197
  get deleted_at(): number | null;
175
198
  } | null>;
176
- audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
199
+ audio(cid: string, buffer: Buffer, ptt?: boolean, mid?: string): Promise<{
200
+ edit(text: string): Promise<boolean>;
201
+ remove(): Promise<boolean>;
202
+ forward(to_cid: string): Promise<boolean>;
203
+ react(emoji: string): Promise<boolean>;
204
+ text(content: string): Promise</*elided*/ any | null>;
205
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
206
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
207
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
208
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
209
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
177
210
  stream(): Promise<import("node:stream").Readable>;
178
211
  content(): Promise<Buffer>;
179
212
  readonly index: import("./Message").IMessageIndex;
@@ -193,7 +226,17 @@ export declare function contact(wa: WhatsApp): {
193
226
  get created_at(): number;
194
227
  get deleted_at(): number | null;
195
228
  } | null>;
196
- location(cid: string, opts: import("./Message").LocationOptions): Promise<{
229
+ location(cid: string, opts: import("./Message").LocationOptions, mid?: string): Promise<{
230
+ edit(text: string): Promise<boolean>;
231
+ remove(): Promise<boolean>;
232
+ forward(to_cid: string): Promise<boolean>;
233
+ react(emoji: string): Promise<boolean>;
234
+ text(content: string): Promise</*elided*/ any | null>;
235
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
236
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
237
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
238
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
239
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
197
240
  stream(): Promise<import("node:stream").Readable>;
198
241
  content(): Promise<Buffer>;
199
242
  readonly index: import("./Message").IMessageIndex;
@@ -213,7 +256,17 @@ export declare function contact(wa: WhatsApp): {
213
256
  get created_at(): number;
214
257
  get deleted_at(): number | null;
215
258
  } | null>;
216
- poll(cid: string, opts: import("./Message").PollOptions): Promise<{
259
+ poll(cid: string, opts: import("./Message").PollOptions, mid?: string): Promise<{
260
+ edit(text: string): Promise<boolean>;
261
+ remove(): Promise<boolean>;
262
+ forward(to_cid: string): Promise<boolean>;
263
+ react(emoji: string): Promise<boolean>;
264
+ text(content: string): Promise</*elided*/ any | null>;
265
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
266
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
267
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
268
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
269
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
217
270
  stream(): Promise<import("node:stream").Readable>;
218
271
  content(): Promise<Buffer>;
219
272
  readonly index: import("./Message").IMessageIndex;
@@ -234,9 +287,13 @@ export declare function contact(wa: WhatsApp): {
234
287
  get deleted_at(): number | null;
235
288
  } | null>;
236
289
  watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
237
- notify(cid: string, mid: string): void;
290
+ } & {
291
+ _add_to_index: (cid: string, mid: string, timestamp: number) => Promise<void>;
292
+ _remove_from_index: (cid: string, mid: string) => Promise<void>;
293
+ _notify: (cid: string, mid: string) => void;
294
+ _build_index: (raw: import("baileys").WAMessage, edited?: boolean) => import("./Message").IMessageIndex;
238
295
  }>[]>;
239
- refresh(): Promise</*elided*/ any | null>;
296
+ contact(): Promise<InstanceType</*elided*/ any> | null>;
240
297
  readonly raw: import("./Chat").IChatRaw;
241
298
  get id(): string;
242
299
  get type(): "contact" | "group";
@@ -249,236 +306,58 @@ export declare function contact(wa: WhatsApp): {
249
306
  get readonly(): boolean;
250
307
  } | null>;
251
308
  readonly raw: IContactRaw;
252
- /** JID único del contacto */
309
+ /** JID único del contacto / Unique contact JID */
253
310
  get id(): string;
254
- /** Nombre del contacto */
311
+ /** Nombre del contacto / Contact name */
255
312
  get name(): string;
256
- /** URL de la foto de perfil o null */
313
+ /** URL de la foto de perfil o null / Profile picture URL or null */
257
314
  get photo(): string | null;
258
- /** Número de teléfono sin formato */
315
+ /** Número de teléfono sin formato / Phone number without format */
259
316
  get phone(): string;
260
- /** Bio del contacto */
317
+ /** Bio del contacto / Contact bio */
261
318
  get content(): string;
262
319
  };
263
320
  /**
264
321
  * @description Obtiene un contacto por su ID.
265
- * @param uid JID del contacto (@s.whatsapp.net) o número de teléfono.
266
- * @returns Contacto o null si no existe.
322
+ * Retrieves a contact by its ID.
323
+ * @param uid JID del contacto o número de teléfono.
267
324
  */
268
325
  get(uid: string): Promise<{
269
326
  /**
270
327
  * @description Cambia el nombre del contacto.
328
+ * Renames the contact.
271
329
  * @param name Nuevo nombre.
272
- * @returns true si se guardó correctamente.
273
330
  */
274
331
  rename(name: string): Promise<boolean>;
275
332
  /**
276
333
  * @description Actualiza los datos del perfil desde WhatsApp.
277
- * @returns this con datos actualizados, o null si falla.
334
+ * Refreshes profile data from WhatsApp.
278
335
  */
279
336
  refresh(): Promise</*elided*/ any | null>;
280
337
  /**
281
338
  * @description Obtiene o crea el chat con este contacto.
282
- * @returns Chat asociado al contacto.
339
+ * Gets or creates the chat with this contact.
283
340
  */
284
341
  chat(): Promise<{
285
- messages(offset?: number, limit?: number): Promise<InstanceType<{
286
- new (data: import("./Message").IMessage): {
287
- stream(): Promise<import("node:stream").Readable>;
288
- content(): Promise<Buffer>;
289
- readonly index: import("./Message").IMessageIndex;
290
- readonly raw: import("baileys").WAMessage;
291
- get id(): string;
292
- get cid(): string;
293
- get mid(): string | null;
294
- get me(): boolean;
295
- get author(): string;
296
- get edited(): boolean;
297
- get type(): import("./Message").MessageType;
298
- get caption(): string;
299
- get mime(): string;
300
- get status(): import("./Message").MESSAGE_STATUS;
301
- get starred(): boolean;
302
- get forwarded(): boolean;
303
- get created_at(): number;
304
- get deleted_at(): number | null;
305
- };
306
- get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
307
- react(cid: string, mid: string, emoji: string): Promise<boolean>;
308
- remove(cid: string, mid: string): Promise<boolean>;
309
- forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
310
- edit(cid: string, mid: string, text: string): Promise<boolean>;
311
- text(cid: string, text: string): Promise<{
312
- stream(): Promise<import("node:stream").Readable>;
313
- content(): Promise<Buffer>;
314
- readonly index: import("./Message").IMessageIndex;
315
- readonly raw: import("baileys").WAMessage;
316
- get id(): string;
317
- get cid(): string;
318
- get mid(): string | null;
319
- get me(): boolean;
320
- get author(): string;
321
- get edited(): boolean;
322
- get type(): import("./Message").MessageType;
323
- get caption(): string;
324
- get mime(): string;
325
- get status(): import("./Message").MESSAGE_STATUS;
326
- get starred(): boolean;
327
- get forwarded(): boolean;
328
- get created_at(): number;
329
- get deleted_at(): number | null;
330
- } | null>;
331
- image(cid: string, buffer: Buffer, caption?: string): Promise<{
332
- stream(): Promise<import("node:stream").Readable>;
333
- content(): Promise<Buffer>;
334
- readonly index: import("./Message").IMessageIndex;
335
- readonly raw: import("baileys").WAMessage;
336
- get id(): string;
337
- get cid(): string;
338
- get mid(): string | null;
339
- get me(): boolean;
340
- get author(): string;
341
- get edited(): boolean;
342
- get type(): import("./Message").MessageType;
343
- get caption(): string;
344
- get mime(): string;
345
- get status(): import("./Message").MESSAGE_STATUS;
346
- get starred(): boolean;
347
- get forwarded(): boolean;
348
- get created_at(): number;
349
- get deleted_at(): number | null;
350
- } | null>;
351
- video(cid: string, buffer: Buffer, caption?: string): Promise<{
352
- stream(): Promise<import("node:stream").Readable>;
353
- content(): Promise<Buffer>;
354
- readonly index: import("./Message").IMessageIndex;
355
- readonly raw: import("baileys").WAMessage;
356
- get id(): string;
357
- get cid(): string;
358
- get mid(): string | null;
359
- get me(): boolean;
360
- get author(): string;
361
- get edited(): boolean;
362
- get type(): import("./Message").MessageType;
363
- get caption(): string;
364
- get mime(): string;
365
- get status(): import("./Message").MESSAGE_STATUS;
366
- get starred(): boolean;
367
- get forwarded(): boolean;
368
- get created_at(): number;
369
- get deleted_at(): number | null;
370
- } | null>;
371
- audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
372
- stream(): Promise<import("node:stream").Readable>;
373
- content(): Promise<Buffer>;
374
- readonly index: import("./Message").IMessageIndex;
375
- readonly raw: import("baileys").WAMessage;
376
- get id(): string;
377
- get cid(): string;
378
- get mid(): string | null;
379
- get me(): boolean;
380
- get author(): string;
381
- get edited(): boolean;
382
- get type(): import("./Message").MessageType;
383
- get caption(): string;
384
- get mime(): string;
385
- get status(): import("./Message").MESSAGE_STATUS;
386
- get starred(): boolean;
387
- get forwarded(): boolean;
388
- get created_at(): number;
389
- get deleted_at(): number | null;
390
- } | null>;
391
- location(cid: string, opts: import("./Message").LocationOptions): Promise<{
392
- stream(): Promise<import("node:stream").Readable>;
393
- content(): Promise<Buffer>;
394
- readonly index: import("./Message").IMessageIndex;
395
- readonly raw: import("baileys").WAMessage;
396
- get id(): string;
397
- get cid(): string;
398
- get mid(): string | null;
399
- get me(): boolean;
400
- get author(): string;
401
- get edited(): boolean;
402
- get type(): import("./Message").MessageType;
403
- get caption(): string;
404
- get mime(): string;
405
- get status(): import("./Message").MESSAGE_STATUS;
406
- get starred(): boolean;
407
- get forwarded(): boolean;
408
- get created_at(): number;
409
- get deleted_at(): number | null;
410
- } | null>;
411
- poll(cid: string, opts: import("./Message").PollOptions): Promise<{
412
- stream(): Promise<import("node:stream").Readable>;
413
- content(): Promise<Buffer>;
414
- readonly index: import("./Message").IMessageIndex;
415
- readonly raw: import("baileys").WAMessage;
416
- get id(): string;
417
- get cid(): string;
418
- get mid(): string | null;
419
- get me(): boolean;
420
- get author(): string;
421
- get edited(): boolean;
422
- get type(): import("./Message").MessageType;
423
- get caption(): string;
424
- get mime(): string;
425
- get status(): import("./Message").MESSAGE_STATUS;
426
- get starred(): boolean;
427
- get forwarded(): boolean;
428
- get created_at(): number;
429
- get deleted_at(): number | null;
430
- } | null>;
431
- watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
432
- notify(cid: string, mid: string): void;
433
- }>[]>;
434
342
  refresh(): Promise</*elided*/ any | null>;
435
- readonly raw: import("./Chat").IChatRaw;
436
- get id(): string;
437
- get type(): "contact" | "group";
438
- get name(): string;
439
- get content(): string;
440
- get pined(): boolean;
441
- get archived(): boolean;
442
- get muted(): number | false;
443
- get readed(): boolean;
444
- get readonly(): boolean;
445
- } | null>;
446
- readonly raw: IContactRaw;
447
- /** JID único del contacto */
448
- get id(): string;
449
- /** Nombre del contacto */
450
- get name(): string;
451
- /** URL de la foto de perfil o null */
452
- get photo(): string | null;
453
- /** Número de teléfono sin formato */
454
- get phone(): string;
455
- /** Bio del contacto */
456
- get content(): string;
457
- } | null>;
458
- /**
459
- * @description Actualiza los datos del perfil desde WhatsApp.
460
- * @param uid JID del contacto.
461
- * @returns Contacto actualizado o null.
462
- */
463
- refresh(uid: string): Promise<{
464
- /**
465
- * @description Cambia el nombre del contacto.
466
- * @param name Nuevo nombre.
467
- * @returns true si se guardó correctamente.
468
- */
469
- rename(name: string): Promise<boolean>;
470
- /**
471
- * @description Actualiza los datos del perfil desde WhatsApp.
472
- * @returns this con datos actualizados, o null si falla.
473
- */
474
- refresh(): Promise</*elided*/ any | null>;
475
- /**
476
- * @description Obtiene o crea el chat con este contacto.
477
- * @returns Chat asociado al contacto.
478
- */
479
- chat(): Promise<{
343
+ remove(): Promise<boolean>;
344
+ pin(value: boolean): Promise<boolean>;
345
+ archive(value: boolean): Promise<boolean>;
346
+ mute(duration: number | null): Promise<boolean>;
347
+ seen(): Promise<boolean>;
348
+ members(offset?: number, limit?: number): Promise<InstanceType</*elided*/ any>[]>;
480
349
  messages(offset?: number, limit?: number): Promise<InstanceType<{
481
350
  new (data: import("./Message").IMessage): {
351
+ edit(text: string): Promise<boolean>;
352
+ remove(): Promise<boolean>;
353
+ forward(to_cid: string): Promise<boolean>;
354
+ react(emoji: string): Promise<boolean>;
355
+ text(content: string): Promise</*elided*/ any | null>;
356
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
357
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
358
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
359
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
360
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
482
361
  stream(): Promise<import("node:stream").Readable>;
483
362
  content(): Promise<Buffer>;
484
363
  readonly index: import("./Message").IMessageIndex;
@@ -499,11 +378,19 @@ export declare function contact(wa: WhatsApp): {
499
378
  get deleted_at(): number | null;
500
379
  };
501
380
  get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
502
- react(cid: string, mid: string, emoji: string): Promise<boolean>;
503
- remove(cid: string, mid: string): Promise<boolean>;
504
- forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
505
- edit(cid: string, mid: string, text: string): Promise<boolean>;
506
- text(cid: string, text: string): Promise<{
381
+ list(cid: string, offset?: number, limit?: number): Promise<InstanceType</*elided*/ any>[]>;
382
+ count(cid: string): Promise<number>;
383
+ text(cid: string, text: string, mid?: string): Promise<{
384
+ edit(text: string): Promise<boolean>;
385
+ remove(): Promise<boolean>;
386
+ forward(to_cid: string): Promise<boolean>;
387
+ react(emoji: string): Promise<boolean>;
388
+ text(content: string): Promise</*elided*/ any | null>;
389
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
390
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
391
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
392
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
393
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
507
394
  stream(): Promise<import("node:stream").Readable>;
508
395
  content(): Promise<Buffer>;
509
396
  readonly index: import("./Message").IMessageIndex;
@@ -523,7 +410,17 @@ export declare function contact(wa: WhatsApp): {
523
410
  get created_at(): number;
524
411
  get deleted_at(): number | null;
525
412
  } | null>;
526
- image(cid: string, buffer: Buffer, caption?: string): Promise<{
413
+ image(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
414
+ edit(text: string): Promise<boolean>;
415
+ remove(): Promise<boolean>;
416
+ forward(to_cid: string): Promise<boolean>;
417
+ react(emoji: string): Promise<boolean>;
418
+ text(content: string): Promise</*elided*/ any | null>;
419
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
420
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
421
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
422
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
423
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
527
424
  stream(): Promise<import("node:stream").Readable>;
528
425
  content(): Promise<Buffer>;
529
426
  readonly index: import("./Message").IMessageIndex;
@@ -543,7 +440,17 @@ export declare function contact(wa: WhatsApp): {
543
440
  get created_at(): number;
544
441
  get deleted_at(): number | null;
545
442
  } | null>;
546
- video(cid: string, buffer: Buffer, caption?: string): Promise<{
443
+ video(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
444
+ edit(text: string): Promise<boolean>;
445
+ remove(): Promise<boolean>;
446
+ forward(to_cid: string): Promise<boolean>;
447
+ react(emoji: string): Promise<boolean>;
448
+ text(content: string): Promise</*elided*/ any | null>;
449
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
450
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
451
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
452
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
453
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
547
454
  stream(): Promise<import("node:stream").Readable>;
548
455
  content(): Promise<Buffer>;
549
456
  readonly index: import("./Message").IMessageIndex;
@@ -563,7 +470,17 @@ export declare function contact(wa: WhatsApp): {
563
470
  get created_at(): number;
564
471
  get deleted_at(): number | null;
565
472
  } | null>;
566
- audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
473
+ audio(cid: string, buffer: Buffer, ptt?: boolean, mid?: string): Promise<{
474
+ edit(text: string): Promise<boolean>;
475
+ remove(): Promise<boolean>;
476
+ forward(to_cid: string): Promise<boolean>;
477
+ react(emoji: string): Promise<boolean>;
478
+ text(content: string): Promise</*elided*/ any | null>;
479
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
480
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
481
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
482
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
483
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
567
484
  stream(): Promise<import("node:stream").Readable>;
568
485
  content(): Promise<Buffer>;
569
486
  readonly index: import("./Message").IMessageIndex;
@@ -583,7 +500,17 @@ export declare function contact(wa: WhatsApp): {
583
500
  get created_at(): number;
584
501
  get deleted_at(): number | null;
585
502
  } | null>;
586
- location(cid: string, opts: import("./Message").LocationOptions): Promise<{
503
+ location(cid: string, opts: import("./Message").LocationOptions, mid?: string): Promise<{
504
+ edit(text: string): Promise<boolean>;
505
+ remove(): Promise<boolean>;
506
+ forward(to_cid: string): Promise<boolean>;
507
+ react(emoji: string): Promise<boolean>;
508
+ text(content: string): Promise</*elided*/ any | null>;
509
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
510
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
511
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
512
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
513
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
587
514
  stream(): Promise<import("node:stream").Readable>;
588
515
  content(): Promise<Buffer>;
589
516
  readonly index: import("./Message").IMessageIndex;
@@ -603,7 +530,17 @@ export declare function contact(wa: WhatsApp): {
603
530
  get created_at(): number;
604
531
  get deleted_at(): number | null;
605
532
  } | null>;
606
- poll(cid: string, opts: import("./Message").PollOptions): Promise<{
533
+ poll(cid: string, opts: import("./Message").PollOptions, mid?: string): Promise<{
534
+ edit(text: string): Promise<boolean>;
535
+ remove(): Promise<boolean>;
536
+ forward(to_cid: string): Promise<boolean>;
537
+ react(emoji: string): Promise<boolean>;
538
+ text(content: string): Promise</*elided*/ any | null>;
539
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
540
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
541
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
542
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
543
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
607
544
  stream(): Promise<import("node:stream").Readable>;
608
545
  content(): Promise<Buffer>;
609
546
  readonly index: import("./Message").IMessageIndex;
@@ -624,9 +561,13 @@ export declare function contact(wa: WhatsApp): {
624
561
  get deleted_at(): number | null;
625
562
  } | null>;
626
563
  watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
627
- notify(cid: string, mid: string): void;
564
+ } & {
565
+ _add_to_index: (cid: string, mid: string, timestamp: number) => Promise<void>;
566
+ _remove_from_index: (cid: string, mid: string) => Promise<void>;
567
+ _notify: (cid: string, mid: string) => void;
568
+ _build_index: (raw: import("baileys").WAMessage, edited?: boolean) => import("./Message").IMessageIndex;
628
569
  }>[]>;
629
- refresh(): Promise</*elided*/ any | null>;
570
+ contact(): Promise<InstanceType</*elided*/ any> | null>;
630
571
  readonly raw: import("./Chat").IChatRaw;
631
572
  get id(): string;
632
573
  get type(): "contact" | "group";
@@ -639,49 +580,59 @@ export declare function contact(wa: WhatsApp): {
639
580
  get readonly(): boolean;
640
581
  } | null>;
641
582
  readonly raw: IContactRaw;
642
- /** JID único del contacto */
583
+ /** JID único del contacto / Unique contact JID */
643
584
  get id(): string;
644
- /** Nombre del contacto */
585
+ /** Nombre del contacto / Contact name */
645
586
  get name(): string;
646
- /** URL de la foto de perfil o null */
587
+ /** URL de la foto de perfil o null / Profile picture URL or null */
647
588
  get photo(): string | null;
648
- /** Número de teléfono sin formato */
589
+ /** Número de teléfono sin formato / Phone number without format */
649
590
  get phone(): string;
650
- /** Bio del contacto */
591
+ /** Bio del contacto / Contact bio */
651
592
  get content(): string;
652
593
  } | null>;
653
- /**
654
- * @description Cambia el nombre de un contacto.
655
- * @param uid JID del contacto.
656
- * @param name Nuevo nombre.
657
- * @returns true si se guardó correctamente.
658
- */
659
- rename(uid: string, name: string): Promise<boolean>;
660
594
  /**
661
595
  * @description Obtiene contactos paginados.
596
+ * Retrieves paginated contacts.
662
597
  * @param offset Inicio de paginación.
663
598
  * @param limit Cantidad máxima de resultados.
664
- * @returns Array de contactos.
665
599
  */
666
- paginate(offset?: number, limit?: number): Promise<{
600
+ list(offset?: number, limit?: number): Promise<{
667
601
  /**
668
602
  * @description Cambia el nombre del contacto.
603
+ * Renames the contact.
669
604
  * @param name Nuevo nombre.
670
- * @returns true si se guardó correctamente.
671
605
  */
672
606
  rename(name: string): Promise<boolean>;
673
607
  /**
674
608
  * @description Actualiza los datos del perfil desde WhatsApp.
675
- * @returns this con datos actualizados, o null si falla.
609
+ * Refreshes profile data from WhatsApp.
676
610
  */
677
611
  refresh(): Promise</*elided*/ any | null>;
678
612
  /**
679
613
  * @description Obtiene o crea el chat con este contacto.
680
- * @returns Chat asociado al contacto.
614
+ * Gets or creates the chat with this contact.
681
615
  */
682
616
  chat(): Promise<{
617
+ refresh(): Promise</*elided*/ any | null>;
618
+ remove(): Promise<boolean>;
619
+ pin(value: boolean): Promise<boolean>;
620
+ archive(value: boolean): Promise<boolean>;
621
+ mute(duration: number | null): Promise<boolean>;
622
+ seen(): Promise<boolean>;
623
+ members(offset?: number, limit?: number): Promise<InstanceType</*elided*/ any>[]>;
683
624
  messages(offset?: number, limit?: number): Promise<InstanceType<{
684
625
  new (data: import("./Message").IMessage): {
626
+ edit(text: string): Promise<boolean>;
627
+ remove(): Promise<boolean>;
628
+ forward(to_cid: string): Promise<boolean>;
629
+ react(emoji: string): Promise<boolean>;
630
+ text(content: string): Promise</*elided*/ any | null>;
631
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
632
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
633
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
634
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
635
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
685
636
  stream(): Promise<import("node:stream").Readable>;
686
637
  content(): Promise<Buffer>;
687
638
  readonly index: import("./Message").IMessageIndex;
@@ -702,11 +653,19 @@ export declare function contact(wa: WhatsApp): {
702
653
  get deleted_at(): number | null;
703
654
  };
704
655
  get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
705
- react(cid: string, mid: string, emoji: string): Promise<boolean>;
706
- remove(cid: string, mid: string): Promise<boolean>;
707
- forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
708
- edit(cid: string, mid: string, text: string): Promise<boolean>;
709
- text(cid: string, text: string): Promise<{
656
+ list(cid: string, offset?: number, limit?: number): Promise<InstanceType</*elided*/ any>[]>;
657
+ count(cid: string): Promise<number>;
658
+ text(cid: string, text: string, mid?: string): Promise<{
659
+ edit(text: string): Promise<boolean>;
660
+ remove(): Promise<boolean>;
661
+ forward(to_cid: string): Promise<boolean>;
662
+ react(emoji: string): Promise<boolean>;
663
+ text(content: string): Promise</*elided*/ any | null>;
664
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
665
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
666
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
667
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
668
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
710
669
  stream(): Promise<import("node:stream").Readable>;
711
670
  content(): Promise<Buffer>;
712
671
  readonly index: import("./Message").IMessageIndex;
@@ -726,7 +685,17 @@ export declare function contact(wa: WhatsApp): {
726
685
  get created_at(): number;
727
686
  get deleted_at(): number | null;
728
687
  } | null>;
729
- image(cid: string, buffer: Buffer, caption?: string): Promise<{
688
+ image(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
689
+ edit(text: string): Promise<boolean>;
690
+ remove(): Promise<boolean>;
691
+ forward(to_cid: string): Promise<boolean>;
692
+ react(emoji: string): Promise<boolean>;
693
+ text(content: string): Promise</*elided*/ any | null>;
694
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
695
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
696
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
697
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
698
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
730
699
  stream(): Promise<import("node:stream").Readable>;
731
700
  content(): Promise<Buffer>;
732
701
  readonly index: import("./Message").IMessageIndex;
@@ -746,7 +715,17 @@ export declare function contact(wa: WhatsApp): {
746
715
  get created_at(): number;
747
716
  get deleted_at(): number | null;
748
717
  } | null>;
749
- video(cid: string, buffer: Buffer, caption?: string): Promise<{
718
+ video(cid: string, buffer: Buffer, caption?: string, mid?: string): Promise<{
719
+ edit(text: string): Promise<boolean>;
720
+ remove(): Promise<boolean>;
721
+ forward(to_cid: string): Promise<boolean>;
722
+ react(emoji: string): Promise<boolean>;
723
+ text(content: string): Promise</*elided*/ any | null>;
724
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
725
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
726
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
727
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
728
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
750
729
  stream(): Promise<import("node:stream").Readable>;
751
730
  content(): Promise<Buffer>;
752
731
  readonly index: import("./Message").IMessageIndex;
@@ -766,7 +745,17 @@ export declare function contact(wa: WhatsApp): {
766
745
  get created_at(): number;
767
746
  get deleted_at(): number | null;
768
747
  } | null>;
769
- audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
748
+ audio(cid: string, buffer: Buffer, ptt?: boolean, mid?: string): Promise<{
749
+ edit(text: string): Promise<boolean>;
750
+ remove(): Promise<boolean>;
751
+ forward(to_cid: string): Promise<boolean>;
752
+ react(emoji: string): Promise<boolean>;
753
+ text(content: string): Promise</*elided*/ any | null>;
754
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
755
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
756
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
757
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
758
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
770
759
  stream(): Promise<import("node:stream").Readable>;
771
760
  content(): Promise<Buffer>;
772
761
  readonly index: import("./Message").IMessageIndex;
@@ -786,7 +775,17 @@ export declare function contact(wa: WhatsApp): {
786
775
  get created_at(): number;
787
776
  get deleted_at(): number | null;
788
777
  } | null>;
789
- location(cid: string, opts: import("./Message").LocationOptions): Promise<{
778
+ location(cid: string, opts: import("./Message").LocationOptions, mid?: string): Promise<{
779
+ edit(text: string): Promise<boolean>;
780
+ remove(): Promise<boolean>;
781
+ forward(to_cid: string): Promise<boolean>;
782
+ react(emoji: string): Promise<boolean>;
783
+ text(content: string): Promise</*elided*/ any | null>;
784
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
785
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
786
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
787
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
788
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
790
789
  stream(): Promise<import("node:stream").Readable>;
791
790
  content(): Promise<Buffer>;
792
791
  readonly index: import("./Message").IMessageIndex;
@@ -806,7 +805,17 @@ export declare function contact(wa: WhatsApp): {
806
805
  get created_at(): number;
807
806
  get deleted_at(): number | null;
808
807
  } | null>;
809
- poll(cid: string, opts: import("./Message").PollOptions): Promise<{
808
+ poll(cid: string, opts: import("./Message").PollOptions, mid?: string): Promise<{
809
+ edit(text: string): Promise<boolean>;
810
+ remove(): Promise<boolean>;
811
+ forward(to_cid: string): Promise<boolean>;
812
+ react(emoji: string): Promise<boolean>;
813
+ text(content: string): Promise</*elided*/ any | null>;
814
+ image(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
815
+ video(buffer: Buffer, caption?: string): Promise</*elided*/ any | null>;
816
+ audio(buffer: Buffer, ptt?: boolean): Promise</*elided*/ any | null>;
817
+ location(opts: import("./Message").LocationOptions): Promise</*elided*/ any | null>;
818
+ poll(opts: import("./Message").PollOptions): Promise</*elided*/ any | null>;
810
819
  stream(): Promise<import("node:stream").Readable>;
811
820
  content(): Promise<Buffer>;
812
821
  readonly index: import("./Message").IMessageIndex;
@@ -827,9 +836,13 @@ export declare function contact(wa: WhatsApp): {
827
836
  get deleted_at(): number | null;
828
837
  } | null>;
829
838
  watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
830
- notify(cid: string, mid: string): void;
839
+ } & {
840
+ _add_to_index: (cid: string, mid: string, timestamp: number) => Promise<void>;
841
+ _remove_from_index: (cid: string, mid: string) => Promise<void>;
842
+ _notify: (cid: string, mid: string) => void;
843
+ _build_index: (raw: import("baileys").WAMessage, edited?: boolean) => import("./Message").IMessageIndex;
831
844
  }>[]>;
832
- refresh(): Promise</*elided*/ any | null>;
845
+ contact(): Promise<InstanceType</*elided*/ any> | null>;
833
846
  readonly raw: import("./Chat").IChatRaw;
834
847
  get id(): string;
835
848
  get type(): "contact" | "group";
@@ -842,15 +855,15 @@ export declare function contact(wa: WhatsApp): {
842
855
  get readonly(): boolean;
843
856
  } | null>;
844
857
  readonly raw: IContactRaw;
845
- /** JID único del contacto */
858
+ /** JID único del contacto / Unique contact JID */
846
859
  get id(): string;
847
- /** Nombre del contacto */
860
+ /** Nombre del contacto / Contact name */
848
861
  get name(): string;
849
- /** URL de la foto de perfil o null */
862
+ /** URL de la foto de perfil o null / Profile picture URL or null */
850
863
  get photo(): string | null;
851
- /** Número de teléfono sin formato */
864
+ /** Número de teléfono sin formato / Phone number without format */
852
865
  get phone(): string;
853
- /** Bio del contacto */
866
+ /** Bio del contacto / Contact bio */
854
867
  get content(): string;
855
868
  }[]>;
856
869
  };