@open-wa/wa-automate-types-only 4.64.0 → 4.64.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,13 @@
1
1
  import { Client } from "../api/Client";
2
2
  import { Message } from "../api/model/message";
3
- export type MessagePreProcessor = (message: Message, client?: Client) => Promise<Message>;
3
+ /**
4
+ * A function that takes a message and returns a message.
5
+ *
6
+ * @param message The message to be processed
7
+ * @param client The client that received the message
8
+ * @param alreadyProcessed Whether the message has already been processed by another preprocessor. (This is useful in cases where you want to mutate the message for both onMessage and onAnyMessage events but only want to do the actual process, like uploading to s3, once.)
9
+ */
10
+ export type MessagePreProcessor = (message: Message, client?: Client, alreadyProcessed?: boolean) => Promise<Message>;
4
11
  /**
5
12
  * An object that contains all available [[PREPROCESSORS]].
6
13
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.64.0",
3
+ "version": "4.64.1",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",