@open-wa/wa-automate-types-only 4.71.13 → 4.71.15
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
@@ -701,7 +701,7 @@ export declare class Client {
|
|
701
701
|
* @param text The text you want to inslude in the message section. THIS HAS TO INCLUDE THE URL otherwise the url will be prepended to the text automatically.
|
702
702
|
* @param chatId The chat you want to send this message to.
|
703
703
|
* @param quotedMsgId [INSIDERS] Send this link preview message in response to a given quoted message
|
704
|
-
* @param customSize [INSIDERS] Anchor the size of the thumbnail
|
704
|
+
* @param customSize [INSIDERS] Anchor the size of the thumbnail
|
705
705
|
*/
|
706
706
|
sendMessageWithThumb(thumb: string, url: string, title: string, description: string, text: Content, chatId: ChatId, quotedMsgId?: MessageId, customSize?: {
|
707
707
|
height: number;
|
@@ -748,7 +748,7 @@ export declare class Client {
|
|
748
748
|
* @param text string Custom text as body of the message, this needs to include the link or it will be appended after the link.
|
749
749
|
* @param thumbnail string Base64 of the jpeg/png which will be used to override the automatically generated thumbnail.
|
750
750
|
* @param quotedMsgId [INSIDERS] Send this link preview message in response to a given quoted message
|
751
|
-
* @param customSize [INSIDERS] Anchor the size of the thumbnail
|
751
|
+
* @param customSize [INSIDERS] Anchor the size of the thumbnail
|
752
752
|
*/
|
753
753
|
sendYoutubeLink(to: ChatId, url: string, text?: Content, thumbnail?: Base64, quotedMsgId?: MessageId, customSize?: {
|
754
754
|
height: number;
|
@@ -761,7 +761,7 @@ export declare class Client {
|
|
761
761
|
* @param text string Custom text as body of the message, this needs to include the link or it will be appended after the link.
|
762
762
|
* @param thumbnail Base64 of the jpeg/png which will be used to override the automatically generated thumbnail.
|
763
763
|
* @param quotedMsgId [INSIDERS] Send this link preview message in response to a given quoted message
|
764
|
-
* @param customSize [INSIDERS] Anchor the size of the thumbnail
|
764
|
+
* @param customSize [INSIDERS] Anchor the size of the thumbnail
|
765
765
|
*/
|
766
766
|
sendLinkWithAutoPreview(to: ChatId, url: string, text?: Content, thumbnail?: Base64, quotedMsgId?: MessageId, customSize?: {
|
767
767
|
height: number;
|
@@ -1400,10 +1400,6 @@ export declare class Client {
|
|
1400
1400
|
*
|
1401
1401
|
* Retrieves the groups that you have in common with a contact
|
1402
1402
|
* @param contactId
|
1403
|
-
* @returns Promise returning an array of common groups {
|
1404
|
-
* id:string,
|
1405
|
-
* title:string
|
1406
|
-
* }
|
1407
1403
|
*/
|
1408
1404
|
getCommonGroups(contactId: ContactId): Promise<{
|
1409
1405
|
id: string;
|
@@ -1455,8 +1451,7 @@ export declare class Client {
|
|
1455
1451
|
loadEarlierMessages(contactId: ContactId): Promise<Message[]>;
|
1456
1452
|
/**
|
1457
1453
|
* Get the status of a contact
|
1458
|
-
* @param contactId
|
1459
|
-
* returns: {id: string,status: string}
|
1454
|
+
* @param contactId to '000000000000@c.us'
|
1460
1455
|
*/
|
1461
1456
|
getStatus(contactId: ContactId): Promise<{
|
1462
1457
|
id: string;
|
@@ -1474,8 +1469,18 @@ export declare class Client {
|
|
1474
1469
|
*
|
1475
1470
|
* Use a raw payload within your open-wa session
|
1476
1471
|
*
|
1472
|
+
* @example
|
1473
|
+
* If there is a code block, then both TypeDoc and VSCode will treat
|
1474
|
+
* text outside of the code block as regular text.
|
1475
|
+
*
|
1476
|
+
* ```ts
|
1477
|
+
* await B('44123456789@c.us', {
|
1478
|
+
* test: 1
|
1479
|
+
* })
|
1480
|
+
* ```
|
1481
|
+
* {@link loadAllEarlierMessages}
|
1477
1482
|
* @param chatId
|
1478
|
-
* @param payload
|
1483
|
+
* @param payload
|
1479
1484
|
* returns: MessageId
|
1480
1485
|
*/
|
1481
1486
|
B(chatId: ChatId, payload: {
|
@@ -1853,7 +1858,7 @@ export declare class Client {
|
|
1853
1858
|
*
|
1854
1859
|
* @param to ChatId The chat id you want to send the webp sticker to
|
1855
1860
|
* @param file [[DataURL]], [[Base64]], URL (string GET), Relative filepath (string), or Buffer of the mp4 file
|
1856
|
-
* @param messageId message id of the message you want this sticker to reply to.
|
1861
|
+
* @param messageId message id of the message you want this sticker to reply to. @license:insiders@
|
1857
1862
|
*/
|
1858
1863
|
sendMp4AsSticker(to: ChatId, file: DataURL | Buffer | Base64 | string, processOptions?: Mp4StickerConversionProcessOptions, stickerMetadata?: StickerMetadata, messageId?: MessageId): Promise<MessageId | string | boolean>;
|
1859
1864
|
/**
|
@@ -1861,7 +1866,7 @@ export declare class Client {
|
|
1861
1866
|
*
|
1862
1867
|
* @param to ChatId The chat id you want to send the webp sticker to
|
1863
1868
|
* @param emojiId The discord emoji id without indentifying chars. In discord you would write `:who:`, here use `who`
|
1864
|
-
* @param messageId message id of the message you want this sticker to reply to.
|
1869
|
+
* @param messageId message id of the message you want this sticker to reply to. @license:insiders@
|
1865
1870
|
*/
|
1866
1871
|
sendEmoji(to: ChatId, emojiId: string, messageId?: MessageId): Promise<MessageId | boolean | string>;
|
1867
1872
|
/**
|
@@ -6,8 +6,9 @@ import { Message } from "../api/model/message";
|
|
6
6
|
* @param message The message to be processed
|
7
7
|
* @param client The client that received the message
|
8
8
|
* @param alreadyProcessed Whether the message has already been processed by another preprocessor. (This is useful in cases where you want to mutate the message for both onMessage and onAnyMessage events but only want to do the actual process, like uploading to s3, once.)
|
9
|
+
* @param source The source of the message. This is useful for knowing if the message is from onMessage or onAnyMessage. Only processing one source will prevent duplicate processing.
|
9
10
|
*/
|
10
|
-
export type MessagePreProcessor = (message: Message, client?: Client, alreadyProcessed?: boolean) => Promise<Message>;
|
11
|
+
export type MessagePreProcessor = (message: Message, client?: Client, alreadyProcessed?: boolean, source?: 'onMessage' | 'onAnyMessage') => Promise<Message>;
|
11
12
|
/**
|
12
13
|
* An object that contains all available [[PREPROCESSORS]].
|
13
14
|
*
|