@arcaelas/whatsapp 1.1.1 → 1.2.3

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.
@@ -89,23 +89,24 @@ export declare function contact(wa: WhatsApp): {
89
89
  chat(): Promise<{
90
90
  messages(offset?: number, limit?: number): Promise<InstanceType<{
91
91
  new (data: import("./Message").IMessage): {
92
+ stream(): Promise<import("node:stream").Readable>;
92
93
  content(): Promise<Buffer>;
93
94
  readonly index: import("./Message").IMessageIndex;
94
95
  readonly raw: import("baileys").WAMessage;
95
- readonly id: string;
96
- readonly cid: string;
97
- readonly mid: string | null;
98
- readonly me: boolean;
99
- readonly author: string;
100
- readonly edited: boolean;
101
- readonly type: import("./Message").MessageType;
102
- readonly caption: string;
103
- readonly mime: string;
104
- readonly status: import("./Message").MESSAGE_STATUS;
105
- readonly starred: boolean;
106
- readonly forwarded: boolean;
107
- readonly created_at: number;
108
- readonly deleted_at: number | null;
96
+ get id(): string;
97
+ get cid(): string;
98
+ get mid(): string | null;
99
+ get me(): boolean;
100
+ get author(): string;
101
+ get edited(): boolean;
102
+ get type(): import("./Message").MessageType;
103
+ get caption(): string;
104
+ get mime(): string;
105
+ get status(): import("./Message").MESSAGE_STATUS;
106
+ get starred(): boolean;
107
+ get forwarded(): boolean;
108
+ get created_at(): number;
109
+ get deleted_at(): number | null;
109
110
  };
110
111
  get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
111
112
  react(cid: string, mid: string, emoji: string): Promise<boolean>;
@@ -113,145 +114,151 @@ export declare function contact(wa: WhatsApp): {
113
114
  forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
114
115
  edit(cid: string, mid: string, text: string): Promise<boolean>;
115
116
  text(cid: string, text: string): Promise<{
117
+ stream(): Promise<import("node:stream").Readable>;
116
118
  content(): Promise<Buffer>;
117
119
  readonly index: import("./Message").IMessageIndex;
118
120
  readonly raw: import("baileys").WAMessage;
119
- readonly id: string;
120
- readonly cid: string;
121
- readonly mid: string | null;
122
- readonly me: boolean;
123
- readonly author: string;
124
- readonly edited: boolean;
125
- readonly type: import("./Message").MessageType;
126
- readonly caption: string;
127
- readonly mime: string;
128
- readonly status: import("./Message").MESSAGE_STATUS;
129
- readonly starred: boolean;
130
- readonly forwarded: boolean;
131
- readonly created_at: number;
132
- readonly deleted_at: number | null;
121
+ get id(): string;
122
+ get cid(): string;
123
+ get mid(): string | null;
124
+ get me(): boolean;
125
+ get author(): string;
126
+ get edited(): boolean;
127
+ get type(): import("./Message").MessageType;
128
+ get caption(): string;
129
+ get mime(): string;
130
+ get status(): import("./Message").MESSAGE_STATUS;
131
+ get starred(): boolean;
132
+ get forwarded(): boolean;
133
+ get created_at(): number;
134
+ get deleted_at(): number | null;
133
135
  } | null>;
134
136
  image(cid: string, buffer: Buffer, caption?: string): Promise<{
137
+ stream(): Promise<import("node:stream").Readable>;
135
138
  content(): Promise<Buffer>;
136
139
  readonly index: import("./Message").IMessageIndex;
137
140
  readonly raw: import("baileys").WAMessage;
138
- readonly id: string;
139
- readonly cid: string;
140
- readonly mid: string | null;
141
- readonly me: boolean;
142
- readonly author: string;
143
- readonly edited: boolean;
144
- readonly type: import("./Message").MessageType;
145
- readonly caption: string;
146
- readonly mime: string;
147
- readonly status: import("./Message").MESSAGE_STATUS;
148
- readonly starred: boolean;
149
- readonly forwarded: boolean;
150
- readonly created_at: number;
151
- readonly deleted_at: number | null;
141
+ get id(): string;
142
+ get cid(): string;
143
+ get mid(): string | null;
144
+ get me(): boolean;
145
+ get author(): string;
146
+ get edited(): boolean;
147
+ get type(): import("./Message").MessageType;
148
+ get caption(): string;
149
+ get mime(): string;
150
+ get status(): import("./Message").MESSAGE_STATUS;
151
+ get starred(): boolean;
152
+ get forwarded(): boolean;
153
+ get created_at(): number;
154
+ get deleted_at(): number | null;
152
155
  } | null>;
153
156
  video(cid: string, buffer: Buffer, caption?: string): Promise<{
157
+ stream(): Promise<import("node:stream").Readable>;
154
158
  content(): Promise<Buffer>;
155
159
  readonly index: import("./Message").IMessageIndex;
156
160
  readonly raw: import("baileys").WAMessage;
157
- readonly id: string;
158
- readonly cid: string;
159
- readonly mid: string | null;
160
- readonly me: boolean;
161
- readonly author: string;
162
- readonly edited: boolean;
163
- readonly type: import("./Message").MessageType;
164
- readonly caption: string;
165
- readonly mime: string;
166
- readonly status: import("./Message").MESSAGE_STATUS;
167
- readonly starred: boolean;
168
- readonly forwarded: boolean;
169
- readonly created_at: number;
170
- readonly deleted_at: number | null;
161
+ get id(): string;
162
+ get cid(): string;
163
+ get mid(): string | null;
164
+ get me(): boolean;
165
+ get author(): string;
166
+ get edited(): boolean;
167
+ get type(): import("./Message").MessageType;
168
+ get caption(): string;
169
+ get mime(): string;
170
+ get status(): import("./Message").MESSAGE_STATUS;
171
+ get starred(): boolean;
172
+ get forwarded(): boolean;
173
+ get created_at(): number;
174
+ get deleted_at(): number | null;
171
175
  } | null>;
172
176
  audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
177
+ stream(): Promise<import("node:stream").Readable>;
173
178
  content(): Promise<Buffer>;
174
179
  readonly index: import("./Message").IMessageIndex;
175
180
  readonly raw: import("baileys").WAMessage;
176
- readonly id: string;
177
- readonly cid: string;
178
- readonly mid: string | null;
179
- readonly me: boolean;
180
- readonly author: string;
181
- readonly edited: boolean;
182
- readonly type: import("./Message").MessageType;
183
- readonly caption: string;
184
- readonly mime: string;
185
- readonly status: import("./Message").MESSAGE_STATUS;
186
- readonly starred: boolean;
187
- readonly forwarded: boolean;
188
- readonly created_at: number;
189
- readonly deleted_at: number | null;
181
+ get id(): string;
182
+ get cid(): string;
183
+ get mid(): string | null;
184
+ get me(): boolean;
185
+ get author(): string;
186
+ get edited(): boolean;
187
+ get type(): import("./Message").MessageType;
188
+ get caption(): string;
189
+ get mime(): string;
190
+ get status(): import("./Message").MESSAGE_STATUS;
191
+ get starred(): boolean;
192
+ get forwarded(): boolean;
193
+ get created_at(): number;
194
+ get deleted_at(): number | null;
190
195
  } | null>;
191
196
  location(cid: string, opts: import("./Message").LocationOptions): Promise<{
197
+ stream(): Promise<import("node:stream").Readable>;
192
198
  content(): Promise<Buffer>;
193
199
  readonly index: import("./Message").IMessageIndex;
194
200
  readonly raw: import("baileys").WAMessage;
195
- readonly id: string;
196
- readonly cid: string;
197
- readonly mid: string | null;
198
- readonly me: boolean;
199
- readonly author: string;
200
- readonly edited: boolean;
201
- readonly type: import("./Message").MessageType;
202
- readonly caption: string;
203
- readonly mime: string;
204
- readonly status: import("./Message").MESSAGE_STATUS;
205
- readonly starred: boolean;
206
- readonly forwarded: boolean;
207
- readonly created_at: number;
208
- readonly deleted_at: number | null;
201
+ get id(): string;
202
+ get cid(): string;
203
+ get mid(): string | null;
204
+ get me(): boolean;
205
+ get author(): string;
206
+ get edited(): boolean;
207
+ get type(): import("./Message").MessageType;
208
+ get caption(): string;
209
+ get mime(): string;
210
+ get status(): import("./Message").MESSAGE_STATUS;
211
+ get starred(): boolean;
212
+ get forwarded(): boolean;
213
+ get created_at(): number;
214
+ get deleted_at(): number | null;
209
215
  } | null>;
210
216
  poll(cid: string, opts: import("./Message").PollOptions): Promise<{
217
+ stream(): Promise<import("node:stream").Readable>;
211
218
  content(): Promise<Buffer>;
212
219
  readonly index: import("./Message").IMessageIndex;
213
220
  readonly raw: import("baileys").WAMessage;
214
- readonly id: string;
215
- readonly cid: string;
216
- readonly mid: string | null;
217
- readonly me: boolean;
218
- readonly author: string;
219
- readonly edited: boolean;
220
- readonly type: import("./Message").MessageType;
221
- readonly caption: string;
222
- readonly mime: string;
223
- readonly status: import("./Message").MESSAGE_STATUS;
224
- readonly starred: boolean;
225
- readonly forwarded: boolean;
226
- readonly created_at: number;
227
- readonly deleted_at: number | null;
221
+ get id(): string;
222
+ get cid(): string;
223
+ get mid(): string | null;
224
+ get me(): boolean;
225
+ get author(): string;
226
+ get edited(): boolean;
227
+ get type(): import("./Message").MessageType;
228
+ get caption(): string;
229
+ get mime(): string;
230
+ get status(): import("./Message").MESSAGE_STATUS;
231
+ get starred(): boolean;
232
+ get forwarded(): boolean;
233
+ get created_at(): number;
234
+ get deleted_at(): number | null;
228
235
  } | null>;
229
236
  watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
230
237
  notify(cid: string, mid: string): void;
231
238
  }>[]>;
232
239
  refresh(): Promise</*elided*/ any | null>;
233
240
  readonly raw: import("./Chat").IChatRaw;
234
- readonly id: string;
235
- readonly type: "contact" | "group";
236
- readonly name: string;
237
- readonly content: string;
238
- readonly pined: boolean;
239
- readonly archived: boolean;
240
- readonly muted: number | false;
241
- readonly readed: boolean;
242
- readonly readonly: boolean;
241
+ get id(): string;
242
+ get type(): "contact" | "group";
243
+ get name(): string;
244
+ get content(): string;
245
+ get pined(): boolean;
246
+ get archived(): boolean;
247
+ get muted(): number | false;
248
+ get readed(): boolean;
249
+ get readonly(): boolean;
243
250
  } | null>;
244
251
  readonly raw: IContactRaw;
245
252
  /** JID único del contacto */
246
- readonly id: string;
253
+ get id(): string;
247
254
  /** Nombre del contacto */
248
- readonly name: string;
255
+ get name(): string;
249
256
  /** URL de la foto de perfil o null */
250
- readonly photo: string | null;
257
+ get photo(): string | null;
251
258
  /** Número de teléfono sin formato */
252
- readonly phone: string;
259
+ get phone(): string;
253
260
  /** Bio del contacto */
254
- readonly content: string;
261
+ get content(): string;
255
262
  };
