@wppconnect-team/wppconnect
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -0,1 +1,9 @@ | ||
## [1.4.1](https://github.com/wppconnect-team/wppconnect/compare/v1.4.0...v1.4.1) (2021-05-14) | ||
### Bug Fixes | ||
- Fixed archiveChat function ([#194](https://github.com/wppconnect-team/wppconnect/issues/194)) ([1ee2bce](https://github.com/wppconnect-team/wppconnect/commit/1ee2bce38841fc4d123c08fc8395639bfada1c41)) | ||
- Fixed clearChat function ([#194](https://github.com/wppconnect-team/wppconnect/issues/194)) ([4ee7a2e](https://github.com/wppconnect-team/wppconnect/commit/4ee7a2ec0c3bb58aab9ae4df4dc0a0c4f682617a)) | ||
- Fixed return of forwardMessages function ([#194](https://github.com/wppconnect-team/wppconnect/issues/194)) ([d81f94b](https://github.com/wppconnect-team/wppconnect/commit/d81f94bc195a559222a07340ab1c1209c6251558)) | ||
# [1.4.0](https://github.com/wppconnect-team/wppconnect/compare/v1.3.6...v1.4.0) (2021-05-08) | ||
@@ -2,0 +10,0 @@ |
@@ -42,3 +42,3 @@ import { Page } from 'puppeteer'; | ||
*/ | ||
archiveChat(chatId: string, option: boolean): Promise<boolean>; | ||
archiveChat(chatId: string, option?: boolean): Promise<boolean>; | ||
/** | ||
@@ -57,5 +57,6 @@ * Pin and Unpin chat messages with true or false | ||
* @param chatId | ||
* @param keepStarred Keep starred messages | ||
* @returns boolean | ||
*/ | ||
clearChat(chatId: string): Promise<void>; | ||
clearChat(chatId: string, keepStarred?: boolean): Promise<void>; | ||
/** | ||
@@ -62,0 +63,0 @@ * Deletes message of given message id |
@@ -140,2 +140,3 @@ "use strict"; | ||
ControlsLayer.prototype.archiveChat = function (chatId, option) { | ||
if (option === void 0) { option = true; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -189,8 +190,13 @@ return __generator(this, function (_a) { | ||
* @param chatId | ||
* @param keepStarred Keep starred messages | ||
* @returns boolean | ||
*/ | ||
ControlsLayer.prototype.clearChat = function (chatId) { | ||
ControlsLayer.prototype.clearChat = function (chatId, keepStarred) { | ||
if (keepStarred === void 0) { keepStarred = true; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, this.page.evaluate(function (chatId) { return WAPI.clearChat(chatId); }, chatId)]; | ||
return [2 /*return*/, this.page.evaluate(function (_a) { | ||
var chatId = _a.chatId, keepStarred = _a.keepStarred; | ||
return WAPI.clearChat(chatId, keepStarred); | ||
}, { chatId: chatId, keepStarred: keepStarred })]; | ||
}); | ||
@@ -197,0 +203,0 @@ }); |
@@ -7,3 +7,3 @@ import { Page } from 'puppeteer'; | ||
import { Logger } from 'winston'; | ||
import { CatchQRCallback, StatusFindCallback } from '../model'; | ||
import { CatchQRCallback, HostDevice, StatusFindCallback } from '../model'; | ||
import { TokenStore } from '../../token-store'; | ||
@@ -44,3 +44,3 @@ export declare class HostLayer { | ||
*/ | ||
getHostDevice(): Promise<import("../model").HostDevice>; | ||
getHostDevice(): Promise<HostDevice>; | ||
/** | ||
@@ -47,0 +47,0 @@ * Retrieves WA version |
import { Page } from 'puppeteer'; | ||
import { CreateConfig } from '../../config/create-config'; | ||
import { SessionToken } from '../../token-store'; | ||
import { WhatsappProfile } from '../model'; | ||
import { Chat, WhatsappProfile } from '../model'; | ||
import { SenderLayer } from './sender.layer'; | ||
@@ -39,3 +39,3 @@ export declare class RetrieverLayer extends SenderLayer { | ||
*/ | ||
getAllChats(withNewMessageOnly?: boolean): Promise<import("../model").Chat[]>; | ||
getAllChats(withNewMessageOnly?: boolean): Promise<Chat[]>; | ||
/** | ||
@@ -53,3 +53,3 @@ * Checks if a number is a valid WA number | ||
*/ | ||
getAllChatsWithMessages(withNewMessageOnly?: boolean): Promise<import("../model").Chat[]>; | ||
getAllChatsWithMessages(withNewMessageOnly?: boolean): Promise<Chat[]>; | ||
/** | ||
@@ -60,3 +60,3 @@ * Retrieve all groups | ||
*/ | ||
getAllGroups(withNewMessagesOnly?: boolean): Promise<import("../model").Chat[]>; | ||
getAllGroups(withNewMessagesOnly?: boolean): Promise<Chat[]>; | ||
/** | ||
@@ -67,3 +67,3 @@ * Retrieve all broadcast list | ||
*/ | ||
getAllBroadcastList(): Promise<import("../model").Chat[]>; | ||
getAllBroadcastList(): Promise<Chat[]>; | ||
/** | ||
@@ -88,3 +88,3 @@ * Retrieves contact detail object of given contact id | ||
*/ | ||
getChatById(contactId: string): Promise<import("../model").Chat>; | ||
getChatById(contactId: string): Promise<Chat>; | ||
/** | ||
@@ -97,3 +97,3 @@ * Retrieves chat object of given contact id | ||
*/ | ||
getChat(contactId: string): Promise<import("../model").Chat>; | ||
getChat(contactId: string): Promise<Chat>; | ||
/** | ||
@@ -100,0 +100,0 @@ * Retrieves chat picture |
@@ -166,4 +166,5 @@ import { Page } from 'puppeteer'; | ||
* @param skipMyMessages | ||
* @returns array of messages ID | ||
*/ | ||
forwardMessages(to: string, messages: string | string[], skipMyMessages: boolean): Promise<any>; | ||
forwardMessages(to: string, messages: string | string[], skipMyMessages: boolean): Promise<string[]>; | ||
/** | ||
@@ -170,0 +171,0 @@ * Generates sticker from the provided animated gif image and sends it (Send image as animated sticker) |
@@ -753,2 +753,3 @@ "use strict"; | ||
* @param skipMyMessages | ||
* @returns array of messages ID | ||
*/ | ||
@@ -755,0 +756,0 @@ SenderLayer.prototype.forwardMessages = function (to, messages, skipMyMessages) { |
{ | ||
"name": "@wppconnect-team/wppconnect", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination... 😀🤔💭", | ||
@@ -95,3 +95,3 @@ "main": "dist/index.js", | ||
"mocha": "^8.3.0", | ||
"prettier": "^2.2.1", | ||
"prettier": "^2.3.0", | ||
"pretty-quick": "^3.1.0", | ||
@@ -98,0 +98,0 @@ "release-it": "^14.4.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
876377
20670