@open-wa/wa-automate 4.74.1 → 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.
- package/bin/oas-type-schemas.json +1 -1
- package/dist/api/Client.d.ts +18 -2
- package/dist/api/Client.js +25 -1
- package/dist/api/model/chat.d.ts +4 -0
- package/dist/api/model/message.d.ts +1 -0
- package/dist/lib/launch.js +1 -1
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -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
|
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@}
|
package/dist/api/Client.js
CHANGED
@@ -2257,7 +2257,7 @@ class Client {
|
|
2257
2257
|
* Pin/Unpin chats
|
2258
2258
|
*
|
2259
2259
|
* @param id The id of the conversation
|
2260
|
-
* @param
|
2260
|
+
* @param pin boolean true => pin, false => unpin
|
2261
2261
|
* @return boolean true: worked
|
2262
2262
|
*/
|
2263
2263
|
pinChat(id, pin) {
|
@@ -2265,6 +2265,30 @@ class Client {
|
|
2265
2265
|
return yield this.pup(({ id, pin }) => WAPI.pinChat(id, pin), { id, pin });
|
2266
2266
|
});
|
2267
2267
|
}
|
2268
|
+
/**
|
2269
|
+
* Pin/Unpin message
|
2270
|
+
*
|
2271
|
+
* @param id The id of the message
|
2272
|
+
* @param pin boolean true => pin, false => unpin
|
2273
|
+
* @param pinDuration The length of time to pin the message. Default `ThirtyDays`
|
2274
|
+
* @return boolean true: worked
|
2275
|
+
*/
|
2276
|
+
pinMessage(id, pin, pinDuration = "ThirtyDays") {
|
2277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2278
|
+
return yield this.pup(({ id, pin, pinDuration }) => WAPI.pinMessage(id, pin, pinDuration), { id, pin, pinDuration });
|
2279
|
+
});
|
2280
|
+
}
|
2281
|
+
/**
|
2282
|
+
* Keep a message inside an ephemeral chat
|
2283
|
+
*
|
2284
|
+
* @param id The id of the message
|
2285
|
+
* @return boolean true: worked
|
2286
|
+
*/
|
2287
|
+
keepMessage(id, keep) {
|
2288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2289
|
+
return yield this.pup(({ id, keep }) => WAPI.keepMessage(id, keep), { id, keep });
|
2290
|
+
});
|
2291
|
+
}
|
2268
2292
|
/**
|
2269
2293
|
*
|
2270
2294
|
* {@license:insiders@}
|
package/dist/api/model/chat.d.ts
CHANGED
@@ -108,6 +108,10 @@ export interface GroupChat extends BaseChat {
|
|
108
108
|
* Whether the chat is a group chat
|
109
109
|
*/
|
110
110
|
isGroup: true;
|
111
|
+
/**
|
112
|
+
* The type of the group
|
113
|
+
*/
|
114
|
+
groupType: 'DEFAULT' | 'COMMUNITY' | 'LINKED_ANNOUNCEMENT_GROUP' | 'LINKED_GENERAL_GROUP' | 'LINKED_SUBGROUP';
|
111
115
|
}
|
112
116
|
export type Chat = SingleChat | GroupChat;
|
113
117
|
export interface LiveLocationChangedEvent {
|
@@ -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
|