256
263
  /**
257
264
  * @description Obtiene un contacto por su ID.
@@ -277,23 +284,24 @@ export declare function contact(wa: WhatsApp): {
277
284
  chat(): Promise<{
278
285
  messages(offset?: number, limit?: number): Promise<InstanceType<{
279
286
  new (data: import("./Message").IMessage): {
287
+ stream(): Promise<import("node:stream").Readable>;
280
288
  content(): Promise<Buffer>;
281
289
  readonly index: import("./Message").IMessageIndex;
282
290
  readonly raw: import("baileys").WAMessage;
283
- readonly id: string;
284
- readonly cid: string;
285
- readonly mid: string | null;
286
- readonly me: boolean;
287
- readonly author: string;
288
- readonly edited: boolean;
289
- readonly type: import("./Message").MessageType;
290
- readonly caption: string;
291
- readonly mime: string;
292
- readonly status: import("./Message").MESSAGE_STATUS;
293
- readonly starred: boolean;
294
- readonly forwarded: boolean;
295
- readonly created_at: number;
296
- readonly deleted_at: number | null;
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;
297
305
  };
298
306
  get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
299
307
  react(cid: string, mid: string, emoji: string): Promise<boolean>;
@@ -301,145 +309,151 @@ export declare function contact(wa: WhatsApp): {
301
309
  forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
302
310
  edit(cid: string, mid: string, text: string): Promise<boolean>;
303
311
  text(cid: string, text: string): Promise<{
312
+ stream(): Promise<import("node:stream").Readable>;
304
313
  content(): Promise<Buffer>;
305
314
  readonly index: import("./Message").IMessageIndex;
306
315
  readonly raw: import("baileys").WAMessage;
307
- readonly id: string;
308
- readonly cid: string;
309
- readonly mid: string | null;
310
- readonly me: boolean;
311
- readonly author: string;
312
- readonly edited: boolean;
313
- readonly type: import("./Message").MessageType;
314
- readonly caption: string;
315
- readonly mime: string;
316
- readonly status: import("./Message").MESSAGE_STATUS;
317
- readonly starred: boolean;
318
- readonly forwarded: boolean;
319
- readonly created_at: number;
320
- readonly deleted_at: number | null;
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;
321
330
  } | null>;
322
331
  image(cid: string, buffer: Buffer, caption?: string): Promise<{
332
+ stream(): Promise<import("node:stream").Readable>;
323
333
  content(): Promise<Buffer>;
324
334
  readonly index: import("./Message").IMessageIndex;
325
335
  readonly raw: import("baileys").WAMessage;
326
- readonly id: string;
327
- readonly cid: string;
328
- readonly mid: string | null;
329
- readonly me: boolean;
330
- readonly author: string;
331
- readonly edited: boolean;
332
- readonly type: import("./Message").MessageType;
333
- readonly caption: string;
334
- readonly mime: string;
335
- readonly status: import("./Message").MESSAGE_STATUS;
336
- readonly starred: boolean;
337
- readonly forwarded: boolean;
338
- readonly created_at: number;
339
- readonly deleted_at: number | null;
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;
340
350
  } | null>;
341
351
  video(cid: string, buffer: Buffer, caption?: string): Promise<{
352
+ stream(): Promise<import("node:stream").Readable>;
342
353
  content(): Promise<Buffer>;
343
354
  readonly index: import("./Message").IMessageIndex;
344
355
  readonly raw: import("baileys").WAMessage;
345
- readonly id: string;
346
- readonly cid: string;
347
- readonly mid: string | null;
348
- readonly me: boolean;
349
- readonly author: string;
350
- readonly edited: boolean;
351
- readonly type: import("./Message").MessageType;
352
- readonly caption: string;
353
- readonly mime: string;
354
- readonly status: import("./Message").MESSAGE_STATUS;
355
- readonly starred: boolean;
356
- readonly forwarded: boolean;
357
- readonly created_at: number;
358
- readonly deleted_at: number | null;
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;
359
370
  } | null>;
360
371
  audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
372
+ stream(): Promise<import("node:stream").Readable>;
361
373
  content(): Promise<Buffer>;
362
374
  readonly index: import("./Message").IMessageIndex;
363
375
  readonly raw: import("baileys").WAMessage;
364
- readonly id: string;
365
- readonly cid: string;
366
- readonly mid: string | null;
367
- readonly me: boolean;
368
- readonly author: string;
369
- readonly edited: boolean;
370
- readonly type: import("./Message").MessageType;
371
- readonly caption: string;
372
- readonly mime: string;
373
- readonly status: import("./Message").MESSAGE_STATUS;
374
- readonly starred: boolean;
375
- readonly forwarded: boolean;
376
- readonly created_at: number;
377
- readonly deleted_at: number | null;
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;
378
390
  } | null>;
379
391
  location(cid: string, opts: import("./Message").LocationOptions): Promise<{
392
+ stream(): Promise<import("node:stream").Readable>;
380
393
  content(): Promise<Buffer>;
381
394
  readonly index: import("./Message").IMessageIndex;
382
395
  readonly raw: import("baileys").WAMessage;
383
- readonly id: string;
384
- readonly cid: string;
385
- readonly mid: string | null;
386
- readonly me: boolean;
387
- readonly author: string;
388
- readonly edited: boolean;
389
- readonly type: import("./Message").MessageType;
390
- readonly caption: string;
391
- readonly mime: string;
392
- readonly status: import("./Message").MESSAGE_STATUS;
393
- readonly starred: boolean;
394
- readonly forwarded: boolean;
395
- readonly created_at: number;
396
- readonly deleted_at: number | null;
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;
397
410
  } | null>;
398
411
  poll(cid: string, opts: import("./Message").PollOptions): Promise<{
412
+ stream(): Promise<import("node:stream").Readable>;
399
413
  content(): Promise<Buffer>;
400
414
  readonly index: import("./Message").IMessageIndex;
401
415
  readonly raw: import("baileys").WAMessage;
402
- readonly id: string;
403
- readonly cid: string;
404
- readonly mid: string | null;
405
- readonly me: boolean;
406
- readonly author: string;
407
- readonly edited: boolean;
408
- readonly type: import("./Message").MessageType;
409
- readonly caption: string;
410
- readonly mime: string;
411
- readonly status: import("./Message").MESSAGE_STATUS;
412
- readonly starred: boolean;
413
- readonly forwarded: boolean;
414
- readonly created_at: number;
415
- readonly deleted_at: number | null;
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;
416
430
  } | null>;
417
431
  watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
418
432
  notify(cid: string, mid: string): void;
419
433
  }>[]>;
420
434
  refresh(): Promise</*elided*/ any | null>;
