@open-wa/wa-automate-types-only 4.74.2 → 4.75.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@}
@@ -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.75.0",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",