@open-wa/wa-automate-types-only 4.37.5 → 4.39.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.
package/dist/api/Client.d.ts
CHANGED
@@ -19,7 +19,7 @@ import { Listener } from 'eventemitter2';
|
|
19
19
|
import PriorityQueue from 'p-queue/dist/priority-queue';
|
20
20
|
import { NextFunction, Request, Response } from 'express';
|
21
21
|
import { Call } from './model/call';
|
22
|
-
import { Button, LocationButtonBody, Section } from './model/button';
|
22
|
+
import { AdvancedButton, Button, LocationButtonBody, Section } from './model/button';
|
23
23
|
import { JsonObject } from 'type-fest';
|
24
24
|
import { ReactionEvent } from './model/reactions';
|
25
25
|
export declare enum namespace {
|
@@ -178,6 +178,13 @@ export declare class Client {
|
|
178
178
|
* @fires [[Message]]
|
179
179
|
*/
|
180
180
|
onButton(fn: (message: Message) => void): Promise<Listener | boolean>;
|
181
|
+
/**
|
182
|
+
* Listens to broadcast messages
|
183
|
+
* @event
|
184
|
+
* @param fn callback
|
185
|
+
* @fires [[Message]]
|
186
|
+
*/
|
187
|
+
onBroadcast(fn: (message: Message) => void): Promise<Listener | boolean>;
|
181
188
|
/**
|
182
189
|
* Listens to battery changes
|
183
190
|
*
|
@@ -508,6 +515,21 @@ export declare class Client {
|
|
508
515
|
* @param {string} footer The footer of the buttons message
|
509
516
|
*/
|
510
517
|
sendButtons(to: ChatId, body: string | LocationButtonBody, buttons: Button[], title?: string, footer?: string): Promise<boolean | MessageId>;
|
518
|
+
/**
|
519
|
+
* {@license:insiders@}
|
520
|
+
*
|
521
|
+
* Send advanced buttons with media body. This is an insiders feature for MD accounts.
|
522
|
+
*
|
523
|
+
* Body can be location, image, video or document. Buttons can be quick reply, url or call buttons.
|
524
|
+
*
|
525
|
+
* @param {ChatId} to chat id
|
526
|
+
* @param {string | LocationButtonBody} body The body of the buttons message
|
527
|
+
* @param {AdvancedButton[]} buttons Array of buttons - limit is 3!
|
528
|
+
* @param {string} title The title/header of the buttons message
|
529
|
+
* @param {string} footer The footer of the buttons message
|
530
|
+
* @param {string} filename Required if body is a file!!
|
531
|
+
*/
|
532
|
+
sendAdvancedButtons(to: ChatId, body: string | LocationButtonBody, buttons: AdvancedButton[], text: string, footer: string, filename: string): Promise<boolean | MessageId>;
|
511
533
|
/**
|
512
534
|
* Send a banner image
|
513
535
|
*
|
@@ -519,7 +541,7 @@ export declare class Client {
|
|
519
541
|
sendBanner(to: ChatId, base64: Base64): Promise<boolean | MessageId>;
|
520
542
|
/**
|
521
543
|
* {@license:insiders@}
|
522
|
-
*
|
544
|
+
*
|
523
545
|
* [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
524
546
|
*
|
525
547
|
* Send a list message. This will not work when being sent from business accounts!
|
@@ -564,7 +586,7 @@ export declare class Client {
|
|
564
586
|
* @param chatId The chat you want to send this message to.
|
565
587
|
*
|
566
588
|
*/
|
567
|
-
sendMessageWithThumb(thumb: string, url: string, title: string, description: string, text: Content, chatId: ChatId): Promise<MessageId |
|
589
|
+
sendMessageWithThumb(thumb: string, url: string, title: string, description: string, text: Content, chatId: ChatId): Promise<MessageId | boolean>;
|
568
590
|
/**
|
569
591
|
* Sends a location message to given chat
|
570
592
|
* @param to chat id: `xxxxx@c.us`
|