421
435
  readonly raw: import("./Chat").IChatRaw;
422
- readonly id: string;
423
- readonly type: "contact" | "group";
424
- readonly name: string;
425
- readonly content: string;
426
- readonly pined: boolean;
427
- readonly archived: boolean;
428
- readonly muted: number | false;
429
- readonly readed: boolean;
430
- readonly readonly: boolean;
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;
431
445
  } | null>;
432
446
  readonly raw: IContactRaw;
433
447
  /** JID único del contacto */
434
- readonly id: string;
448
+ get id(): string;
435
449
  /** Nombre del contacto */
436
- readonly name: string;
450
+ get name(): string;
437
451
  /** URL de la foto de perfil o null */
438
- readonly photo: string | null;
452
+ get photo(): string | null;
439
453
  /** Número de teléfono sin formato */
440
- readonly phone: string;
454
+ get phone(): string;
441
455
  /** Bio del contacto */
442
- readonly content: string;
456
+ get content(): string;
443
457
  } | null>;
444
458
  /**
445
459
  * @description Actualiza los datos del perfil desde WhatsApp.
@@ -465,23 +479,24 @@ export declare function contact(wa: WhatsApp): {
465
479
  chat(): Promise<{
466
480
  messages(offset?: number, limit?: number): Promise<InstanceType<{
467
481
  new (data: import("./Message").IMessage): {
482
+ stream(): Promise<import("node:stream").Readable>;
468
483
  content(): Promise<Buffer>;
469
484
  readonly index: import("./Message").IMessageIndex;
470
485
  readonly raw: import("baileys").WAMessage;
471
- readonly id: string;
472
- readonly cid: string;
473
- readonly mid: string | null;
474
- readonly me: boolean;
475
- readonly author: string;
476
- readonly edited: boolean;
477
- readonly type: import("./Message").MessageType;
478
- readonly caption: string;
479
- readonly mime: string;
480
- readonly status: import("./Message").MESSAGE_STATUS;
481
- readonly starred: boolean;
482
- readonly forwarded: boolean;
483
- readonly created_at: number;
484
- readonly deleted_at: number | null;
486
+ get id(): string;
487
+ get cid(): string;
488
+ get mid(): string | null;
489
+ get me(): boolean;
490
+ get author(): string;
491
+ get edited(): boolean;
492
+ get type(): import("./Message").MessageType;
493
+ get caption(): string;
494
+ get mime(): string;
495
+ get status(): import("./Message").MESSAGE_STATUS;
496
+ get starred(): boolean;
497
+ get forwarded(): boolean;
498
+ get created_at(): number;
499
+ get deleted_at(): number | null;
485
500
  };
486
501
  get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
487
502
  react(cid: string, mid: string, emoji: string): Promise<boolean>;
@@ -489,145 +504,151 @@ export declare function contact(wa: WhatsApp): {
489
504
  forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
490
505
  edit(cid: string, mid: string, text: string): Promise<boolean>;
491
506
  text(cid: string, text: string): Promise<{
507
+ stream(): Promise<import("node:stream").Readable>;
492
508
  content(): Promise<Buffer>;
493
509
  readonly index: import("./Message").IMessageIndex;
494
510
  readonly raw: import("baileys").WAMessage;
495
- readonly id: string;
496
- readonly cid: string;
497
- readonly mid: string | null;
498
- readonly me: boolean;
499
- readonly author: string;
500
- readonly edited: boolean;
501
- readonly type: import("./Message").MessageType;
502
- readonly caption: string;
503
- readonly mime: string;
504
- readonly status: import("./Message").MESSAGE_STATUS;
505
- readonly starred: boolean;
506
- readonly forwarded: boolean;
507
- readonly created_at: number;
508
- readonly deleted_at: number | null;
511
+ get id(): string;
512
+ get cid(): string;
513
+ get mid(): string | null;
514
+ get me(): boolean;
515
+ get author(): string;
516
+ get edited(): boolean;
517
+ get type(): import("./Message").MessageType;
518
+ get caption(): string;
519
+ get mime(): string;
520
+ get status(): import("./Message").MESSAGE_STATUS;
521
+ get starred(): boolean;
522
+ get forwarded(): boolean;
523
+ get created_at(): number;
524
+ get deleted_at(): number | null;
509
525
  } | null>;
510
526
  image(cid: string, buffer: Buffer, caption?: string): Promise<{
527
+ stream(): Promise<import("node:stream").Readable>;
511
528
  content(): Promise<Buffer>;
512
529
  readonly index: import("./Message").IMessageIndex;
513
530
  readonly raw: import("baileys").WAMessage;
514
- readonly id: string;
515
- readonly cid: string;
516
- readonly mid: string | null;
517
- readonly me: boolean;
518
- readonly author: string;
519
- readonly edited: boolean;
520
- readonly type: import("./Message").MessageType;
521
- readonly caption: string;
522
- readonly mime: string;
523
- readonly status: import("./Message").MESSAGE_STATUS;
524
- readonly starred: boolean;
525
- readonly forwarded: boolean;
526
- readonly created_at: number;
527
- readonly deleted_at: number | null;
531
+ get id(): string;
532
+ get cid(): string;
533
+ get mid(): string | null;
534
+ get me(): boolean;
535
+ get author(): string;
536
+ get edited(): boolean;
537
+ get type(): import("./Message").MessageType;
538
+ get caption(): string;
539
+ get mime(): string;
540
+ get status(): import("./Message").MESSAGE_STATUS;
541
+ get starred(): boolean;
542
+ get forwarded(): boolean;
543
+ get created_at(): number;
544
+ get deleted_at(): number | null;
528
545
  } | null>;
529
546
  video(cid: string, buffer: Buffer, caption?: string): Promise<{
547
+ stream(): Promise<import("node:stream").Readable>;
530
548
  content(): Promise<Buffer>;
531
549
  readonly index: import("./Message").IMessageIndex;
532
550
  readonly raw: import("baileys").WAMessage;
533
- readonly id: string;
534
- readonly cid: string;
535
- readonly mid: string | null;
536
- readonly me: boolean;
537
- readonly author: string;
538
- readonly edited: boolean;
539
- readonly type: import("./Message").MessageType;
540
- readonly caption: string;
541
- readonly mime: string;
542
- readonly status: import("./Message").MESSAGE_STATUS;
543
- readonly starred: boolean;
544
- readonly forwarded: boolean;
545
- readonly created_at: number;
546
- readonly deleted_at: number | null;
551
+ get id(): string;
552
+ get cid(): string;
553
+ get mid(): string | null;
554
+ get me(): boolean;
555
+ get author(): string;
556
+ get edited(): boolean;
557
+ get type(): import("./Message").MessageType;
558
+ get caption(): string;
559
+ get mime(): string;
560
+ get status(): import("./Message").MESSAGE_STATUS;
561
+ get starred(): boolean;
562
+ get forwarded(): boolean;
563
+ get created_at(): number;
564
+ get deleted_at(): number | null;
547
565
  } | null>;
548
566
  audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
567
+ stream(): Promise<import("node:stream").Readable>;
549
568
  content(): Promise<Buffer>;
550
569
  readonly index: import("./Message").IMessageIndex;
551
570
  readonly raw: import("baileys").WAMessage;
552
- readonly id: string;
553
- readonly cid: string;
554
- readonly mid: string | null;
555
- readonly me: boolean;
556
- readonly author: string;
557
- readonly edited: boolean;
558
- readonly type: import("./Message").MessageType;
559
- readonly caption: string;
560
- readonly mime: string;
561
- readonly status: import("./Message").MESSAGE_STATUS;
562
- readonly starred: boolean;
563
- readonly forwarded: boolean;
564
- readonly created_at: number;
565
- readonly deleted_at: number | null;
571
+ get id(): string;
572
+ get cid(): string;
573
+ get mid(): string | null;
574
+ get me(): boolean;
575
+ get author(): string;
576
+ get edited(): boolean;
577
+ get type(): import("./Message").MessageType;
578
+ get caption(): string;
579
+ get mime(): string;
580
+ get status(): import("./Message").MESSAGE_STATUS;
581
+ get starred(): boolean;
582
+ get forwarded(): boolean;
583
+ get created_at(): number;
584
+ get deleted_at(): number | null;
566
585
  } | null>;
567
586
  location(cid: string, opts: import("./Message").LocationOptions): Promise<{
587
+ stream(): Promise<import("node:stream").Readable>;
568
588
  content(): Promise<Buffer>;
569
589
  readonly index: import("./Message").IMessageIndex;
570
590
  readonly raw: import("baileys").WAMessage;
571
- readonly id: string;
572
- readonly cid: string;
573
- readonly mid: string | null;
574
- readonly me: boolean;
575
- readonly author: string;
576
- readonly edited: boolean;
577
- readonly type: import("./Message").MessageType;
578
- readonly caption: string;
579
- readonly mime: string;
580
- readonly status: import("./Message").MESSAGE_STATUS;
581
- readonly starred: boolean;
582
- readonly forwarded: boolean;
583
- readonly created_at: number;
584
- readonly deleted_at: number | null;
591
+ get id(): string;
592
+ get cid(): string;
593
+ get mid(): string | null;
594
+ get me(): boolean;
595
+ get author(): string;
596
+ get edited(): boolean;
597
+ get type(): import("./Message").MessageType;
598
+ get caption(): string;
599
+ get mime(): string;
600
+ get status(): import("./Message").MESSAGE_STATUS;
601
+ get starred(): boolean;
602
+ get forwarded(): boolean;
603
+ get created_at(): number;
604
+ get deleted_at(): number | null;
585
605
  } | null>;
586
606
  poll(cid: string, opts: import("./Message").PollOptions): Promise<{
607
+ stream(): Promise<import("node:stream").Readable>;
587
608
  content(): Promise<Buffer>;
588
609
  readonly index: import("./Message").IMessageIndex;
589
610
  readonly raw: import("baileys").WAMessage;
590
- readonly id: string;
591
- readonly cid: string;
592
- readonly mid: string | null;
593
- readonly me: boolean;
594
- readonly author: string;
595
- readonly edited: boolean;
596
- readonly type: import("./Message").MessageType;
597
- readonly caption: string;
598
- readonly mime: string;
599
- readonly status: import("./Message").MESSAGE_STATUS;
600
- readonly starred: boolean;
601
- readonly forwarded: boolean;
602
- readonly created_at: number;
603
- readonly deleted_at: number | null;
611
+ get id(): string;
612
+ get cid(): string;
613
+ get mid(): string | null;
614
+ get me(): boolean;
615
+ get author(): string;
616
+ get edited(): boolean;
617
+ get type(): import("./Message").MessageType;
618
+ get caption(): string;
619
+ get mime(): string;
620
+ get status(): import("./Message").MESSAGE_STATUS;
621
+ get starred(): boolean;
622
+ get forwarded(): boolean;
623
+ get created_at(): number;
624
+ get deleted_at(): number | null;
604
625
  } | null>;
605
626
  watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
606
627
  notify(cid: string, mid: string): void;
607
628
  }>[]>;
608
629
  refresh(): Promise</*elided*/ any | null>;
