@open-wa/wa-automate-types-only 4.47.6 → 4.48.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -208,7 +208,8 @@ export declare class Client {
208
208
  */
209
209
  onPlugged(fn: (plugged: boolean) => void): Promise<Listener | boolean>;
210
210
  /**
211
- * Requires a Story License Key
211
+ * {@license:restricted@}
212
+ *
212
213
  * Listens to when a contact posts a new story.
213
214
  * @event
214
215
  *
@@ -1693,30 +1694,55 @@ export declare class Client {
1693
1694
  */
1694
1695
  postVideoStatus(data: DataURL, caption: Content): Promise<MessageId | string | boolean>;
1695
1696
  /**
1696
- * Consumes a list of id strings of statuses to delete.
1697
- * @param statusesToDelete string [] | stringan array of ids of statuses to delete.
1697
+ * {@license:restricted@}
1698
+ *
1699
+ * Consumes a list of id strings of stories to delete.
1700
+ *
1701
+ * @param statusesToDelete string [] | string an array of ids of stories to delete.
1698
1702
  * @returns boolean. True if it worked.
1699
1703
  */
1700
- deleteStatus(statusesToDelete: string | string[]): Promise<boolean>;
1704
+ deleteStory(statusesToDelete: string | string[]): Promise<boolean>;
1705
+ /**
1706
+ * @deprecated
1707
+ * Alias for deleteStory
1708
+ */
1709
+ deleteStatus: (statusesToDelete: string | string[]) => Promise<boolean>;
1701
1710
  /**
1702
- * Deletes all your existing statuses.
1711
+ * {@license:restricted@}
1712
+ *
1713
+ * Deletes all your existing stories.
1703
1714
  * @returns boolean. True if it worked.
1704
1715
  */
1705
- deleteAllStatus(): Promise<boolean>;
1716
+ deleteAllStories(): Promise<boolean>;
1717
+ /**
1718
+ * @deprecated
1719
+ * Alias for deleteStory
1720
+ */
1721
+ deleteAllStatus: () => Promise<boolean>;
1706
1722
  /**
1707
- * retrieves all existing statuses.
1723
+ * {@license:restricted@}
1724
+ *
1725
+ * Retrieves all existing stories.
1708
1726
  *
1709
1727
  * Only works with a Story License Key
1710
1728
  */
1711
- getMyStatusArray(): Promise<Message[]>;
1729
+ getMyStoryArray(): Promise<Message[]>;
1730
+ /**
1731
+ * @deprecated
1732
+ * Alias for deleteStory
1733
+ */
1734
+ getMyStatusArray: () => Promise<Message[]>;
1712
1735
  /**
1713
- * Retrieves an array of user ids that have 'read' your story.
1714
- *
1715
- * @param id string The id of the story
1716
- *
1717
- * Only works with a Story License Key
1718
- */
1719
- getStoryViewers(id: string): Promise<ContactId[]>;
1736
+ * {@license:restricted@}
1737
+ *
1738
+ * Retrieves an array of user ids that have 'read' your story.
1739
+ *
1740
+ * @param id string The id of the story
1741
+ *
1742
+ */
1743
+ getStoryViewers(id?: string): Promise<ContactId[] | {
1744
+ [k: MessageId]: ContactId[];
1745
+ }>;
1720
1746
  /**
1721
1747
  * 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
1748
  *
@@ -1,5 +1,4 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { PREPROCESSORS } from '../../structures/preProcessors';
3
2
  import { ConfigLogTransport } from '../../logging/logging';
4
3
  import { Base64 } from "./aliases";
5
4
  import { SimpleListener } from './events';
@@ -636,12 +635,12 @@ export interface ConfigObject {
636
635
  */
637
636
  pQueueDefault?: any;
638
637
  /**
639
- * Set a preprocessor for messages. See [[PREPROCESSORS]] for more info.
638
+ * Set a preprocessor, or multiple chained preprocessors, for messages. See [MPConfigType](/) for more info.
640
639
  *
641
640
  * options: `SCRUB`, `BODY_ONLY`, `AUTO_DECRYPT`, `AUTO_DECRYPT_SAVE`, `UPLOAD_CLOUD`.
642
641
  * @default `undefined`
643
642
  */
644
- messagePreprocessor?: PREPROCESSORS;
643
+ messagePreprocessor?: any;
645
644
  /**
646
645
  * Set an array filter to be used with messagePreprocessor to limit which messages are preprocessed.
647
646
  *
@@ -1,6 +1,6 @@
1
1
  import { Client } from "../api/Client";
2
2
  import { Message } from "../api/model/message";
3
- declare type MessagePreProcessor = (message: Message, client?: Client) => Promise<Message>;
3
+ export declare type MessagePreProcessor = (message: Message, client?: Client) => Promise<Message>;
4
4
  /**
5
5
  * An object that contains all available [[PREPROCESSORS]].
6
6
  *
@@ -44,4 +44,7 @@ export declare enum PREPROCESSORS {
44
44
  */
45
45
  UPLOAD_CLOUD = "UPLOAD_CLOUD"
46
46
  }
47
- export {};
47
+ /**
48
+ * The actual type for [config.messagePreprocessor](/docs/api/interfaces/api_model_config.ConfigObject#messagepreprocessor)
49
+ */
50
+ export declare type MPConfigType = PREPROCESSORS | MessagePreProcessor | (PREPROCESSORS | MessagePreProcessor)[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.47.6",
3
+ "version": "4.48.1",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",