@open-wa/wa-automate 4.48.0 → 4.49.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/dist/api/Client.d.ts +39 -14
- package/dist/api/Client.js +36 -13
- package/dist/controllers/browser.js +2 -1
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -1693,30 +1693,55 @@ export declare class Client {
|
|
1693
1693
|
*/
|
1694
1694
|
postVideoStatus(data: DataURL, caption: Content): Promise<MessageId | string | boolean>;
|
1695
1695
|
/**
|
1696
|
-
*
|
1697
|
-
*
|
1696
|
+
* {@license:restricted@}
|
1697
|
+
*
|
1698
|
+
* Consumes a list of id strings of stories to delete.
|
1699
|
+
*
|
1700
|
+
* @param statusesToDelete string [] | string an array of ids of stories to delete.
|
1698
1701
|
* @returns boolean. True if it worked.
|
1699
1702
|
*/
|
1700
|
-
|
1703
|
+
deleteStory(statusesToDelete: string | string[]): Promise<boolean>;
|
1704
|
+
/**
|
1705
|
+
* @deprecated
|
1706
|
+
* Alias for deleteStory
|
1707
|
+
*/
|
1708
|
+
deleteStatus: (statusesToDelete: string | string[]) => Promise<boolean>;
|
1701
1709
|
/**
|
1702
|
-
*
|
1710
|
+
* {@license:restricted@}
|
1711
|
+
*
|
1712
|
+
* Deletes all your existing stories.
|
1703
1713
|
* @returns boolean. True if it worked.
|
1704
1714
|
*/
|
1705
|
-
|
1715
|
+
deleteAllStories(): Promise<boolean>;
|
1716
|
+
/**
|
1717
|
+
* @deprecated
|
1718
|
+
* Alias for deleteStory
|
1719
|
+
*/
|
1720
|
+
deleteAllStatus: () => Promise<boolean>;
|
1706
1721
|
/**
|
1707
|
-
*
|
1722
|
+
* {@license:restricted@}
|
1723
|
+
*
|
1724
|
+
* Retrieves all existing stories.
|
1708
1725
|
*
|
1709
1726
|
* Only works with a Story License Key
|
1710
1727
|
*/
|
1711
|
-
|
1728
|
+
getMyStoryArray(): Promise<Message[]>;
|
1729
|
+
/**
|
1730
|
+
* @deprecated
|
1731
|
+
* Alias for deleteStory
|
1732
|
+
*/
|
1733
|
+
getMyStatusArray: () => Promise<Message[]>;
|
1712
1734
|
/**
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1735
|
+
* {@license:restricted@}
|
1736
|
+
*
|
1737
|
+
* Retrieves an array of user ids that have 'read' your story.
|
1738
|
+
*
|
1739
|
+
* @param id string The id of the story
|
1740
|
+
*
|
1741
|
+
*/
|
1742
|
+
getStoryViewers(id?: string): Promise<ContactId[] | {
|
1743
|
+
[k: MessageId]: ContactId[];
|
1744
|
+
}>;
|
1720
1745
|
/**
|
1721
1746
|
* Clears all chats of all messages. This does not delete chats. Please be careful with this as it will remove all messages from whatsapp web and the host device. This feature is great for privacy focussed bots.
|
1722
1747
|
*
|
package/dist/api/Client.js
CHANGED
@@ -108,6 +108,21 @@ class Client {
|
|
108
108
|
* Note: This would be much simpler if eventMode was the default (and only) listener strategy.
|
109
109
|
*/
|
110
110
|
this._registeredWebhookListeners = {};
|
111
|
+
/**
|
112
|
+
* @deprecated
|
113
|
+
* Alias for deleteStory
|
114
|
+
*/
|
115
|
+
this.deleteStatus = this.deleteStory;
|
116
|
+
/**
|
117
|
+
* @deprecated
|
118
|
+
* Alias for deleteStory
|
119
|
+
*/
|
120
|
+
this.deleteAllStatus = this.deleteAllStories;
|
121
|
+
/**
|
122
|
+
* @deprecated
|
123
|
+
* Alias for deleteStory
|
124
|
+
*/
|
125
|
+
this.getMyStatusArray = this.getMyStoryArray;
|
111
126
|
/**
|
112
127
|
* This exposes a simple express middlware that will allow users to quickly boot up an api based off this client. Checkout demo/index.ts for an example
|
113
128
|
* How to use the middleware:
|
@@ -3514,41 +3529,49 @@ class Client {
|
|
3514
3529
|
});
|
3515
3530
|
}
|
3516
3531
|
/**
|
3517
|
-
*
|
3518
|
-
*
|
3532
|
+
* {@license:restricted@}
|
3533
|
+
*
|
3534
|
+
* Consumes a list of id strings of stories to delete.
|
3535
|
+
*
|
3536
|
+
* @param statusesToDelete string [] | string an array of ids of stories to delete.
|
3519
3537
|
* @returns boolean. True if it worked.
|
3520
3538
|
*/
|
3521
|
-
|
3539
|
+
deleteStory(statusesToDelete) {
|
3522
3540
|
return __awaiter(this, void 0, void 0, function* () {
|
3523
3541
|
return yield this.pup(({ statusesToDelete }) => WAPI.deleteStatus(statusesToDelete), { statusesToDelete });
|
3524
3542
|
});
|
3525
3543
|
}
|
3526
3544
|
/**
|
3527
|
-
*
|
3545
|
+
* {@license:restricted@}
|
3546
|
+
*
|
3547
|
+
* Deletes all your existing stories.
|
3528
3548
|
* @returns boolean. True if it worked.
|
3529
3549
|
*/
|
3530
|
-
|
3550
|
+
deleteAllStories() {
|
3531
3551
|
return __awaiter(this, void 0, void 0, function* () {
|
3532
3552
|
return yield this.pup(() => WAPI.deleteAllStatus());
|
3533
3553
|
});
|
3534
3554
|
}
|
3535
3555
|
/**
|
3536
|
-
*
|
3556
|
+
* {@license:restricted@}
|
3557
|
+
*
|
3558
|
+
* Retrieves all existing stories.
|
3537
3559
|
*
|
3538
3560
|
* Only works with a Story License Key
|
3539
3561
|
*/
|
3540
|
-
|
3562
|
+
getMyStoryArray() {
|
3541
3563
|
return __awaiter(this, void 0, void 0, function* () {
|
3542
3564
|
return yield this.pup(() => WAPI.getMyStatusArray());
|
3543
3565
|
});
|
3544
3566
|
}
|
3545
3567
|
/**
|
3546
|
-
|
3547
|
-
|
3548
|
-
|
3549
|
-
|
3550
|
-
|
3551
|
-
|
3568
|
+
* {@license:restricted@}
|
3569
|
+
*
|
3570
|
+
* Retrieves an array of user ids that have 'read' your story.
|
3571
|
+
*
|
3572
|
+
* @param id string The id of the story
|
3573
|
+
*
|
3574
|
+
*/
|
3552
3575
|
getStoryViewers(id) {
|
3553
3576
|
return __awaiter(this, void 0, void 0, function* () {
|
3554
3577
|
return yield this.pup(({ id }) => WAPI.getStoryViewers(id), { id });
|
@@ -300,7 +300,8 @@ const deleteSessionData = (config) => {
|
|
300
300
|
const mdDir = config['userDataDir'];
|
301
301
|
if (mdDir) {
|
302
302
|
logging_1.log.info(`Deleting MD session directory: ${mdDir}`);
|
303
|
-
|
303
|
+
//@ts-ignore
|
304
|
+
fs.rmdirSync(mdDir, { force: true, recursive: true });
|
304
305
|
}
|
305
306
|
return true;
|
306
307
|
};
|
package/package.json
CHANGED