609
630
  readonly raw: import("./Chat").IChatRaw;
610
- readonly id: string;
611
- readonly type: "contact" | "group";
612
- readonly name: string;
613
- readonly content: string;
614
- readonly pined: boolean;
615
- readonly archived: boolean;
616
- readonly muted: number | false;
617
- readonly readed: boolean;
618
- readonly readonly: boolean;
631
+ get id(): string;
632
+ get type(): "contact" | "group";
633
+ get name(): string;
634
+ get content(): string;
635
+ get pined(): boolean;
636
+ get archived(): boolean;
637
+ get muted(): number | false;
638
+ get readed(): boolean;
639
+ get readonly(): boolean;
619
640
  } | null>;
620
641
  readonly raw: IContactRaw;
621
642
  /** JID único del contacto */
622
- readonly id: string;
643
+ get id(): string;
623
644
  /** Nombre del contacto */
624
- readonly name: string;
645
+ get name(): string;
625
646
  /** URL de la foto de perfil o null */
626
- readonly photo: string | null;
647
+ get photo(): string | null;
627
648
  /** Número de teléfono sin formato */
628
- readonly phone: string;
649
+ get phone(): string;
629
650
  /** Bio del contacto */
630
- readonly content: string;
651
+ get content(): string;
631
652
  } | null>;
