@open-wa/wa-automate-types-only 4.74.2 → 4.76.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.
@@ -2,7 +2,7 @@
2
2
  import { Page } from 'puppeteer';
3
3
  import { Chat, LiveLocationChangedEvent, ChatState, ChatMuteDuration, GroupChatCreationResponse, EphemeralDuration } from './model/chat';
4
4
  import { BusinessProfile, Contact, NumberCheck } from './model/contact';
5
- import { Message, MessageInfo, PollData } from './model/message';
5
+ import { Message, MessageInfo, MessagePinDuration, PollData } from './model/message';
6
6
  import { AxiosRequestConfig } from 'axios';
7
7
  import { NewCommunityGroup, ParticipantChangedEventModel, GenericGroupChangeEvent, GroupMetadata } from './model/group-metadata';
8
8
  import { ConfigObject, STATE, LicenseType, Webhook, EventPayload } from './model';
@@ -984,10 +984,26 @@ export declare class Client {
984
984
  * Pin/Unpin chats
985
985
  *
986
986
  * @param id The id of the conversation
987
- * @param archive boolean true => pin, false => unpin
987
+ * @param pin boolean true => pin, false => unpin
988
988
  * @return boolean true: worked
989
989
  */
990
990
  pinChat(id: ChatId, pin: boolean): Promise<boolean>;
991
+ /**
992
+ * Pin/Unpin message
993
+ *
994
+ * @param id The id of the message
995
+ * @param pin boolean true => pin, false => unpin
996
+ * @param pinDuration The length of time to pin the message. Default `ThirtyDays`
997
+ * @return boolean true: worked
998
+ */
999
+ pinMessage(id: MessageId, pin: boolean, pinDuration?: MessagePinDuration): Promise<boolean>;
1000
+ /**
1001
+ * Keep a message inside an ephemeral chat
1002
+ *
1003
+ * @param id The id of the message
1004
+ * @return boolean true: worked
1005
+ */
1006
+ keepMessage(id: MessageId, keep: boolean): Promise<boolean>;
991
1007
  /**
992
1008
  *
993
1009
  * {@license:insiders@}
@@ -1524,6 +1540,24 @@ export declare class Client {
1524
1540
  * @returns
1525
1541
  */
1526
1542
  inviteInfo(link: string): Promise<any>;
1543
+ /**
1544
+ * Set/Unset a sticker as a fav.
1545
+ * @param msgId The message Id related to the sticker you want to fav
1546
+ * @param fav set this to true to fav a sticker, set it to false to remove the sticker from favorites. default true
1547
+ * @returns favId The ID (filehash) of the fav sticker
1548
+ */
1549
+ favSticker(msgId: MessageId, fav?: boolean): Promise<string>;
1550
+ /**
1551
+ * Set/Unset a sticker as a fav.
1552
+ * @param chatId The chat in which you want to send the sticker
1553
+ * @param favId set this to true to favourite a sticker, set it to false to remove the sticker from favorites
1554
+ * @returns MessageId of the sent sticker message
1555
+ */
1556
+ sendFavSticker(chatId: ChatId, favId: string): Promise<MessageId>;
1557
+ /**
1558
+ * Get an array of fav'ed stickers
1559
+ */
1560
+ getFavStickers(): Promise<Partial<Message>>;
1527
1561
  /**
1528
1562
  * Revokes the current invite link for a group chat. Any previous links will stop working
1529
1563
  * @param chatId
@@ -2,6 +2,7 @@ import { ChatId, ContactId, MessageId, GroupChatId } from "./aliases";
2
2
  import { Button, Row, Section } from "./button";
3
3
  import { Chat } from "./chat";
4
4
  import { Contact } from "./contact";
5
+ export type MessagePinDuration = "FifteenSeconds" | "FiveSeconds" | "OneDay" | "OneMinute" | "SevenDays" | "ThirtyDays";
5
6
  export interface Message {
6
7
  /**
7
8
  * The ID of the selected button
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.74.2",
3
+ "version": "4.76.0",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",