@open-wa/wa-automate 4.37.5 → 4.38.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.
@@ -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
  *
@@ -519,6 +526,20 @@ export declare class Client {
519
526
  sendBanner(to: ChatId, base64: Base64): Promise<boolean | MessageId>;
520
527
  /**
521
528
  * {@license:insiders@}
529
+ *
530
+ * :::documentation-page{title="Welcome"}
531
+ *
532
+ * Please install :inline-code[unified]!
533
+ *
534
+ * ::copyright-notice{year="2020"}
535
+ *
536
+ * :::
537
+ * ::license-required[insiders]
538
+ *
539
+ * ::span{year="2020"}
540
+ *
541
+ * :span{year="2020"}
542
+ *
522
543
  * <span theme="badge contrast license">Insiders</span>
523
544
  * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
524
545
  *
@@ -564,7 +585,7 @@ export declare class Client {
564
585
  * @param chatId The chat you want to send this message to.
565
586
  *
566
587
  */
567
- sendMessageWithThumb(thumb: string, url: string, title: string, description: string, text: Content, chatId: ChatId): Promise<MessageId | string | boolean>;
588
+ sendMessageWithThumb(thumb: string, url: string, title: string, description: string, text: Content, chatId: ChatId): Promise<MessageId | boolean>;
568
589
  /**
569
590
  * Sends a location message to given chat
570
591
  * @param to chat id: `xxxxx@c.us`
@@ -753,6 +753,17 @@ class Client {
753
753
  return this.registerListener(events_2.SimpleListener.Button, fn);
754
754
  });
755
755
  }
756
+ /**
757
+ * Listens to broadcast messages
758
+ * @event
759
+ * @param fn callback
760
+ * @fires [[Message]]
761
+ */
762
+ onBroadcast(fn) {
763
+ return __awaiter(this, void 0, void 0, function* () {
764
+ return this.registerListener(events_2.SimpleListener.Broadcast, fn);
765
+ });
766
+ }
756
767
  /**
757
768
  * Listens to battery changes
758
769
  *
@@ -1349,6 +1360,20 @@ class Client {
1349
1360
  }
1350
1361
  /**
1351
1362
  * {@license:insiders@}
1363
+ *
1364
+ * :::documentation-page{title="Welcome"}
1365
+ *
1366
+ * Please install :inline-code[unified]!
1367
+ *
1368
+ * ::copyright-notice{year="2020"}
1369
+ *
1370
+ * :::
1371
+ * ::license-required[insiders]
1372
+ *
1373
+ * ::span{year="2020"}
1374
+ *
1375
+ * :span{year="2020"}
1376
+ *
1352
1377
  * <span theme="badge contrast license">Insiders</span>
1353
1378
  * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1354
1379
  *
@@ -62,6 +62,10 @@ export declare enum SimpleListener {
62
62
  * Represents [[onButton]]
63
63
  */
64
64
  Button = "onButton",
65
+ /**
66
+ * Represents [[onBroadcast]]
67
+ */
68
+ Broadcast = "onBroadcast",
65
69
  /**
66
70
  * Represents [[onLabel]]
67
71
  */
@@ -69,6 +69,10 @@ var SimpleListener;
69
69
  * Represents [[onButton]]
70
70
  */
71
71
  SimpleListener["Button"] = "onButton";
72
+ /**
73
+ * Represents [[onBroadcast]]
74
+ */
75
+ SimpleListener["Broadcast"] = "onBroadcast";
72
76
  /**
73
77
  * Represents [[onLabel]]
74
78
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.37.5",
3
+ "version": "4.38.0",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",