632
653
  /**
633
654
  * @description Cambia el nombre de un contacto.
@@ -661,23 +682,24 @@ export declare function contact(wa: WhatsApp): {
661
682
  chat(): Promise<{
662
683
  messages(offset?: number, limit?: number): Promise<InstanceType<{
663
684
  new (data: import("./Message").IMessage): {
685
+ stream(): Promise<import("node:stream").Readable>;
664
686
  content(): Promise<Buffer>;
665
687
  readonly index: import("./Message").IMessageIndex;
666
688
  readonly raw: import("baileys").WAMessage;
667
- readonly id: string;
668
- readonly cid: string;
669
- readonly mid: string | null;
670
- readonly me: boolean;
671
- readonly author: string;
672
- readonly edited: boolean;
673
- readonly type: import("./Message").MessageType;
674
- readonly caption: string;
675
- readonly mime: string;
676
- readonly status: import("./Message").MESSAGE_STATUS;
677
- readonly starred: boolean;
678
- readonly forwarded: boolean;
679
- readonly created_at: number;
680
- readonly deleted_at: number | null;
689
+ get id(): string;
690
+ get cid(): string;
691
+ get mid(): string | null;
692
+ get me(): boolean;
693
+ get author(): string;
694
+ get edited(): boolean;
695
+ get type(): import("./Message").MessageType;
696
+ get caption(): string;
697
+ get mime(): string;
698
+ get status(): import("./Message").MESSAGE_STATUS;
699
+ get starred(): boolean;
700
+ get forwarded(): boolean;
701
+ get created_at(): number;
702
+ get deleted_at(): number | null;
681
703
  };
682
704
  get(cid: string, mid: string): Promise<InstanceType</*elided*/ any> | null>;
683
705
  react(cid: string, mid: string, emoji: string): Promise<boolean>;
@@ -685,144 +707,150 @@ export declare function contact(wa: WhatsApp): {
685
707
  forward(cid: string, mid: string, to_cid: string): Promise<boolean>;
686
708
  edit(cid: string, mid: string, text: string): Promise<boolean>;
687
709
  text(cid: string, text: string): Promise<{
710
+ stream(): Promise<import("node:stream").Readable>;
688
711
  content(): Promise<Buffer>;
689
712
  readonly index: import("./Message").IMessageIndex;
690
713
  readonly raw: import("baileys").WAMessage;
691
- readonly id: string;
692
- readonly cid: string;
693
- readonly mid: string | null;
694
- readonly me: boolean;
695
- readonly author: string;
696
- readonly edited: boolean;
697
- readonly type: import("./Message").MessageType;
698
- readonly caption: string;
699
- readonly mime: string;
700
- readonly status: import("./Message").MESSAGE_STATUS;
701
- readonly starred: boolean;
702
- readonly forwarded: boolean;
703
- readonly created_at: number;
704
- readonly deleted_at: number | null;
714
+ get id(): string;
715
+ get cid(): string;
716
+ get mid(): string | null;
717
+ get me(): boolean;
718
+ get author(): string;
719
+ get edited(): boolean;
720
+ get type(): import("./Message").MessageType;
721
+ get caption(): string;
722
+ get mime(): string;
723
+ get status(): import("./Message").MESSAGE_STATUS;
724
+ get starred(): boolean;
725
+ get forwarded(): boolean;
726
+ get created_at(): number;
727
+ get deleted_at(): number | null;
705
728
  } | null>;
706
729
  image(cid: string, buffer: Buffer, caption?: string): Promise<{
730
+ stream(): Promise<import("node:stream").Readable>;
707
731
  content(): Promise<Buffer>;
708
732
  readonly index: import("./Message").IMessageIndex;
709
733
  readonly raw: import("baileys").WAMessage;
710
- readonly id: string;
711
- readonly cid: string;
712
- readonly mid: string | null;
713
- readonly me: boolean;
714
- readonly author: string;
715
- readonly edited: boolean;
716
- readonly type: import("./Message").MessageType;
717
- readonly caption: string;
718
- readonly mime: string;
719
- readonly status: import("./Message").MESSAGE_STATUS;
720
- readonly starred: boolean;
721
- readonly forwarded: boolean;
722
- readonly created_at: number;
723
- readonly deleted_at: number | null;
734
+ get id(): string;
735
+ get cid(): string;
736
+ get mid(): string | null;
737
+ get me(): boolean;
738
+ get author(): string;
739
+ get edited(): boolean;
740
+ get type(): import("./Message").MessageType;
741
+ get caption(): string;
742
+ get mime(): string;
743
+ get status(): import("./Message").MESSAGE_STATUS;
744
+ get starred(): boolean;
745
+ get forwarded(): boolean;
746
+ get created_at(): number;
747
+ get deleted_at(): number | null;
724
748
  } | null>;
725
749
  video(cid: string, buffer: Buffer, caption?: string): Promise<{
750
+ stream(): Promise<import("node:stream").Readable>;
726
751
  content(): Promise<Buffer>;
727
752
  readonly index: import("./Message").IMessageIndex;
728
753
  readonly raw: import("baileys").WAMessage;
729
- readonly id: string;
730
- readonly cid: string;
731
- readonly mid: string | null;
732
- readonly me: boolean;
733
- readonly author: string;
734
- readonly edited: boolean;
735
- readonly type: import("./Message").MessageType;
736
- readonly caption: string;
737
- readonly mime: string;
738
- readonly status: import("./Message").MESSAGE_STATUS;
739
- readonly starred: boolean;
740
- readonly forwarded: boolean;
741
- readonly created_at: number;
742
- readonly deleted_at: number | null;
754
+ get id(): string;
755
+ get cid(): string;
756
+ get mid(): string | null;
757
+ get me(): boolean;
758
+ get author(): string;
759
+ get edited(): boolean;
760
+ get type(): import("./Message").MessageType;
761
+ get caption(): string;
762
+ get mime(): string;
763
+ get status(): import("./Message").MESSAGE_STATUS;
764
+ get starred(): boolean;
765
+ get forwarded(): boolean;
766
+ get created_at(): number;
767
+ get deleted_at(): number | null;
743
768
  } | null>;
744
769
  audio(cid: string, buffer: Buffer, ptt?: boolean): Promise<{
770
+ stream(): Promise<import("node:stream").Readable>;
745
771
  content(): Promise<Buffer>;
746
772
  readonly index: import("./Message").IMessageIndex;
747
773
  readonly raw: import("baileys").WAMessage;
748
- readonly id: string;
749
- readonly cid: string;
750
- readonly mid: string | null;
751
- readonly me: boolean;
752
- readonly author: string;
753
- readonly edited: boolean;
754
- readonly type: import("./Message").MessageType;
755
- readonly caption: string;
756
- readonly mime: string;
757
- readonly status: import("./Message").MESSAGE_STATUS;
758
- readonly starred: boolean;
759
- readonly forwarded: boolean;
760
- readonly created_at: number;
761
- readonly deleted_at: number | null;
774
+ get id(): string;
775
+ get cid(): string;
776
+ get mid(): string | null;
777
+ get me(): boolean;
778
+ get author(): string;
779
+ get edited(): boolean;
780
+ get type(): import("./Message").MessageType;
781
+ get caption(): string;
782
+ get mime(): string;
783
+ get status(): import("./Message").MESSAGE_STATUS;
784
+ get starred(): boolean;
785
+ get forwarded(): boolean;
786
+ get created_at(): number;
787
+ get deleted_at(): number | null;
762
788
  } | null>;
763
789
  location(cid: string, opts: import("./Message").LocationOptions): Promise<{
790
+ stream(): Promise<import("node:stream").Readable>;
764
791
  content(): Promise<Buffer>;
765
792
  readonly index: import("./Message").IMessageIndex;
766
793
  readonly raw: import("baileys").WAMessage;
767
- readonly id: string;
768
- readonly cid: string;
769
- readonly mid: string | null;
770
- readonly me: boolean;
771
- readonly author: string;
772
- readonly edited: boolean;
773
- readonly type: import("./Message").MessageType;
774
- readonly caption: string;
775
- readonly mime: string;
776
- readonly status: import("./Message").MESSAGE_STATUS;
777
- readonly starred: boolean;
778
- readonly forwarded: boolean;
779
- readonly created_at: number;
780
- readonly deleted_at: number | null;
794
+ get id(): string;
795
+ get cid(): string;
796
+ get mid(): string | null;
797
+ get me(): boolean;
798
+ get author(): string;
799
+ get edited(): boolean;
800
+ get type(): import("./Message").MessageType;
801
+ get caption(): string;
802
+ get mime(): string;
803
+ get status(): import("./Message").MESSAGE_STATUS;
804
+ get starred(): boolean;
805
+ get forwarded(): boolean;
806
+ get created_at(): number;
807
+ get deleted_at(): number | null;
781
808
  } | null>;
782
809
  poll(cid: string, opts: import("./Message").PollOptions): Promise<{
810
+ stream(): Promise<import("node:stream").Readable>;
783
811
  content(): Promise<Buffer>;
784
812
  readonly index: import("./Message").IMessageIndex;
785
813
  readonly raw: import("baileys").WAMessage;
786
- readonly id: string;
787
- readonly cid: string;
788
- readonly mid: string | null;
789
- readonly me: boolean;
790
- readonly author: string;
791
- readonly edited: boolean;
792
- readonly type: import("./Message").MessageType;
793
- readonly caption: string;
794
- readonly mime: string;
795
- readonly status: import("./Message").MESSAGE_STATUS;
796
- readonly starred: boolean;
797
- readonly forwarded: boolean;
798
- readonly created_at: number;
799
- readonly deleted_at: number | null;
814
+ get id(): string;
815
+ get cid(): string;
816
+ get mid(): string | null;
817
+ get me(): boolean;
818
+ get author(): string;
819
+ get edited(): boolean;
820
+ get type(): import("./Message").MessageType;
821
+ get caption(): string;
822
+ get mime(): string;
823
+ get status(): import("./Message").MESSAGE_STATUS;
824
+ get starred(): boolean;
825
+ get forwarded(): boolean;
826
+ get created_at(): number;
827
+ get deleted_at(): number | null;
800
828
  } | null>;
801
829
  watch(cid: string, mid: string, handler: (msg: InstanceType</*elided*/ any>) => void): () => void;
802
830
  notify(cid: string, mid: string): void;
803
831
  }>[]>;
804
832
  refresh(): Promise</*elided*/ any | null>;
805
833
  readonly raw: import("./Chat").IChatRaw;
806
- readonly id: string;
807
- readonly type: "contact" | "group";
808
- readonly name: string;
809
- readonly content: string;
810
- readonly pined: boolean;
811
- readonly archived: boolean;
812
- readonly muted: number | false;
813
- readonly readed: boolean;
814
- readonly readonly: boolean;
834
+ get id(): string;
835
+ get type(): "contact" | "group";
836
+ get name(): string;
837
+ get content(): string;
838
+ get pined(): boolean;
839
+ get archived(): boolean;
840
+ get muted(): number | false;
841
+ get readed(): boolean;
842
+ get readonly(): boolean;
815
843
  } | null>;
816
844
  readonly raw: IContactRaw;
817
845
  /** JID único del contacto */
818
- readonly id: string;
846
+ get id(): string;
819
847
  /** Nombre del contacto */
820
- readonly name: string;
848
+ get name(): string;
821
849
  /** URL de la foto de perfil o null */
822
- readonly photo: string | null;
850
+ get photo(): string | null;
823
851
  /** Número de teléfono sin formato */
824
- readonly phone: string;
852
+ get phone(): string;
825
853
  /** Bio del contacto */
826
- readonly content: string;
854
+ get content(): string;
827
855
  }[]>;
828
856
  };